我正在尝试启动 JBoss Web 配置文件示例应用程序“GestionFormation”。并得到这样的例外:
15:18:30,756 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."GestionFomationWeb.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."GestionFomationWeb.war".INSTALL: Failed to process phase INSTALL of deployment "GestionFomationWeb.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:1145) [:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [:1.7.0_40]
Caused by: java.lang.RuntimeException: Error getting reflective information for class com.lo54.servlet.HomeServlet
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
at org.jboss.as.ee.component.EEModuleClassDescription$DefaultConfigurator.configure(EEModuleClassDescription.java:144)
at org.jboss.as.ee.component.EEClassConfigurationProcessor.deploy(EEClassConfigurationProcessor.java:100)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
Caused by: java.lang.NoClassDefFoundError: Lutbm/lo54/session/ManageCourseSessionBeanLocal;
at java.lang.Class.getDeclaredFields0(Native Method) [:1.7.0_40]
at java.lang.Class.privateGetDeclaredFields(Class.java:2387) [:1.7.0_40]
at java.lang.Class.getDeclaredFields(Class.java:1796) [:1.7.0_40]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
... 8 more
Caused by: java.lang.ClassNotFoundException: utbm.lo54.session.ManageCourseSessionBeanLocal from [Module "deployment.GestionFomationWeb.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
... 13 more
15:18:31,155 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "GestionFomationWeb.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"GestionFomationWeb.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"GestionFomationWeb.war\".INSTALL: Failed to process phase INSTALL of deployment \"GestionFomationWeb.war\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.GestionFomationWeb.GestionFomationWeb.GestionFomationWeb.ValidatorFactory missing [ jboss.naming.context.java.module.GestionFomationWeb.GestionFomationWeb ]","jboss.naming.context.java.comp.GestionFomationWeb.GestionFomationWeb.GestionFomationWeb.Validator missing [ jboss.naming.context.java.module.GestionFomationWeb.GestionFomationWeb ]"]}
15:18:31,157 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment GestionFomationWeb.war in 5ms
15:18:31,162 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"GestionFomationWeb.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"GestionFomationWeb.war\".INSTALL: Failed to process phase INSTALL of deployment \"GestionFomationWeb.war\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.GestionFomationWeb.GestionFomationWeb.GestionFomationWeb.ValidatorFactory missing [ jboss.naming.context.java.module.GestionFomationWeb.GestionFomationWeb ]","jboss.naming.context.java.comp.GestionFomationWeb.GestionFomationWeb.GestionFomationWeb.Validator missing [ jboss.naming.context.java.module.GestionFomationWeb.GestionFomationWeb ]"]}}}
15:21:22,188 ERROR [org.jboss.as.controller] (pool-1-thread-18) Operation ("deploy") failed - address: ([("deployment" => "GestionFomationWeb.war")]): java.util.NoSuchElementException: No child 'runtime-name' exists
at org.jboss.dmr.ModelValue.requireChild(ModelValue.java:362)
at org.jboss.dmr.ObjectModelValue.requireChild(ObjectModelValue.java:298)
at org.jboss.dmr.ModelNode.require(ModelNode.java:703)
at org.jboss.as.server.deployment.DeploymentDeployHandler.execute(DeploymentDeployHandler.java:65)
at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)
at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)
at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)
at org.jboss.as.controller.CompositeOperationHandler.execute(CompositeOperationHandler.java:83)
at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)
at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)
at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)
at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:350)
at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)
at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)
at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:119)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doProcessRequest(ModelControllerClientOperationHandler.java:154)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$100(ModelControllerClientOperationHandler.java:85)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.call(ModelControllerClientOperationHandler.java:114)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.call(ModelControllerClientOperationHandler.java:112)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [:1.7.0_40]
16:06:04,441 ERROR [org.jboss.as.controller] (pool-1-thread-19) Operation ("deploy") failed - address: ([("deployment" => "GestionFomationWeb.war")]): java.util.NoSuchElementException: No child 'runtime-name' exists
at org.jboss.dmr.ModelValue.requireChild(ModelValue.java:362)
at org.jboss.dmr.ObjectModelValue.requireChild(ObjectModelValue.java:298)
at org.jboss.dmr.ModelNode.require(ModelNode.java:703)
at org.jboss.as.server.deployment.DeploymentDeployHandler.execute(DeploymentDeployHandler.java:65)
at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)
at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)
at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)
at org.jboss.as.controller.CompositeOperationHandler.execute(CompositeOperationHandler.java:83)
at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)
at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)
at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)
at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:350)
at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)
at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)
at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:119)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doProcessRequest(ModelControllerClientOperationHandler.java:154)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$100(ModelControllerClientOperationHandler.java:85)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.call(ModelControllerClientOperationHandler.java:114)
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.call(ModelControllerClientOperationHandler.java:112)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [:1.7.0_40]
[更新以显示我的数据源配置]
模块.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.26-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
独立的.xml
<datasource jndi-name="java:jboss/datasources/MysqlDS" enabled="true" jta="true" use-java-context="true" pool-name="MysqlDS">
<connection-url>jdbc:mysql://127.0.0.1:3306/gestion_formation</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password>*******</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
</validation>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
我该如何解决这个问题?提前致谢