2013-04-02 15 views
7

Ciao,JBoss HelloWorld appilcation non inizia

sto cercando di avviare l'applicazione esempio JBoss 'jboss-as-helloworld'. e ottenuto tale eccezione:

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 è iniziato e posso accedere a JBoss inizio pagina http://localhost:8080 e console JBoss.

Non ho modificato alcun codice o xml, tutto è predefinito. Dimmi se è necessario fornire ulteriori informazioni per indagare su questo problema.

risposta

5

Da l'errore, sembra che "Ciao mondo" già distribuito sul server (forse si è scelto di installare esempi):

Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.app.jboss-as-helloworld is already registered 

Prova undeploy questa applicazione e quindi distribuire di nuovo. Oppure puoi rinominare la tua prima app "hello world" e distribuirla, quindi non vi è alcun conflitto di nomi.

+0

Grazie! Questo mi ha aiutato. – devger

3

Questi sono i passaggi che ho seguito per risolvere il problema.

  1. Arresta il server.
  2. Passare al percorso di distribuzione.
  3. Elimina manualmente il progetto esistente nella cartella di distribuzione.
  4. Riavviato il server
  5. Distribuito di nuovo l'applicazione.