EclipseLink 2.4 And JBOSS AS 7 project JPA EJB JSF - jsf

I'm trying to deploy and run a project with these particular technologies:
EJB3.1
Eclipse Link 2.4, JDBC 14.
Oracle 10g.
SJBOSS 7.
Java EE 6
I have been trying to make a Hello World example since 4 days and i don't have it runnning yet, right now i'm stuck with some weired erros.
This is what i have done until now:
We created the Eclipse Link module in Jboss
So i created the module in Jboss so i can access oracle Database:
<module xmlns="urn:jboss:module:1.0" name="org.eclipse.persistence">
<resources>
<resource-root path="eclipselink.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.apache.commons.collections"/>
<module name="org.dom4j"/>
<module name="org.javassist"/>
<module name="org.jboss.logging"/>
<module name="com.oracle.ojdbc14"/>
</dependencies>
</module>
After that i created the module for the oracle database in the xml file
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc14">
<resources>
<resource-root path="ojdbc14.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
finally i changed the Standalone.xml, this is the part of the standalone that i changed:
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:/EclipseLinkDS" pool-name="EclipseLinkDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:oracle:thin:localhost:1521:TOPLINK
</connection-url>
<driver>
oracle
</driver>
<transaction-isolation>
TRANSACTION_READ_COMMITTED
</transaction-isolation>
<pool>
<prefill>
true
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
codesa
</user-name>
<password>
codesa
</password>
</security>
</datasource>
<drivers>
<driver name="oracle" module="com.oracle.ojdbc14">
<driver-class>
oracle.jdbc.driver.OracleDriver
</driver-class>
<xa-datasource-class>
oracle.jdbc.xa.client.OracleXADataSource
</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
When i run the EJB PROJECT on eclipse i get the following erros:
16:19:29,204 INFO [org.jboss.jpa] (MSC service thread 1-2) read persistence.xml for em
16:19:29,333 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named CategoriaBase in deployment unit subdeployment "p.jar" of deployment "p_ear.ear" are as follows:
java:global/p_ear/p/CategoriaBase!base.CategoriaBaseRemote
java:app/p/CategoriaBase!base.CategoriaBaseRemote
java:module/CategoriaBase!base.CategoriaBaseRemote
java:global/p_ear/p/CategoriaBase!base.CategoriaBaseLocal
java:app/p/CategoriaBase!base.CategoriaBaseLocal
java:module/CategoriaBase!base.CategoriaBaseLocal
16:19:29,333 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named CategoriaBackingBean in deployment unit subdeployment "p_web.war" of deployment "p_ear.ear" are as follows:
java:global/p_ear/p_web/CategoriaBackingBean!backingbeans.CategoriaBackingBean
java:app/p_web/CategoriaBackingBean!backingbeans.CategoriaBackingBean
java:module/CategoriaBackingBean!backingbeans.CategoriaBackingBean
java:global/p_ear/p_web/CategoriaBackingBean
java:app/p_web/CategoriaBackingBean
java:module/CategoriaBackingBean
16:19:29,398 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."p_ear.ear"."p.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."p_ear.ear"."p.jar".INSTALL: Failed to process phase INSTALL of subdeployment "p.jar" of deployment "p_ear.ear"
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$Worker.runTask(Unknown Source) [:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_43]
at java.lang.Thread.run(Unknown Source) [:1.6.0_43]
Caused by: java.lang.NullPointerException
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addProviderProperties(PersistenceUnitDeploymentProcessor.java:346)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:253)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleJarDeployment(PersistenceUnitDeploymentProcessor.java:115)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:96)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
16:19:29,630 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "p_ear.ear" was rolled back with failure message {"Failed services" => {"jboss.deployment.subunit.\"p_ear.ear\".\"p.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"p_ear.ear\".\"p.jar\".INSTALL: Failed to process phase INSTALL of subdeployment \"p.jar\" of deployment \"p_ear.ear\""},"Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".component.CategoriaBackingBean.START missing [ jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\" ]","jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".jndiDependencyService missing [ jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\" ]","jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\".jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".module.p_ear.p_web.2 missing [ jboss.deployment.subunit.\"p_ear.ear\".\"p.jar\".component.CategoriaBase.VIEW.\"base.CategoriaBaseRemote\".REMOTE ]","jboss.naming.context.java.comp.p_ear.p.CategoriaBase.ValidatorFactory missing [ jboss.naming.context.java.comp.p_ear.p.CategoriaBase ]","jboss.naming.context.java.comp.p_ear.p.CategoriaBase.Validator missing [ jboss.naming.context.java.comp.p_ear.p.CategoriaBase ]","jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".component.\"backingbeans.CategoriaBackingBean\".START missing [ jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\" ]"]}
16:19:29,642 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) Stopped deployment p.jar in 12ms
16:19:29,651 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment p_web.war in 21ms
16:19:29,653 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment p_ear.ear in 24ms
16:19:29,655 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.subunit.\"p_ear.ear\".\"p.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"p_ear.ear\".\"p.jar\".INSTALL: Failed to process phase INSTALL of subdeployment \"p.jar\" of deployment \"p_ear.ear\""},"Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".component.CategoriaBackingBean.START missing [ jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\" ]","jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".jndiDependencyService missing [ jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\" ]","jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\".jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".module.p_ear.p_web.2 missing [ jboss.deployment.subunit.\"p_ear.ear\".\"p.jar\".component.CategoriaBase.VIEW.\"base.CategoriaBaseRemote\".REMOTE ]","jboss.naming.context.java.comp.p_ear.p.CategoriaBase.ValidatorFactory missing [ jboss.naming.context.java.comp.p_ear.p.CategoriaBase ]","jboss.naming.context.java.comp.p_ear.p.CategoriaBase.Validator missing [ jboss.naming.context.java.comp.p_ear.p.CategoriaBase ]","jboss.deployment.subunit.\"p_ear.ear\".\"p_web.war\".component.\"backingbeans.CategoriaBackingBean\".START missing [ jboss.naming.context.java.module.p_ear.p_web.\"env/backingbeans.CategoriaBackingBean/categoriaBean\" ]"]}}}
Anyone know how can i fix it ? I just need to make a good conexion in order to be able to develop the full app running.
If you got a tip or something, will be pretty appreciated.

Related

Migrate WildFly 26.x/27.x Mojarra to Jakarta 10 MyFaces 4.0.0.RC2

Using: WildFly 26.1.2.Final & Preview-27.0.0.Beta1 with Jakarta 10.0.
As an issue I have with PrimeFaces 'TabView' (7.x - 12.x) using Mojarra (now 4.0.0.SP01) with WildFly 26.1.2.Final/Preview-27.0.0.Beta1. It has been suggested I migrate to MyFaces.
I've followed the guides at:
https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/configuration_guide/javaserver_faces_jsf_configuration#doc-wrapper
&
https://docs.wildfly.org/26/Admin_Guide.html#Jakarta_Server_Faces
Set & run:
./jboss-cli.sh -c "/subsystem=jsf/:write-attribute(name=default-jsf-impl-slot,value=myfaces-4.0.0-RC2)"
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
{"outcome" => "success"}
Using MyFaces 4.0.0-RC2 I deploy my EAR & I get:
14:34:28,769 WARN [org.jboss.as.jsf] (MSC service thread 1-2) WFLYJSF0005: Unknown Jakarta Server Faces version 'myfaces-4.0.0-RC2'. Default version 'myfaces-4.0.0-RC2' will be used instead.
14:34:28,770 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."NOTiFYmoto.ear".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."NOTiFYmoto.ear".DEPENDENCIES: WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment "NOTiFYmoto.ear"
at org.jboss.as.server#19.0.0.Beta18//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
at org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0014: Default Jakarta Server Faces implementation slot 'myfaces-4.0.0-RC2' is invalid
at org.jboss.as.jsf#27.0.0.Beta1//org.jboss.as.jsf.deployment.JSFDependencyProcessor.deploy(JSFDependencyProcessor.java:94)
at org.jboss.as.server#19.0.0.Beta18//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
... 8 more
14:34:28,772 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "NOTiFYmoto.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".DEPENDENCIES" => "WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment \"NOTiFYmoto.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0014: Default Jakarta Server Faces implementation slot 'myfaces-4.0.0-RC2' is invalid"}}
14:34:28,773 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "NOTiFYmoto.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".DEPENDENCIES" => "WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment \"NOTiFYmoto.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0014: Default Jakarta Server Faces implementation slot 'myfaces-4.0.0-RC2' is invalid"}}
14:34:28,775 ERROR [org.jboss.as.server] (External Management Request Threads -- 1) WFLYSRV0021: Deploy of deployment "NOTiFYmoto.ear" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".DEPENDENCIES" => "WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment \"NOTiFYmoto.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0014: Default Jakarta Server Faces implementation slot 'myfaces-4.0.0-RC2' is invalid"}}
(2) Also both:
/usr/local/Cellar/wildfly-as/wildfly-preview-27.0.0.Beta1.MyFaces/modules/system/layers/base/org/wildfly/extension/clustering/web
References 'mojarra':
<module name="org.wildfly.clustering.faces.mojarra"/>
and:
/usr/local/Cellar/wildfly-as/wildfly-preview-27.0.0.Beta1.MyFaces/modules/system/layers/base/org/wildfly/extension/clustering
also references 'mojarra':
<module name="org.wildfly.clustering.faces.mojarra" xmlns="urn:jboss:module:1.9">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="wildfly-clustering-faces-mojarra-27.0.0.Beta1.jar"/>
This error when I follow the "Jakarta Server Faces Configuration".
Any pointers or ideas etc? TIA.

Stop wildfly war from initializing mojarra

Whenever I deploy a war to wildfly 8 or 10 (in this case it's a jax-rs service), I see the following line
[javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 151) Initializing Mojarra 2.2.11-jbossorg-1 20150505-1501 for context
Since JSF is not used in the application, is there a way to stop mojarra from being initialized?
Add a jboss-deployment-structure.xml file to your WEB-INF folder to stop deployment for a single war
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem name="jsf" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
You can remove
<subsystem xmlns="urn:jboss:domain:jsf:1.0"/>
from your profile.
It should stop Mojarra initialization.

404 not found on JSF after migration tomcat to wildfly 10

I have a small project on tomcat, it works well, now I decided to migrate to wildfly 10.
The deployment is ok but when I want to display my jsf (primefaces)pages, it's return me a 404 not found. I don't know what I have to do because I see any errors on the console. What's wrong, What's the problem?
My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>Watchlist</display-name>
<welcome-file-list>
<welcome-file>Search.xhtml</welcome-file>
</welcome-file-list>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>bluesky</param-value>
</context-param>
<servlet>
<servlet-name>facesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>facesServlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>
My primefaces page which return 404 not found ( this type of return is the same for all my xhtml pages). Even when i create a simple helloWorld.xhtml page, it's return me "404 not found" :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<style>
input[type=text] {
color: red;
text-align: left;
cursor: pointer;
display: block;
width: 70%;
}
::-webkit-input-placeholder {
color: grey;
}
fieldset {
width: 400px;
}
</style>
</h:head>
<body>
<h1>Test</h1>
<h:form method="post" action="Movies.xhtml">
<p:inputText type="text" value="#{tshiliflixBean.m.title}" placeholder="Rechercher un film, un artiste..."/>
<p:commandButton value="Rechercher " action="#{tshiliflixBean.ListFilmSearch()}"/>
</h:form>
</body>
</html>
My pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.TshiliDB.movieDB</groupId>
<artifactId>Tshiflix</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/javax.ejb/javax.ejb-api -->
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>javax.ejb-api</artifactId>
<version>3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api -->
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.github.wnameless</groupId>
<artifactId>json-flattener</artifactId>
<version>0.2.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
<!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-impl -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.12</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.23.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.2.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.2.2.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
</dependency>
<!-- Jersey 2.19 -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.23.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.23.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>1.7.21</version>
</dependency>
</dependencies>
</project>
My console view when, i start my wildfly server:
19:04:00,505 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
19:04:00,685 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
19:04:00,750 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) starting
19:04:01,566 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found Tshiflix-0.0.1-SNAPSHOT.war in deployment directory. To trigger deployment create a file called Tshiflix-0.0.1-SNAPSHOT.war.dodeploy
19:04:01,605 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
19:04:01,619 INFO [org.xnio] (MSC service thread 1-7) XNIO version 3.3.4.Final
19:04:01,625 INFO [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.3.4.Final
19:04:01,649 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
19:04:01,658 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem.
19:04:01,664 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
19:04:01,671 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
19:04:01,688 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension
19:04:01,689 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem
19:04:01,689 INFO [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem
19:04:01,698 INFO [org.jboss.as.security] (MSC service thread 1-6) WFLYSEC0001: Current PicketBox version=4.9.4.Final
19:04:01,713 INFO [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.2.Final)
19:04:01,799 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
19:04:01,800 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0003: Undertow 1.3.15.Final starting
19:04:01,800 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0003: Undertow 1.3.15.Final starting
19:04:01,811 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = h2
19:04:01,815 INFO [org.jboss.remoting] (MSC service thread 1-8) JBoss Remoting version 4.0.18.Final
19:04:01,830 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
19:04:01,831 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.39-bin.jar
19:04:01,847 INFO [org.jboss.as.naming] (MSC service thread 1-1) WFLYNAM0003: Starting Naming Service
19:04:01,848 INFO [org.jboss.as.mail.extension] (MSC service thread 1-7) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
19:04:01,954 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path '/Users/Tshili/Documents/Library/wildfly-10.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
19:04:01,987 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0012: Started server default-server.
19:04:01,989 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0018: Host default-host starting
19:04:02,026 INFO [org.jboss.as.ejb3] (MSC service thread 1-4) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 128 (per class), which is derived from thread worker pool sizing.
19:04:02,026 INFO [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 32 (per class), which is derived from the number of CPUs on this host.
19:04:02,076 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:9090
19:04:02,154 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:/dsWatchlist]
19:04:02,154 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
19:04:02,247 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) WFLYDS0013: Started FileSystemDeploymentService for directory /Users/Tshili/Documents/Library/wildfly-10.0.0.Final/standalone/deployments
19:04:02,253 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "Tshiflix-0.0.1-SNAPSHOT.war" (runtime-name: "Tshiflix-0.0.1-SNAPSHOT.war")
19:04:02,253 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "Tshiflix2.war" (runtime-name: "Tshiflix2.war")
19:04:02,471 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-6) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
19:04:02,471 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-8) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
19:04:02,471 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
19:04:02,480 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.1.3.Final (Apache CXF 3.1.4)
19:04:04,093 INFO [org.jboss.as.jpa] (MSC service thread 1-4) WFLYJPA0002: Read persistence.xml for Watchlist
19:04:04,146 INFO [org.jboss.as.jpa] (MSC service thread 1-7) WFLYJPA0002: Read persistence.xml for Watchlist
19:04:04,274 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 58) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'Tshiflix-0.0.1-SNAPSHOT.war#Watchlist'
19:04:04,295 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 58) HHH000204: Processing PersistenceUnitInfo [
name: Watchlist
...]
19:04:04,295 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'Tshiflix2.war#Watchlist'
19:04:04,296 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 59) HHH000204: Processing PersistenceUnitInfo [
name: Watchlist
...]
19:04:04,342 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) WFLYWELD0003: Processing weld deployment Tshiflix-0.0.1-SNAPSHOT.war
19:04:04,378 INFO [org.hibernate.Version] (ServerService Thread Pool -- 59) HHH000412: Hibernate Core {5.0.7.Final}
19:04:04,379 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000206: hibernate.properties not found
19:04:04,381 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000021: Bytecode provider name : javassist
19:04:04,396 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment Tshiflix2.war
19:04:04,418 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 5.2.3.Final
19:04:04,425 INFO [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 58) HHH90000001: Found usage of deprecated setting for specifying Scanner [hibernate.ejb.resource_scanner]; use [hibernate.archive.scanner] instead
19:04:04,425 INFO [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 59) HHH90000001: Found usage of deprecated setting for specifying Scanner [hibernate.ejb.resource_scanner]; use [hibernate.archive.scanner] instead
19:04:04,438 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 59) HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
19:04:04,502 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'watchlistDAO' in deployment unit 'deployment "Tshiflix2.war"' are as follows:
java:global/Tshiflix2/watchlistDAO!com.Tshiflix.DAO.WatchlistImpl
java:app/Tshiflix2/watchlistDAO!com.Tshiflix.DAO.WatchlistImpl
java:module/watchlistDAO!com.Tshiflix.DAO.WatchlistImpl
java:global/Tshiflix2/watchlistDAO
java:app/Tshiflix2/watchlistDAO
java:module/watchlistDAO
19:04:04,502 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-3) WFLYEJB0473: JNDI bindings for session bean named 'watchlistDAO' in deployment unit 'deployment "Tshiflix-0.0.1-SNAPSHOT.war"' are as follows:
java:global/Tshiflix-0.0.1-SNAPSHOT/watchlistDAO!com.Tshiflix.DAO.WatchlistImpl
java:app/Tshiflix-0.0.1-SNAPSHOT/watchlistDAO!com.Tshiflix.DAO.WatchlistImpl
java:module/watchlistDAO!com.Tshiflix.DAO.WatchlistImpl
java:global/Tshiflix-0.0.1-SNAPSHOT/watchlistDAO
java:app/Tshiflix-0.0.1-SNAPSHOT/watchlistDAO
java:module/watchlistDAO
19:04:04,685 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:04:04,687 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:04:04,688 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:04:04,689 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
19:04:04,867 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.cj.jdbc.Driver (version 6.0)
19:04:04,869 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) WFLYWELD0006: Starting Services for CDI deployment: Tshiflix-0.0.1-SNAPSHOT.war
19:04:04,904 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.cj.jdbc.Driver (version 6.0)
19:04:04,904 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0006: Starting Services for CDI deployment: Tshiflix2.war
19:04:04,904 INFO [org.jboss.weld.Version] (MSC service thread 1-3) WELD-000900: 2.3.2 (Final)
19:04:04,943 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = Tshiflix-0.0.1-SNAPSHOT.war_com.mysql.cj.jdbc.Driver_6_0
19:04:04,943 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0018: Started Driver service with driver-name = Tshiflix2.war_com.mysql.cj.jdbc.Driver_6_0
19:04:04,944 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0009: Starting weld service for deployment Tshiflix2.war
19:04:04,944 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0009: Starting weld service for deployment Tshiflix-0.0.1-SNAPSHOT.war
19:04:05,031 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 59) WFLYCLINF0002: Started client-mappings cache from ejb container
19:04:05,129 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 58) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'Tshiflix2.war#Watchlist'
19:04:05,129 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'Tshiflix-0.0.1-SNAPSHOT.war#Watchlist'
19:04:05,473 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 59) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
19:04:05,473 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 58) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
19:04:05,517 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 58) Envers integration enabled? : true
19:04:05,517 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 59) Envers integration enabled? : true
19:04:06,758 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 69) Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12#14885) for context '/Tshiflix2'
19:04:06,758 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 66) Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12#14885) for context '/Tshiflix-0.0.1-SNAPSHOT'
19:04:08,152 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 69) Monitoring file:/Users/Tshili/Documents/Library/wildfly-10.0.0.Final/standalone/tmp/vfs/temp/temp33c1df153414a973/content-a01220796e5c75cd/WEB-INF/faces-config.xml for modifications
19:04:08,163 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 69) Running on PrimeFaces 6.0
19:04:08,163 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 66) Running on PrimeFaces 6.0
19:04:08,181 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 69) WFLYUT0021: Registered web context: /Tshiflix2
19:04:08,182 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 66) WFLYUT0021: Registered web context: /Tshiflix-0.0.1-SNAPSHOT
19:04:08,205 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "Tshiflix2.war" (runtime-name : "Tshiflix2.war")
19:04:08,206 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "Tshiflix-0.0.1-SNAPSHOT.war" (runtime-name : "Tshiflix-0.0.1-SNAPSHOT.war")
19:04:08,276 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
19:04:08,277 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
19:04:08,279 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started in 8076ms - Started 792 of 1066 services (394 services are lazy, passive or on-demand)
I found myself where is the problem. My web.xml wasn't good. I post the good one for somebody who will have the same issue than me
> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>Watchlist</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/Tshiflix-0.0.1-SNAPSHOT/Search.xhtml</welcome-file>
</welcome-file-list>
</web-app>

Spring jms failing to connect to Websphere MQ - Resource Exception

Issue: Getting resource exception at runtime attempting to connect to a websphere mq to get a jms message using spring. I just can't determine what I am missing?
Description:
Attempting to set up the example here. Spring MDP Activation Spec for Websphere MQ.
http://stackoverflow.com/questions/14523572/spring-jms-and-websphere-mq
Maven Dependencies
Note: Version numbers for the ibm jars looks odd because I created a local repo in my project to add the 3rd party libraries. I'm taking the ibm jars from my local Websphere SDP version for Websphere 7.5 . I also tried directly adding the jar dependencies on the STS spring package and had the same error.
Spring Config XML
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
xmlns:jms="http://www.springframework.org/schema/jms"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-4.1.xsd
http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms-4.1.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-4.1.xsd">
<bean id="messageListener" class="myproject.spring.integration.mq.SpringMdp" />
<bean id="messageListener" class="com.rohid.samples.SpringMdp" />
<bean class="org.springframework.jms.listener.endpoint.JmsMessageEndpointManager">
<property name="activationSpec">
<bean class="com.ibm.mq.connector.inbound.ActivationSpecImpl">
<property name="destinationType" value="javax.jms.Queue"/>
<property name="destination" value="QUEUE1"/>
<property name="hostName" value="A.B.C"/>
<property name="queueManager" value="QM_"/>
<property name="port" value="1414"/>
<property name="channel" value="SYSTEM.ADMIN.SVNNN"/>
<property name="transportType" value="CLIENT"/>
<property name="userName" value="abc"/>
<property name="password" value="jabc"/>
</bean>
</property>
<property name="messageListener" ref="messageListener"/>
<property name="resourceAdapter" ref="myResourceAdapterBean"/>
</bean>
<bean id="myResourceAdapterBean" org.springframework.jca.support.ResourceAdapterFactoryBean">
<property name="resourceAdapter">
<bean class="com.ibm.mq.connector.ResourceAdapterImpl">
<property name="maxConnections" value="50"/>
</bean>
</property>
<property name="workManager">
<bean class="org.springframework.jca.work.SimpleTaskWorkManager"/>
</property>
</bean>
</beans>
Stack Trace:
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.jms.listener.endpoint.JmsMessageEndpointManager#0' defined in class path resource [context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/resource/ResourceException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1101)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at myproject.spring.integration.mq.Main.main(Main.java:9)
Caused by: java.lang.NoClassDefFoundError: javax/resource/ResourceException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getDeclaredConstructor(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1094)
... 13 more
Caused by: java.lang.ClassNotFoundException: javax.resource.ResourceException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 19 more
Updated- Solution: Required IBM Jar dependencies required.
Generally the easiest way to get the classpath right in RAD or other IBM tools for applications that are ultimately going to be deployed to WAS is to load the server runtime library of the WAS version into your app.
It is very easy. Go to the app properties page, go to build path, libraries tab and click add Library. You will see the screen shot below. Choose server runtimes and as long as you have installed the correct WAS versions as part of RAD, you will see their runtimes.
This is generally the best way to go since it allows you to keep you WAS libraries separate from your app, but to still make them available for compilation. The worst thing you can do is embed WAS libraries as part of your app. If you do this and you deploy your app to different versions of WAS, then you will get weird classpath or weird runtime errors. On top of that, things that were working might stop working after fixpacks get applied or other software adjustments.
If you add the server runtime library, then this is what your app will look like in RAD.
Looks like you are missing some dependencies here. Can you try to add javaee-api to your pom file?
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version> <!-- or take version 7.0 if needed -->
</dependency>

Unable to obtain com.sun.faces.flow.FlowDiscoveryCDIExtension. Flows described with javax.faces.flow.builder.FlowDefinition are unavailable

21:39:39,453 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (Se
rverService Thread Pool -- 103) Unable to obtain com.sun.faces.flow.FlowDiscover
yCDIExtension from CDI implementation. Flows described with javax.faces.flow.bu
ilder.FlowDefinition are unavailable.
I'm using Jboss EAP 6.1, with CDI, Hibernate, and JSF 2.2. I thought it might be caused by JSF 2.2, so I changed the face-config.xml to 2.0, but the error still exist.
I followed this guide: https://developer.jboss.org/thread/203257
This is what my module looks like:
This is what my module.xml looks like:
<dependencies>
<module name="javax.faces.api"/>
<module name="javaee.api"/>
<module name="javax.servlet.jstl.api"/>
<module name="org.apache.xerces" services="import"/>
<module name="org.apache.xalan" services="import"/>
</dependencies>
<resources>
<resource-root path="jsf-impl-2.2.7.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.el.api" export="true"/>
<module name="javax.servlet.api" export="true"/>
<module name="javax.servlet.jsp.api" export="true"/>
<module name="javax.servlet.jstl.api" export="true"/>
<module name="javax.validation.api" export="true"/>
<module name="com.sun.jsf-impl"/>
</dependencies>
<resources>
<resource-root path="jsf-api-2.2.7.jar"/>
<!-- Insert resources here -->
</resources>
How did you switch to JSF 2.2?
If you included jar files in your war/ear file then one of these is loading and trying to load a CDI extension but the jar containing that class is not available. Try removing any JSF jars from your deployment archive and see if it goes away.
If you added it to your server as a module you may have missed a jar file or dependent module that is part of the JSF module from the definition. Remove the changed or added module and see if it goes away.

Resources