java.lang.AbstractMethodError: com.ibm.db2.jcc.am.kn.setCharacterStream(ILjava/io/Reader;J)V
Issue
- We are upgrading codes from WAS to
EAP 6.4
, and using HibernateJPA 2
which throws exception on persistent inDB2
, however we foundEJB
persistence that is working in WAS not working in EAP and following exception is thrown:
12:00:01,296 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 3) SQL Error: 0, SQLState: null
12:00:01,296 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 3) Method is not implemented by JDBC driver
12:00:01,296 ERROR [org.jboss.as.ejb3] (EJB default - 3) JBAS014268: Failure in caller transaction.: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not insert: [test]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:881) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:89) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
.......
......
Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [test]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:65) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2987) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
......
... 118 more
Caused by: java.sql.SQLFeatureNotSupportedException: Method is not implemented by JDBC driver
at org.jboss.jca.adapters.jdbc.WrappedConnection.checkException(WrappedConnection.java:1636)
......
... 137 more
Caused by: java.lang.AbstractMethodError: com.ibm.db2.jcc.am.kn.setCharacterStream(ILjava/io/Reader;J)V
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setCharacterStream(WrappedPreparedStatement.java:1447)
... 146 mo
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=TEST.HIBERNATE_SEQUENCE, DRIVER=4.12.55
at com.ibm.db2.jcc.am.hd.a(hd.java:676)
at com.ibm.db2.jcc.am.hd.a(hd.java:60)
at com.ibm.db2.jcc.am.hd.a(hd.java:127)
....
....
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:82) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
......
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-798, SQLSTATE=428C9, SQLERRMC=ID, DRIVER=4.12.55
at com.ibm.db2.jcc.am.hd.a(hd.java:676)
at com.ibm.db2.jcc.am.hd.a(hd.java:60)
......
@Entity
@Table(name="table")
public class test implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private long id;
..
...
- Here is the code segment for reference and the persistence code segment. The
persistence.xm
l is:
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"/>
<property name="hibernate.show_sql" value="false" />
</properties>
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.