Wildfly在启动时抛出UnsupportedOperationException(命名上下文是只读的)

问题描述 投票:1回答:1

我们正在设置一个新的登台服务器(运行Ubuntu),并且在启动WildFly时遇到错误。主要是看到的

java.lang.UnsupportedOperationException: WFLYNAM0043: Naming context is read-only

然后导致许多关于缺少依赖关系的错误。

我们在另一台服务器上设置了我们的(liquibase)数据库,我们可以在内部进行ssh。我们也搜索了StackOverflow,并尝试添加

set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=**true**"

到我们的standalone.conf,standalone.bat和standalone.conf.bat(为了尝试了一切!)。我们还看到这应该在WildFly 7.1.1中修复,我们自己运行9(模拟实时服务器)。我们尝试手动安装依赖项,但有很多 - 老实说,我们认为这不是主要问题。

我们还运行nginx和Redis,我们在server.log(见下文)中看到错误发生在“Started Hibernate Redis cache”之后,但错误本身似乎特定于WildFly。

下面是一大块server.log:

2019-04-03 10:52:38,252 INFO  [com.company.ejb.util.config.ConfigRetriever] (ServerService Thread Pool -- 56) Successfully found and read the config file at /opt/wildfly/config.yml
2019-04-03 10:52:38,300 INFO  [com.company.ejb.entity.cache.RedisRegionFactory] (ServerService Thread Pool -- 56) Started Hibernate Redis cache
2019-04-03 10:52:46,896 INFO  [org.jboss.weld.Event] (MSC service thread 1-2) WELD-000411: Observer method [BackedAnnotatedMethod] com.sun.jersey.server.impl.cdi.CDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2019-04-03 10:52:47,041 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."DoThePublish.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."DoThePublish.ear".WeldStartService: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
java.lang.UnsupportedOperationException: WFLYNAM0043: Naming context is read-only
        at org.jboss.as.naming.WritableServiceBasedNamingStore.requireOwner(WritableServiceBasedNamingStore.java:161)
        at org.jboss.as.naming.WritableServiceBasedNamingStore.createSubcontext(WritableServiceBasedNamingStore.java:151)
        at org.jboss.as.naming.NamingContext.createSubcontext(NamingContext.java:417)
        at org.jboss.as.naming.InitialContext$DefaultInitialContext.createSubcontext(InitialContext.java:298)
        at org.jboss.as.naming.NamingContext.createSubcontext(NamingContext.java:425)
        [...]

2019-04-03 10:52:47,078 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "DoThePublish.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"DoThePublish. ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"DoThePublish.ear\".WeldStartService: Failed to
 start service
    Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
java.lang.UnsupportedOperationException: WFLYNAM0043: Naming context is read-only
        at org.jboss.as.naming.WritableServiceBasedNamingStore.requireOwner(WritableServiceBasedNamingStore.java:161)
        at org.jboss.as.naming.WritableServiceBasedNamingStore.createSubcontext(WritableServiceBasedNamingStore.java:151)
        at org.jboss.as.naming.NamingContext.createSubcontext(NamingContext.java:417)
        at org.jboss.as.naming.InitialContext$DefaultInitialContext.createSubcontext(InitialContext.java:298)
        at org.jboss.as.naming.NamingContext.createSubcontext(NamingContext.java:425)
        [...]
"}}
2019-04-03 10:52:47,178 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 32) WFLYSRV0010: Deployed "DoThePublish.ear" (runtime-name : "DoThePublish.ear")
2019-04-03 10:52:47,186 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report 
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."DoThePublish.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."DoThePublish.ear".WeldStartService: Failed to start service

2019-04-03 10:52:47,581 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
2019-04-03 10:52:47,582 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
2019-04-03 10:52:47,582 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) started (with errors) in 42472ms - Started 4599 of 5108 services (362 services failed or missing dependencies, 209 services are lazy, passive or on-demand)

然后,有一堆缺少的依赖项(这些是looaaaads):

WFLYCTL0184:    New missing/unsatisfied dependencies:
      service jboss.deployment.subunit."DoThePublish.ear"."CoreEjb.jar".component.AbstractEntityMainSB.CREATE (missing) dependents: [service jboss.deployment.subunit."DoThePublish.ear"."CoreEjb.jar".component.AbstractEntityMainSB.START]
      service jboss.deployment.subunit."DoThePublish.ear"."CoreEjb.jar".component.AbstractEntityMainSB.START (missing) dependents: [service jboss.deployment.subunit."DoThePublish.ear"."CoreEjb.jar".moduleDeploymentRuntimeInformationStart, service jboss.deployment.subunit."DoThePublish.ear"."CoreEjb.jar".deploymentCompleteService]
      service jboss.deployment.subunit."DoThePublish.ear"."CoreEjb.jar".component.AbstractEntityMainSB.VIEW."com.company.ejb.session.AbstractEntityMainSBL".LOCAL (missing) dependents: [service jboss.deployment.subunit."DoThePublish.ear"."CoreEjb.jar".component.AbstractEntityMainSB.START]

我们已经尝试将设置与现有的生产(实时)服务器进行比较,但是开发团队已经出现了很大的转变,因此没有人确切知道它们是如何设置的。没有设置说明所以我们正在尝试的事情 - 也许以前的服务器遇到了同样的问题,但我们不知道。

我们想要修复这个例外,希望能够毫无问题地启动wildfly(以及我们的网站)(或者至少转向下一个错误......)非常感谢任何帮助!

spring ubuntu jboss wildfly
1个回答
0
投票

所以经过一番尝试,我们发现了它。我们试图实现的那条线需要稍微改变一下:

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true"

所以我们删除了'set'并删除了星号和东西。在我们的例子中,是.conf文件需要该行,我相信不同类型的实现它可能是.bat或.conf.bat - 抱歉,我无法继续这样做。

希望这有助于其他人!

© www.soinside.com 2019 - 2024. All rights reserved.