[jboss-user] [EJB 3.0 Users] - NullPointerException using BLOBs with DB2 (Hibernate EJB3)

ejb3workshop do-not-reply at jboss.com
Wed Sep 30 10:57:29 EDT 2009


When trying to read a entity containing a BLOB from DB2 I get a NullPointerException. I haven't quite narrowed the exact size limit down, but it's about at 1MB. Content smaller then this barrier and there is no problem. My guess is that this is some strange driver issue, but searching the web has not produced any results. Using the same application with SQL Server 2005 works fine. I am using JBoss 4.2.3 with DB2 9.5. The type 4 driver breaks DB2 and causes it to shutdown, so I am using the type 2 driver.

Any suggestion on what I could do to further narrow down are welcome.

Thanks in advance
Alex

anonymous wrote : java.lang.NullPointerException
  |         at com.ibm.db2.jcc.uw.UWConnection.a(UWConnection.java:959)
  |         at com.ibm.db2.jcc.a.p.e(p.java:281)
  |         at com.ibm.db2.jcc.t4.a.e(a.java:451)
  |         at com.ibm.db2.jcc.a.gl.a(gl.java:4792)
  |         at com.ibm.db2.jcc.a.eg.a(eg.java:292)
  |         at com.ibm.db2.jcc.a.eg.b(eg.java:248)
  |         at com.ibm.db2.jcc.a.ce.a(ce.java:277)
  |         at com.ibm.db2.jcc.a.be.getBytes(be.java:99)
  |         at com.ibm.db2.jcc.a.ce.getBytes(ce.java:136)
  |         at org.hibernate.type.ByteArrayBlobType.get(ByteArrayBlobType.java:90)
  |         at org.hibernate.type.AbstractLobType.nullSafeGet(AbstractLobType.java:46)
  |         at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
  |         at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2096)
  |         at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
  |         at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
  |         at org.hibernate.loader.Loader.getRow(Loader.java:1206)
  |         at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
  |         at org.hibernate.loader.Loader.doQuery(Loader.java:701)
  |         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
  |         at org.hibernate.loader.Loader.doList(Loader.java:2220)
  |         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
  |         at org.hibernate.loader.Loader.list(Loader.java:2099)
  |         at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
  |         at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
  |         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
  |         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
  |         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
  |         at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257874#4257874

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257874



More information about the jboss-user mailing list