when using this method
public List<Field> getFieldWithoutId(List<Integer> idSections) throws Exception {
try {
Connection conn = this.getConnection();
Array arraySections = conn.createArrayOf("int4", idSections.toArray());
this.log.info("Recupero field");
List<Field> fields = this.getJdbcTemplate().query(getFieldWithoutIdQuery, new Object[] {arraySections},ParameterizedBeanPropertyRowMapper.newInstance(Field.class));
/*if (!conn.isClosed())
conn.close();
*/
releaseConnection(conn);
return fields;
} catch (Exception e) {
e.printStackTrace();
throw new Exception("Errore.");
}
}
I have an exception at conn.createArrayOf("int4", idSections.toArray());.
The exception is:
javax.ejb.EJBException : Unexpected Error
java.lang.AbstractMethodError: org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;
postgresql-8.4-701.jdbc4.jar is in jboss/server/all/lib dir. Application is spring based with ejb3.
When working locally with the same setup everything is fine. This only happens on a preproduction environment. Only difference is locally I have jboss run in default mode, in the other case there are 2 jbosses in all configuration. I can’t track down the cause of this error. Could someone help me please?
This means that an abstract method which is declared in some API in the current runtime classpath is missing in the concrete implementation in the current runtime classpath.
Given the fact that it works fine in local environment, but not in preproduction environment, it would mean that the environments are using a different JBoss server version and/or that the deployed webapplication unnecessarily contains JBoss-specific libraries in the
/WEB-INF/lib. At least, the classpath is messed up. Cleanup it.