Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Null Pointer when populating Grails Domain object with Oracle 10g long field

 
Jonathan MBaker
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are trying to populate a domain object from an oracle 10g database. The field in question is defined as a string in the domain object with the following constraints.

zdata(blank:false,maxSize:3000000)

The size of the data is approximately 70K of XML.

The table definition looks like this:

ZDATA NOT NULL LONG()

We are using the grails generated getter to access the table:

reportData = ReportData.get(reportDataId)

When making this call we are getting a null pointer exception. Here is a portion of our stack trace. java.lang.NullPointerException at java.lang.String.(String.java:176) at oracle.sql.CharacterSet.AL32UTF8ToString(CharacterSet.java:1518) at oracle.jdbc.driver.DBConversion.CharBytesToString(DBConversion.java:610) at oracle.jdbc.driver.DBConversion.CharBytesToString(DBConversion.java:555) at oracle.jdbc.driver.LongAccessor.getString(LongAccessor.java:217) at oracle.jdbc.driver.T4CLongAccessor.getString(T4CLongAccessor.java:426) at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:403) at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515) at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:224) at org.hibernate.type.StringType.get(StringType.java:18) at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163) at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154) at org.hibernate.loader.hql.QueryLoader.getResultColumnOrRow(QueryLoader.java:333) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:606) 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
 
Jonathan MBaker
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a known limitation of the oracle jdbc driver as listed in the release notes for version 10.2.0.1.0.

This known limitation has been fixed according to the release notes of Oracle JDBC Driver release 11.1.0.7.0
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic