什么是JBOSS-"Java不允许使用空名称段"错误 [英] What is JBOSS- "Empty name segment is not allowed for java" error

查看:40
本文介绍了什么是JBOSS-"Java不允许使用空名称段"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JBOSS开发的新手,正在尝试从Eclipse运行项目,但出现"Java不允许使用空名称段" 错误.我知道当我们的jndi资源名称为空时会出现这种错误,但是在这种情况下,它指定为"env" 而不是"java" .在下面发布我的stacktrace.我正在使用JBOSS 7.1版本.

I am newbee to JBOSS developement and tring to run a project from eclipse but I am getting "Empty name segment is not allowed for java" error. I know such error comes when our jndi resource name is empty but in such case it specifies as "env" and not "java" which is in my case. Posting my stacktrace below. I am using JBOSS 7.1 version.

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,但不认为错误是由它引起的.

I see one warning saying that JBAS011001: Could not resolve resource-env-ref java:/TransactionManager but dont think error is caused by it.

请指导我.预先感谢.

Zebronix_777

Zebronix_777

推荐答案

我需要从standalone.xml中提到的数据源中删除java:/前缀.解决了因为在persistance.xml中没有该前缀.

I need to remove java:/ prefix from the datasources mentioned in standalone.xml. It got solved. Because in persistance.xml it was without that prefix.

这篇关于什么是JBOSS-"Java不允许使用空名称段"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆