jueves, 28 de septiembre de 2017

Failed to define class org.springframework.scheduling.quartz.JobDetailBean in Module "deployment.grep-web.war:main"

ERROR: Failed to define class org.springframework.scheduling.quartz.JobDetailBean in Module "deployment.grep-web.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/springframework/scheduling/quartz/JobDetailBean


Characteristics: The aplicacion doesnt deploy or it fails suddenly when trying to use certainly JAR. The message ask for the JAR. Quartz in this case.

Situation: Using ANT as a compiler, MYBATIS 3.2.7, JDK 1.7.0_51, Struts, Eclipse Kepler, Windows 7, Jboss EAP 6.1

Possible solution: Open the WAR to see if in the WEB-INF/lib directory exists the JAR quartz.xxx.jar.

If not, the JAR is not being included, you could copy it manualy or add on the proper route in the proyect (Or include from Maven).

Error creating bean with name 'dataSourceDb' defined in class path...

ERROR:  Error creating bean with name 'dataSourceDb' defined in class path resource [com/ProjectX/conf/spring/spring-datasource.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: java:XXXDbDS


Characteristics: Is not possible to find the datasource in the location provided. Is not posible to use the DAO, is not possible to deploy correctly the aplicación in Jboss.

Situation: Using ANT as a compiler, MYBATIS 3.2.7, JDK 1.7.0_51, Spring 4.0.6.RELEASE, Eclipse Kepler, Windows 7, Jboss EAP 6.1

Possible solution: 
1) Check that the DataSource is defined on theXML ${JBOSS_DIR}/standalone/configuration/standalone.xml
2) The DataSource Name (java:XXXDbDS) should look similar to:
<datasource jndi-name="java:/jboss/datasources/XXXDbDS" pool-name="XXXDbDS" enabled="true" use-java-context="true">

And also must be the same than the DataSource on the aplication "spring-datasource.xml" -> in this case:  "java:/jboss/datasources/XXXDbDS".