DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andy Jefferson
Reporter: Mariusz Walania
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

NullPointerException when getting null blob from OracleBlobRDBMSMapping

Created: 27/Nov/09 04:37 PM   Updated: 26/Dec/09 12:56 PM   Resolved: 27/Nov/09 09:05 PM
Component/s: None
Affects Version/s: 1.1.6
Fix Version/s: 2.0.0.m4

File Attachments: 1. Java Source File (21 kB)
2. Zip Archive (3 kB)

Oracle Database 10g Express Edition Release - Product
Driver: ojdbc14.jar (

Datastore: Oracle

 Description  « Hide
When getting PersistenceCapable object, containing a byte[] field mapped to BLOB, NullPointerException is thrown.

1. autoCreateSchema and autoCreateColumns is set to false.
2. table is created with the script
3. some data is populated into this table but BLOB columns are null (they are NOT populated with EMPTY_BLOB() function)
4. PC objects mapped to this table are fetched with PersistenceManager -> NPE is thrown then.

I created a test for this issue. This test
- drops table (ignores if not exists)
- creates the table
- populates some data
- then by using PersistenceManager my PC object is fetched

Stacktrace for the test below:
at org.datanucleus.state.AbstractStateManager.replacingObjectField(
at org.datanucleus.test.MyClass1.jdoReplaceField(
at org.datanucleus.test.MyClass1.jdoReplaceFields(
at org.datanucleus.state.JDOStateManagerImpl.replaceFields(
at org.datanucleus.state.JDOStateManagerImpl.replaceFields(
at org.datanucleus.state.JDOStateManagerImpl.loadUnloadedFieldsInFetchPlan(
at org.datanucleus.state.JDOStateManagerImpl.loadFieldsInFetchPlan(
at org.datanucleus.ObjectManagerImpl.performDetachAllOnCommitPreparation(
at org.datanucleus.ObjectManagerImpl.preCommit(
at org.datanucleus.TransactionImpl.internalPreCommit(
at org.datanucleus.TransactionImpl.commit(
at org.datanucleus.jdo.JDOTransaction.commit(
at org.datanucleus.test.Main.getObject(
at org.datanucleus.test.Main.main(

Sort Order: Ascending order - Click to sort in descending order
Mariusz Walania added a comment - 27/Nov/09 04:38 PM

Mariusz Walania added a comment - 27/Nov/09 04:39 PM
Attaching fix proposal (

Andy Jefferson added a comment - 27/Nov/09 09:05 PM
SVN trunk has this. For future reference, would be easier to determine what you've changed by attaching a patch rather than the file itself, since it would be much much smaller and applyable to different branches

Mariusz Walania added a comment - 27/Nov/09 10:09 PM
I thought this issue would be resolved in 1.1.x branch too.
Isn't it developed parallely with trunk?

Andy Jefferson added a comment - 27/Nov/09 10:28 PM
As all docs say, 1.1 is over. People wanting development on it can easily sponsor such work, and also the time taken to do subsequent releases on it