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". 

sábado, 8 de noviembre de 2014

UncategorizedSQLException: Error setting null for parameter (using Mybatis)

ERROR: UncategorizedSQLException: Error setting null for parameter #11
org.springframework.jdbc.UncategorizedSQLException:
Error setting null for parameter #11 with JdbcType OTHER .
Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException:
Invalid column type


Characteristics: Could be another parameter. The error happends when you try to insert a null value. In the mybatis configuration file you must specify the value you want to insert when the query received a NULL (even if its null).

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: Add on mybatis_config.xml the following setting:

<configuration>  ...
  <settings>
        <setting name="jdbcTypeForNull" value="NULL"/>
    </settings>

miércoles, 22 de octubre de 2014

Error occurred during initialization of VM Could not reserve enough space for object heap

ERROR: Error occurred during initialization of VM Could not reserve enough space for object heap

Characteristics: Could be another version of Java or Eclipse

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

Possible solution: Change the JDK. In this case I had JDK 1.6.0_21. Moving to Java7. Its a MUST than the JDK and Eclipse must be for 32 bits both. (or 64, but better 32).

Error JBAS014775

ERROR: Error JBAS014775

Characteristics: Could be another line refering to LDAP

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

Possible solution: Delete the line:  <security-domain>java:/jaas/LDAP</security-domain> from jboss-web.xml

Error JBWEB004036

ERROR: org.apache.jasper.JasperException: JBWEB004036: File "/tlds/struts-logic.tld" not found

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

Possible solution: Change URI of the tld. I recomend to change the URI of apache <%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %> on the JSP files.

Error: unmappable character for encoding UTF8

ERROR: error: unmappable character for encoding UTF8

Characteristics: Could be another enconding

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

Possible solution: On eclipse Go to -> build.xml ->  External Tools Configuration -> Select build.xml -> Common -> change encoding