JSP Pages cannot connect to MySQL Datasource via JBoss - java

I am using Eclipse to create a simple project using JSP pages that pulls data from a MySQL database through a JBoss 6 AS. It would appear I have the MySQL database properly bound to JBoss because it starts up without an errors and even displays the following message.
17:09:43,782 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/MyDatabase]
However when I try to launch my index.jsp page I get the following error:
exception
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get
connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for
jdbc/MyDatabase"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.index_jsp._jspService(index_jsp.java:112)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/MyDatabase"
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:318)
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:201)
org.apache.jsp.index_jsp._jspx_meth_sql_005fquery_005f0(index_jsp.java:133)
org.apache.jsp.index_jsp._jspService(index_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
I cannot seem to figure out why the last step of this whole thing, to allow my JSP page to be able to read from the DB is not working.
Files for reference:
JBoss Standalone.xml
<subsystem xmlns="urn:jboss:domain:datasources:1.1">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/MyDatabase" pool-name="MyDatabase" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/MyDatabase</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password>root</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="com.mysql">
<driver-class>com.mysql.jdbc.Driver</driver-class>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
The Module.xml file located in JBOSS_HOME/modules/com/mysql/main
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.25-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
Inside of JBOSS_HOME/modules/com/mysql/main I have the mysql-connector-java-5.1.25-bin.jar
Web.xml Contents
<display-name>TicketApp</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>response.jsp</welcome-file>
</welcome-file-list>
Jboss-Web.xml Contents
Blank for now
It also appears that when I add in resource-ref tags to both the web.xml and jboss-web.xml file that everything blows up and I get the following errors from JBoss:
17:18:29,519 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "MyApp.war"
17:18:29,994 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC000001: Failed to start service jboss.deployment.unit."MyApp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyApp.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "MyApp.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_21]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_21]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011033: Could not load javax.sql.Datasource referenced in env-entry
at org.jboss.as.ee.component.deployers.ResourceReferenceProcessor.getResourceRefEntries(ResourceReferenceProcessor.java:159)
at org.jboss.as.ee.component.deployers.ResourceReferenceProcessor.processDescriptorEntries(ResourceReferenceProcessor.java:73)
at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:100)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
... 5 more
Caused by: java.lang.ClassNotFoundException: javax.sql.Datasource from [Module "deployment.TicketApp.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.as.ee.component.deployers.ResourceReferenceProcessor.getResourceRefEntries(ResourceReferenceProcessor.java:157)
... 8 more
17:18:30,009 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "MyApp.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MyApp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MyApp.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"MyApp.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011033: Could not load javax.sql.Datasource referenced in env-entry
Caused by: java.lang.ClassNotFoundException: javax.sql.Datasource from [Module \"deployment.MyApp.war:main\" from Service Module Loader]"}}
17:18:30,014 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment MyApp.war in 7ms
17:18:30,019 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.\"MyApp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MyApp.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"MyApp.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011033: Could not load javax.sql.Datasource referenced in env-entry
Caused by: java.lang.ClassNotFoundException: javax.sql.Datasource from [Module \"deployment.MyApp.war:main\" from Service Module Loader]"}}}}

ClassNotFoundException suggests to me that JBOSS isn't finding your MySQL JDBC driver classes.
Put the JARs in the JBOSS server /lib folder and see if that helps.
Update: Here's the pertinent line in the stack trace:
java.lang.ClassNotFoundException: javax.sql.Datasource
findjar.com says it should be ni one of these jars. Find it.

Related

How to configure Jakarta persistence on wildfly 21

Thank you and sorry in advance!
I am working on upgrading our wildfly version from 8 to 21.
Back in the days of 8, wildfly shipped with hibernate for the default persistence engine, it appears that now it ships with Jakarta. So, I am going through the process of attempting to get the persistence working and am running into the below-listed errors.
I have a clean download of wildly 21.0.2.Final, I have modified the standalone.xml to include my data sources which I believe are being loaded correctly because these lines that end up in the log.
10:48:46,578 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/unitTestDS]
10:48:46,578 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) WFLYJCA0001: Bound data source [java:jboss/datasources/localLiveDS]
persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="ertDatasource">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:jboss/datasources/localLiveDS</jta-data-source>
<properties>
<property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/>
<property name="hibernate.enable_lazy_load_no_trans" value="true"/>
</properties>
</persistence-unit>
</persistence>
test-persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="ertDatasource">
<jta-data-source>java:jboss/datasources/unitTestDS</jta-data-source>
<properties>
<property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/>
<property name="hibernate.enable_lazy_load_no_trans" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL9Dialect"/>
</properties>
</persistence-unit>
</persistence>
Here are the errors and warnings that I get when running the ./stabdalone.sh command
10:48:41,634 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-4) WFLYDM0111: Keystore /Applications/Wildfly/wildfly-21.0.2.Final-Clean/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
10:48:46,749 WARN [org.jboss.modules.define] (MSC service thread 1-5) Failed to define class org.hibernate.ejb.HibernatePersistence in Module "deployment.<project name>-api.war" from Service Module Loader: java.lang.IncompatibleClassChangeError: Failed to link org/hibernate/ejb/HibernatePersistence (Module "deployment.<project name>-api.war" from Service Module Loader): class org.hibernate.ejb.HibernatePersistence has interface org.hibernate.ejb.AvailableSettings as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
at org.jboss.modules.Module.loadModuleClass(Module.java:731)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.jboss.as.jpa.processor.PersistenceProviderHandler.deploy(PersistenceProviderHandler.java:73)
at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:49)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
10:48:46,751 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."<project name>-api.war".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."<project name>-api.war".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "<project name>-api.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IncompatibleClassChangeError: Failed to link org/hibernate/ejb/HibernatePersistence (Module "deployment.<project name>-api.war" from Service Module Loader): class org.hibernate.ejb.HibernatePersistence has interface org.hibernate.ejb.AvailableSettings as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
at org.jboss.modules.Module.loadModuleClass(Module.java:731)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.jboss.as.jpa.processor.PersistenceProviderHandler.deploy(PersistenceProviderHandler.java:73)
at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:49)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
... 8 more
10:48:46,815 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "<project name>-api.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"<project name>-api.war\".FIRST_MODULE_USE" => "WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"<project name>-api.war\"
Caused by: java.lang.IncompatibleClassChangeError: Failed to link org/hibernate/ejb/HibernatePersistence (Module \"deployment.<project name>-api.war\" from Service Module Loader): class org.hibernate.ejb.HibernatePersistence has interface org.hibernate.ejb.AvailableSettings as super class"}}
10:48:46,861 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 21.0.2.Final (WildFly Core 13.0.3.Final) started (with errors) in 22664ms - Started 336 of 599 services (1 services failed or missing dependencies, 373 services are lazy, passive or on-demand)
In the wildfly-root/modules/system/layers/base/javax/persistence/api/main folder I have the module.xml and the jakarta.persistence-api-2.2.3.jar
module.xml content
<?xml version="1.0" encoding="UTF-8"?>
<module name="javax.persistence.api" xmlns="urn:jboss:module:1.7">
<dependencies>
<!-- PersistenceUnitInfo needs javax.sql.DataSource -->
<module name="javax.api" export="true"/>
</dependencies>
<resources>
<resource-root path="jakarta.persistence-api-2.2.3.jar"/>
</resources>
</module>
I have added the Jakarta persistence dependency
<!-- https://mvnrepository.com/artifact/jakarta.persistence/jakarta.persistence-api -->
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>2.2.3</version>
</dependency>
I also have this, not sure if I need it though.
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.4.Final</version>
</dependency>
Wondering what dumb thing I am missing?
EDIT:
I have added this to the dependencyManagement section:
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>wildfly-jakartaee8-with-tools</artifactId>
<scope>import</scope>
<type>pom</type>
<version>21.0.2.Final</version>
</dependency>
And I now get this new error:
14:20:07,862 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 82) MSC000001: Failed to start service jboss.persistenceunit."eventhub-api.war#ertDatasource": org.jboss.msc.service.StartException in service jboss.persistenceunit."eventhub-api.war#ertDatasource": java.lang.AbstractMethodError
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:198)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:128)
at java.security.AccessController.doPrivileged(Native Method)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:659)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:213)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.AbstractMethodError
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:276)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:467)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1250)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:170)
... 10 more
14:20:07,865 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"eventhub-api.war#ertDatasource\"" => "java.lang.AbstractMethodError
Caused by: java.lang.AbstractMethodError"}}
WildFLy is throwing exception when deployment your application. Also You shouldn't link which is an API that is provided by WildFly except if you remove JPA support from WildFly. Also WildFly is compatible with jakartaEE 8 so you shouldn't link your deployment to some API provided by WildFLy.
For JakartaEE 9 you should use WildFly preview

How to debug ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener?

The error:
2016-04-12 12:32:04,399 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 62) HHH000230: Schema export complete
2016-04-12 12:32:04,753 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:870)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:242)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_66]
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.addListener(UndertowDeploymentInfoService.java:1145)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:734)
... 6 more
2016-04-12 12:32:05,109 INFO [org.jboss.weld.Bootstrap] (weld-worker-4) WELD-000119: Not generating any bean definitions from org.apache.struts2.tiles.StrutsTilesListener because of underlying class loading error: Type org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader] not found. If this is unexpected, enable DEBUG logging to see the full error.
2016-04-12 12:32:07,323 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "BanqueEE.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]"}}
2016-04-12 12:32:07,408 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "BanqueEE.ear" (runtime-name : "BanqueEE.ear")
2016-04-12 12:32:07,410 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
How to debug this error in Struts 2?
You have missed a library struts2-tiles-plugin-x.x.x.x.jar and probably their dependencies.
What you need is to add these libraries to the Deployment Assembly. It will help you to archive ear project and include dependencies that have equivalent manifest settings in their classpath.
If you want to know what is a Deployment Assembly you can read this article Eclipse : Java EE Module Dependencies is replaced by Web Deployment Assembly.
“Web Deployment Assembly“, which provide more powerful and flexible ways to configure the project packaging structure.
There's also a page that describes the process of linking external resources with the ear application: Web Application Development: Configuring Projects with External Resources.
Do you have some javaee api jar in your war ? Maybe a servlet.jar ? Please remove it, and check after that.

Tuxedo Integration with JBoss AS-7 using JCA

Currently I'm looking for solution to integrate Tuxedo with JBoss AS-7 using JCA which provided by the oracle. I downloaded the com.oracle.tuxedo.TuxedoAdapter.rar file from oracle. deployed it into jboss-as-7.1.1.Final\standalone\deployments.
After adding this I've added below in jboss-as-7.1.1.Final\standalone\configuration\standalone.xml in subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"
<resource-adapter>
<archive>com.oracle.tuxedo.TuxedoAdapter.rar</archive>
<transaction-support>NoTransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="com.oracle.tuxedo.adapter.spi.TuxedoManagedConnectionFactory" jndi-name="java:jboss/jca/tuxedo" enabled="true" use-java-context="false"/>
</connection-definitions>
</resource-adapter>
Now, after adding this I'm getting below error when I'm starting the app server,
14:50:20,642 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.ra.deployer."com.oracle.tuxedo.TuxedoAdapter": org.jboss.msc.service.StartException in service jboss.ra.deployer."com.oracle.tuxedo.TuxedoAdapter": JBAS010446: Failed to start RA deployment [com.oracle.tuxedo.TuxedoAdapter]
at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:103)
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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/D:/Development/jboss-as-7.1.1.Final/standalone/tmp/vfs/temp315113f896878c83/com.oracle.tuxedo.TuxedoAdapter.rar-2388b49206abf85a/contents/
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2179)
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1034)
at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:173)
at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:100)
... 5 more
Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: com.oracle.tuxedo.adapter.TuxedoFBCResourceAdapter
... 9 more
14:50:20,657 INFO [org.jboss.as] (MSC service thread 1-3) JBAS015951: Admin console listening on http://127.0.0.1:9990
I tried to fixed all the possible ways but unable to fix. I think I'm missing some configuration with Jboss/tuxedo. Can you guys help me on this?
Thanks in advance.
Ashish Mishra
You can disable RAR-validation with jboss-cli:
/subsystem=jca/archive-validation=archive-validation:write-attribute(name=enabled, value=false)

Spring Boot doesn't work on JBoss

I'm staring with Spring Boot and I tried to create the example available in the website (http://projects.spring.io/spring-boot/#quick-start). Everything worked fine when I ran the example as a standalone application (.jar) and also as a web application (.war) in my Tomcat server.
But when I moved the same .war file that worked on Tomcat to a JBoss 7.1 server it didn't work anymore. I'm getting this error:
Error calling onStartup for servlet container initializer: org.springframework.web.SpringServletContainerInitializer: java.lang.NoSuchMethodError: org.slf4j.bridge.SLF4JBridgeHandler.removeHandlersForRootLogger()V
I have no idea why this is happening. I google'd the but couldn't find anything related to Spring Boot. Can anybody please help me? The full stack trace is below. Thanks in advance!
13:43:10,009 WARN [org.jboss.as.ee] (MSC service thread 1-3) JBAS011006: Not installing optional component org.springframework.http.server.ServletServerHttpAsyncRequestControl due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.springframework.http.server.ServletServerHttpAsyncRequestControl
at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [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.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_10-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_10-ea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10-ea]
13:43:10,014 WARN [org.jboss.as.ee] (MSC service thread 1-3) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.springframework.web.context.request.async.StandardServletAsyncWebRequest
at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [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.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_10-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_10-ea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10-ea]
13:43:10,528 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ScheduledTasks]] (MSC service thread 1-15) Spring WebApplicationInitializers detected on classpath: [hello.HelloWebXml#31518afb]
13:43:10,695 INFO [org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer] (MSC service thread 1-15) Nothing to report: ApplicationContext not available
13:43:10,721 ERROR [org.jboss.web] (MSC service thread 1-15) JBAS018202: Error calling onStartup for servlet container initializer: org.springframework.web.SpringServletContainerInitializer: java.lang.NoSuchMethodError: org.slf4j.bridge.SLF4JBridgeHandler.removeHandlersForRootLogger()V
at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:70) [spring-boot-0.5.0.BUILD-SNAPSHOT.jar:0.5.0.BUILD-SNAPSHOT]
at org.springframework.boot.context.initializer.LoggingApplicationContextInitializer.initialize(LoggingApplicationContextInitializer.java:108) [spring-boot-0.5.0.BUILD-SNAPSHOT.jar:0.5.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.callNonEnvironmentAwareSpringApplicationInitializers(SpringApplication.java:371) [spring-boot-0.5.0.BUILD-SNAPSHOT.jar:0.5.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:291) [spring-boot-0.5.0.BUILD-SNAPSHOT.jar:0.5.0.BUILD-SNAPSHOT]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:130) [spring-boot-0.5.0.BUILD-SNAPSHOT.jar:0.5.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:90) [spring-boot-0.5.0.BUILD-SNAPSHOT.jar:0.5.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:53) [spring-boot-0.5.0.BUILD-SNAPSHOT.jar:0.5.0.BUILD-SNAPSHOT]
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:181) [spring-web-4.0.0.RELEASE.jar:4.0.0.RELEASE]
at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:148) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3845) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_10-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_10-ea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10-ea]
13:43:11,154 ERROR [org.jboss.web] (MSC service thread 1-15) JBAS018206: Webapp [/ScheduledTasks] is unavailable due to startup errors
13:43:11,155 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-15) Context [/ScheduledTasks] startup failed due to previous errors
13:43:11,219 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-15) MSC00001: Failed to start service jboss.web.deployment.default-host./ScheduledTasks: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./ScheduledTasks: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
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.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_10-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_10-ea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10-ea]
13:43:11,428 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "ScheduledTasks.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./ScheduledTasks" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./ScheduledTasks: JBAS018040: Failed to start context"}}
13:43:11,469 INFO [org.jboss.as.server.deployment] (MSC service thread 1-11) JBAS015877: Stopped deployment ScheduledTasks.war in 40ms
13:43:11,470 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./ScheduledTasks: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./ScheduledTasks: JBAS018040: Failed to start context
13:43:11,472 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.web.deployment.default-host./ScheduledTasks" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./ScheduledTasks: JBAS018040: Failed to start context"}}}}
JBoss 7 is a basket case, and I really recommend you use something else. If you really need to use it for some reason you should find the logging error goes away if you upgrade to Spring Boot 1.0.0.RC2. But there will still be other problems with JBoss. See my comment in Spring Java Config vs Jboss 7 for some help limping over the next likely obstacle.
Well the symptom means that Jboss is using a different version of SL4J which does not have that method.
You can do two things:
Go to Jboss lib folder -> Open the manifest file and check the version provider etc.
Then go to findjar.com and search for the package name. This will tell you that you need this jar - jul-to-slf4j-1.5.5.jar. Down load this jar and drop it in Jboss lib folder.
If you are using maven, then add the below dependency
<dependencies>
...
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.5</version>
</dependency>
...
</dependencies>

JBoss 7.0 Web profile appilcation doesn't start

I'm trying to start JBoss Web profile example application 'GestionFormation'. And got such exception:
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]
[UPDATE TO SHOW MY DATA SOURCE CONFIGURATION]
module.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>
standalone.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>
How can I fix this issue?
thanks in advance
I believe this happens because of a data source misconfiguration - a problem I'm also suffering. The error message text is wrong and confusing. See https://issues.jboss.org/browse/AS7-3190

Categories

Resources