java JBoss HelloWorld 应用程序未启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15765651/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JBoss HelloWorld appilcation doesn't start
提问by devger
Hi,
你好,
I'm trying to start JBoss example application 'jboss-as-helloworld'. And got such exception:
我正在尝试启动 JBoss 示例应用程序“jboss-as-helloworld”。并得到了这样的例外:
16:23:51,118 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "jboss-as-helloworld.war"
16:23:51,176 INFO [org.jboss.weld] (MSC service thread 1-5) Processing CDI deployment: jboss-as-helloworld.war
16:23:51,178 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."jboss-as-helloworld.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-as-helloworld.war".INSTALL: Failed to process phase INSTALL of deployment "jboss-as-helloworld.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0_02]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0_02]
at java.lang.Thread.run(Thread.java:722) [:1.7.0_02]
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.app.jboss-as-helloworld is already registered
at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154)
at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:226)
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560)
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201)
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2194)
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201)
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2194)
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307)
at org.jboss.as.ee.naming.ApplicationContextProcessor.deploy(ApplicationContextProcessor.java:62)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
16:23:51,180 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "jboss-as-helloworld.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"jboss-as-helloworld.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jboss-as-helloworld.war\".INSTALL: Failed to process phase INSTALL of deployment \"jboss-as-helloworld.war\""}}
16:23:51,191 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment jboss-as-helloworld.war in 10ms
16:23:51,192 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"jboss-as-helloworld.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jboss-as-helloworld.war\".INSTALL: Failed to process phase INSTALL of deployment \"jboss-as-helloworld.war\""}}}}
JBoss 7.0 Runtime Server has started and I can access JBoss start page http://localhost:8080
and JBoss console.
JBoss 7.0 运行时服务器已启动,我可以访问 JBoss 起始页http://localhost:8080
和 JBoss 控制台。
I didn't change any code or xml, everything is default. Tell me if it is need to provide additional info to investigate this issue.
我没有更改任何代码或 xml,一切都是默认的。请告诉我是否需要提供其他信息来调查此问题。
采纳答案by user1697575
From the error, it looks like "Hello world" already deployed on the server (perhaps you selected to install examples):
从错误来看,“Hello world”似乎已经部署在服务器上(也许您选择安装示例):
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.app.jboss-as-helloworld is already registered
Try undeploy this app and then deploy again. Or you could rename your first "hello world" app and deploy - so there is no name conflict.
尝试取消部署此应用程序,然后再次部署。或者您可以重命名您的第一个“hello world”应用程序并进行部署 - 这样就不会有名称冲突。
回答by Gopikrishna Mandapati
These are the steps I followed to resolve the issue.
这些是我为解决问题而遵循的步骤。
- Stop the Server.
- Go to deployment path.
- Manually deleted the existing project in deployment folder.
- Restarted the server
- Deployed the application again.
- 停止服务器。
- 转到部署路径。
- 手动删除了部署文件夹中的现有项目。
- 重启了服务器
- 再次部署应用程序。