什么是 JBOSS- "Empty name segment is not allowed for java" 错误
What is JBOSS- "Empty name segment is not allowed for java" error
我是 JBOSS 开发的新手,正在尝试 运行 来自 eclipse 的项目,但我收到 "Empty name segment is not allowed for java" 错误。我知道当我们的 jndi 资源名称为空时会出现这样的错误,但在这种情况下它指定为 "env" 而不是 "java" 这就是我的情况。在下面发布我的堆栈跟踪。我正在使用 JBOSS 7.1 版本。
14:34:04,440 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011001: Could not resolve resource-env-ref java:/TransactionManager
14:34:04,440 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."workflow.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."workflow.war".INSTALL: Failed to process phase INSTALL of deployment "workflow.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_51]
at java.lang.Thread.run(Thread.java:743) [rt.jar:1.6.0_51]
Caused by: java.lang.IllegalArgumentException: Empty name segment is not allowed for java
at org.jboss.msc.service.ServiceName.of(ServiceName.java:85) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceName.append(ServiceName.java:112) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.as.naming.deployment.ContextNames.buildServiceName(ContextNames.java:178)
at org.jboss.as.naming.deployment.ContextNames$BindInfo.<init>(ContextNames.java:190)
at org.jboss.as.naming.deployment.ContextNames$BindInfo.<init>(ContextNames.java:181)
at org.jboss.as.naming.deployment.ContextNames.bindInfoFor(ContextNames.java:124)
at org.jboss.as.naming.deployment.ContextNames.bindInfoForEnvEntry(ContextNames.java:165)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:319)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleWarDeployment(PersistenceUnitDeploymentProcessor.java:194)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:118)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
14:34:04,471 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "workflow.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"workflow.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"workflow.war\".INSTALL: Failed to process phase INSTALL of deployment \"workflow.war\""}}
14:34:04,471 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."workflow.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."workflow.war".INSTALL: Failed to process phase INSTALL of deployment "workflow.war"
14:34:04,471 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"workflow.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"workflow.war\".INSTALL: Failed to process phase INSTALL of deployment \"workflow.war\""}}}}
14:34:04,659 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment workflow.war in 184ms
我看到一个警告说 JBAS011001: Could not resolve resource-env-ref java:/TransactionManager
但我认为错误不是由它引起的。
请指导我。提前致谢。
Zebronix_777
我需要从 standalone.xml 中提到的数据源中删除 java:/ 前缀。它得到了解决。因为在 persistance.xml
中没有那个前缀。
我是 JBOSS 开发的新手,正在尝试 运行 来自 eclipse 的项目,但我收到 "Empty name segment is not allowed for java" 错误。我知道当我们的 jndi 资源名称为空时会出现这样的错误,但在这种情况下它指定为 "env" 而不是 "java" 这就是我的情况。在下面发布我的堆栈跟踪。我正在使用 JBOSS 7.1 版本。
14:34:04,440 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011001: Could not resolve resource-env-ref java:/TransactionManager
14:34:04,440 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."workflow.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."workflow.war".INSTALL: Failed to process phase INSTALL of deployment "workflow.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_51]
at java.lang.Thread.run(Thread.java:743) [rt.jar:1.6.0_51]
Caused by: java.lang.IllegalArgumentException: Empty name segment is not allowed for java
at org.jboss.msc.service.ServiceName.of(ServiceName.java:85) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceName.append(ServiceName.java:112) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.as.naming.deployment.ContextNames.buildServiceName(ContextNames.java:178)
at org.jboss.as.naming.deployment.ContextNames$BindInfo.<init>(ContextNames.java:190)
at org.jboss.as.naming.deployment.ContextNames$BindInfo.<init>(ContextNames.java:181)
at org.jboss.as.naming.deployment.ContextNames.bindInfoFor(ContextNames.java:124)
at org.jboss.as.naming.deployment.ContextNames.bindInfoForEnvEntry(ContextNames.java:165)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:319)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:258)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleWarDeployment(PersistenceUnitDeploymentProcessor.java:194)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:118)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
14:34:04,471 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "workflow.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"workflow.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"workflow.war\".INSTALL: Failed to process phase INSTALL of deployment \"workflow.war\""}}
14:34:04,471 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."workflow.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."workflow.war".INSTALL: Failed to process phase INSTALL of deployment "workflow.war"
14:34:04,471 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"workflow.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"workflow.war\".INSTALL: Failed to process phase INSTALL of deployment \"workflow.war\""}}}}
14:34:04,659 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment workflow.war in 184ms
我看到一个警告说 JBAS011001: Could not resolve resource-env-ref java:/TransactionManager
但我认为错误不是由它引起的。
请指导我。提前致谢。
Zebronix_777
我需要从 standalone.xml 中提到的数据源中删除 java:/ 前缀。它得到了解决。因为在 persistance.xml
中没有那个前缀。