Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Trying to persist @Lob field throws NullPointerException
Trying to persist @Lob field throws NullPointerException [message #389406] Thu, 04 June 2009 19:06 Go to next message
Torben Putkonen is currently offline Torben PutkonenFriend
Messages: 34
Registered: July 2009
Member
My program is running on top of Oracle AS, and uses Oracle DB. When I try
to persist an entity with CLOB field, I get NullPointerException during
commit:

[EL Warning]: 2009-06-04
12:49:08.19--UnitOfWork(24314884)--Thread(Thread[RMICallHand ler-4,5,HTTPThreadGroup])--java.lang.NullPointerException
at
oracle.oc4j.sql.spi.ConnectionHandle.oc4j_getCachedObject(Co nnectionHandle.java:549)
at oracle_jdbc_driver_T4CConnection_Proxy.prepareStatement()
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.prepareStatement(DatabaseAccessor.java:1354)
...

Entity has @Lob annotation:

...
@Lob
private String field;
...

If I comment out @Lob field from the entity, persisting works. I have
verified that the exception is thrown with both EclipseLink 1.1.0 and
1.1.1. With TopLink Essentials the same entity works fine.
Re: Trying to persist @Lob field throws NullPointerException [message #389407 is a reply to message #389406] Fri, 05 June 2009 07:47 Go to previous messageGo to next message
Torben Putkonen is currently offline Torben PutkonenFriend
Messages: 34
Registered: July 2009
Member
Here is a stack trace with changed class and package names. EclipseLink
1.1.1.

[EL Finer]: 2009-06-05
10:35:55.79--ServerSession(31945752)--Thread(Thread[RMICallH andler-5,5,HTTPThreadGroup])--client
acquired
[EL Finer]: 2009-06-05
10:35:55.79--UnitOfWork(26864146)--Thread(Thread[RMICallHand ler-5,5,HTTPThreadGroup])--TX
binding to tx mgr, status=STATUS_ACTIVE
[EL Finest]: 2009-06-05
10:35:55.79--UnitOfWork(26864146)--Thread(Thread[RMICallHand ler-5,5,HTTPThreadGroup])--PERSIST
operation called on: com.mypackage.entities.MyTable@1d66fa5.
[EL Finest]: 2009-06-05
10:35:55.791--ClientSession(20705522)--Thread(Thread[RMICall Handler-5,5,HTTPThreadGroup])--Execute
query ValueReadQuery(sql="SELECT MY_IDSEQ.NEXTVAL FROM DUAL")
[EL Finest]: 2009-06-05
10:35:55.791--ServerSession(31945752)--Thread(Thread[RMICall Handler-5,5,HTTPThreadGroup])--reconnecting
to external connection pool
[EL Fine]: 2009-06-05
10:35:55.792--ServerSession(31945752)--Connection(25739042)- -Thread(Thread[RMICallHandler-5,5,HTTPThreadGroup])--SELECT
MY_IDSEQ.NEXTVAL FROM DUAL
[EL Finest]: 2009-06-05
10:35:55.793--ServerSession(31945752)--Thread(Thread[RMICall Handler-5,5,HTTPThreadGroup])--sequencing
preallocation for MY_IDSEQ: objects: 50 , first: 1,451, last: 1,500
[EL Finest]: 2009-06-05
10:35:55.794--UnitOfWork(26864146)--Thread(Thread[RMICallHan dler-5,5,HTTPThreadGroup])--assign
sequence to the object (1,451 -> com.mypackage.entities.MyTable@1d66fa5)
[EL Finer]: 2009-06-05
10:35:55.794--UnitOfWork(26864146)--Thread(Thread[RMICallHan dler-5,5,HTTPThreadGroup])--TX
beforeCompletion callback, status=STATUS_ACTIVE
[EL Finer]: 2009-06-05
10:35:55.794--UnitOfWork(26864146)--Thread(Thread[RMICallHan dler-5,5,HTTPThreadGroup])--begin
unit of work commit
[EL Finer]: 2009-06-05
10:35:55.794--ClientSession(20705522)--Thread(Thread[RMICall Handler-5,5,HTTPThreadGroup])--TX
beginTransaction, status=STATUS_ACTIVE
[EL Finest]: 2009-06-05
10:35:55.795--UnitOfWork(26864146)--Thread(Thread[RMICallHan dler-5,5,HTTPThreadGroup])--Execute
query InsertObjectQuery(com.mypackage.entities.MyTable@1d66fa5)
[EL Finest]: 2009-06-05
10:35:55.798--ClientSession(20705522)--Thread(Thread[RMICall Handler-5,5,HTTPThreadGroup])--reconnecting
to external connection pool
[EL Fine]: 2009-06-05
10:35:55.798--ClientSession(20705522)--Connection(12293884)- -Thread(Thread[RMICallHandler-5,5,HTTPThreadGroup])--INSERT
INTO MY_TABLE (ID, CONTENT) VALUES (?, ?)
bind => [1451, ]
[EL Fine]: 2009-06-05
10:35:55.844--ClientSession(20705522)--Connection(12293884)- -Thread(Thread[RMICallHandler-5,5,HTTPThreadGroup])--SELECT
CONTENT FROM MY_TABLE WHERE (ID = ?) FOR UPDATE
bind => [1451]
[EL Warning]: 2009-06-05
10:35:55.904--UnitOfWork(26864146)--Thread(Thread[RMICallHan dler-5,5,HTTPThreadGroup])--java.lang.NullPointerException
at
oracle.oc4j.sql.spi.ConnectionHandle.oc4j_getCachedObject(Co nnectionHandle.java:549)
at oracle_jdbc_driver_T4CConnection_Proxy.prepareStatement()
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.prepareStatement(DatabaseAccessor.java:1354)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.prepareStatement(DatabaseAccessor.java:1303)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseCall .prepareStatement(DatabaseCall.java:646)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.basicExecuteCall(DatabaseAccessor.java:551)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.executeCall(DatabaseAccessor.java:501)
at
org.eclipse.persistence.internal.helper.LOBValueWriter.build AndExecuteCall(LOBValueWriter.java:71)
at
org.eclipse.persistence.internal.helper.LOBValueWriter.build AndExecuteSelectCalls(LOBValueWriter.java:182)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.flushSelectCalls(DatabaseAccessor.java:135)
at
org.eclipse.persistence.internal.queries.DatasourceCallQuery Mechanism.insertObject(DatasourceCallQueryMechanism.java:350 )
at
org.eclipse.persistence.internal.queries.StatementQueryMecha nism.insertObject(StatementQueryMechanism.java:162)
at
org.eclipse.persistence.internal.queries.StatementQueryMecha nism.insertObject(StatementQueryMechanism.java:177)
at
org.eclipse.persistence.internal.queries.DatabaseQueryMechan ism.insertObjectForWrite(DatabaseQueryMechanism.java:461)
at
org.eclipse.persistence.queries.InsertObjectQuery.executeCom mit(InsertObjectQuery.java:80)
at
org.eclipse.persistence.queries.InsertObjectQuery.executeCom mitWithChangeSet(InsertObjectQuery.java:90)
at
org.eclipse.persistence.internal.queries.DatabaseQueryMechan ism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:28 6)
at
org.eclipse.persistence.queries.WriteObjectQuery.executeData baseQuery(WriteObjectQuery.java:58)
at
org.eclipse.persistence.queries.DatabaseQuery.execute(Databa seQuery.java:664)
at
org.eclipse.persistence.queries.DatabaseQuery.executeInUnitO fWork(DatabaseQuery.java:583)
at
org.eclipse.persistence.queries.ObjectLevelModifyQuery.execu teInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery. java:109)
at
org.eclipse.persistence.queries.ObjectLevelModifyQuery.execu teInUnitOfWork(ObjectLevelModifyQuery.java:86)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.int ernalExecuteQuery(UnitOfWorkImpl.java:2755)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1181)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1165)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1125)
at
org.eclipse.persistence.internal.sessions.CommitManager.comm itNewObjectsForClassWithChangeSet(CommitManager.java:195)
at
org.eclipse.persistence.internal.sessions.CommitManager.comm itAllObjectsWithChangeSet(CommitManager.java:103)
at
org.eclipse.persistence.internal.sessions.AbstractSession.wr iteAllObjectsWithChangeSet(AbstractSession.java:3175)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToDatabase(UnitOfWorkImpl.java:1298)
at
org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:468)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1398)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.iss ueSQLbeforeCompletion(UnitOfWorkImpl.java:3022)
at
org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.j ava:224)
at
org.eclipse.persistence.transaction.AbstractSynchronizationL istener.beforeCompletion(AbstractSynchronizationListener.jav a:157)
at
org.eclipse.persistence.transaction.JTASynchronizationListen er.beforeCompletion(JTASynchronizationListener.java:68)
at
com.evermind.server.ApplicationServerTransaction.callBeforeC ompletion(ApplicationServerTransaction.java:1066)
at
com.evermind.server.ApplicationServerTransaction.doCommit(Ap plicationServerTransaction.java:275)
at
com.evermind.server.ApplicationServerTransaction.commit(Appl icationServerTransaction.java:162)
at
com.evermind.server.ApplicationServerTransactionManager.comm it(ApplicationServerTransactionManager.java:472)
at com.mypackage.MyBean.doTheDeed(MyBean.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointIm pl.invoke(EJBJoinPointImpl.java:35)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.SetContextActionI nterceptor.invoke(SetContextActionInterceptor.java:44)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.DMSInterceptor.in voke(DMSInterceptor.java:52)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.TxBeanManagedInte rceptor.invoke(TxBeanManagedInterceptor.java:53)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.DMSInterceptor.in voke(DMSInterceptor.java:52)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.InvocationContextPool.invoke(Invocat ionContextPool.java:55)
at
com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invok eMethod(StatelessSessionEJBObject.java:87)
at
OrganizationUpdater_RemoteProxy_1d98pf4.updateOrganizations( Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java :53)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker. run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

[EL Warning]: 2009-06-05
10:35:55.906--UnitOfWork(26864146)--Thread(Thread[RMICallHan dler-5,5,HTTPThreadGroup])--java.lang.NullPointerException
at
oracle.oc4j.sql.spi.ConnectionHandle.oc4j_getCachedObject(Co nnectionHandle.java:549)
at oracle_jdbc_driver_T4CConnection_Proxy.prepareStatement()
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.prepareStatement(DatabaseAccessor.java:1354)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.prepareStatement(DatabaseAccessor.java:1303)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseCall .prepareStatement(DatabaseCall.java:646)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.basicExecuteCall(DatabaseAccessor.java:551)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.executeCall(DatabaseAccessor.java:501)
at
org.eclipse.persistence.internal.helper.LOBValueWriter.build AndExecuteCall(LOBValueWriter.java:71)
at
org.eclipse.persistence.internal.helper.LOBValueWriter.build AndExecuteSelectCalls(LOBValueWriter.java:182)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.flushSelectCalls(DatabaseAccessor.java:135)
at
org.eclipse.persistence.internal.queries.DatasourceCallQuery Mechanism.insertObject(DatasourceCallQueryMechanism.java:350 )
at
org.eclipse.persistence.internal.queries.StatementQueryMecha nism.insertObject(StatementQueryMechanism.java:162)
at
org.eclipse.persistence.internal.queries.StatementQueryMecha nism.insertObject(StatementQueryMechanism.java:177)
at
org.eclipse.persistence.internal.queries.DatabaseQueryMechan ism.insertObjectForWrite(DatabaseQueryMechanism.java:461)
at
org.eclipse.persistence.queries.InsertObjectQuery.executeCom mit(InsertObjectQuery.java:80)
at
org.eclipse.persistence.queries.InsertObjectQuery.executeCom mitWithChangeSet(InsertObjectQuery.java:90)
at
org.eclipse.persistence.internal.queries.DatabaseQueryMechan ism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:28 6)
at
org.eclipse.persistence.queries.WriteObjectQuery.executeData baseQuery(WriteObjectQuery.java:58)
at
org.eclipse.persistence.queries.DatabaseQuery.execute(Databa seQuery.java:664)
at
org.eclipse.persistence.queries.DatabaseQuery.executeInUnitO fWork(DatabaseQuery.java:583)
at
org.eclipse.persistence.queries.ObjectLevelModifyQuery.execu teInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery. java:109)
at
org.eclipse.persistence.queries.ObjectLevelModifyQuery.execu teInUnitOfWork(ObjectLevelModifyQuery.java:86)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.int ernalExecuteQuery(UnitOfWorkImpl.java:2755)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1181)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1165)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1125)
at
org.eclipse.persistence.internal.sessions.CommitManager.comm itNewObjectsForClassWithChangeSet(CommitManager.java:195)
at
org.eclipse.persistence.internal.sessions.CommitManager.comm itAllObjectsWithChangeSet(CommitManager.java:103)
at
org.eclipse.persistence.internal.sessions.AbstractSession.wr iteAllObjectsWithChangeSet(AbstractSession.java:3175)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToDatabase(UnitOfWorkImpl.java:1298)
at
org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:468)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1398)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.iss ueSQLbeforeCompletion(UnitOfWorkImpl.java:3022)
at
org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.j ava:224)
at
org.eclipse.persistence.transaction.AbstractSynchronizationL istener.beforeCompletion(AbstractSynchronizationListener.jav a:157)
at
org.eclipse.persistence.transaction.JTASynchronizationListen er.beforeCompletion(JTASynchronizationListener.java:68)
at
com.evermind.server.ApplicationServerTransaction.callBeforeC ompletion(ApplicationServerTransaction.java:1066)
at
com.evermind.server.ApplicationServerTransaction.doCommit(Ap plicationServerTransaction.java:275)
at
com.evermind.server.ApplicationServerTransaction.commit(Appl icationServerTransaction.java:162)
at
com.evermind.server.ApplicationServerTransactionManager.comm it(ApplicationServerTransactionManager.java:472)
at com.mypackage.MyBean.doTheDeed(MyBean.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointIm pl.invoke(EJBJoinPointImpl.java:35)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.SetContextActionI nterceptor.invoke(SetContextActionInterceptor.java:44)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.DMSInterceptor.in voke(DMSInterceptor.java:52)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.TxBeanManagedInte rceptor.invoke(TxBeanManagedInterceptor.java:53)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.DMSInterceptor.in voke(DMSInterceptor.java:52)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.InvocationContextPool.invoke(Invocat ionContextPool.java:55)
at
com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invok eMethod(StatelessSessionEJBObject.java:87)
at
OrganizationUpdater_RemoteProxy_1d98pf4.updateOrganizations( Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java :53)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker. run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

[EL Warning]: 2009-06-05
10:35:55.907--UnitOfWork(26864146)--Thread(Thread[RMICallHan dler-5,5,HTTPThreadGroup])--java.lang.NullPointerException
at
oracle.oc4j.sql.spi.ConnectionHandle.oc4j_getCachedObject(Co nnectionHandle.java:549)
at oracle_jdbc_driver_T4CConnection_Proxy.prepareStatement()
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.prepareStatement(DatabaseAccessor.java:1354)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.prepareStatement(DatabaseAccessor.java:1303)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseCall .prepareStatement(DatabaseCall.java:646)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.basicExecuteCall(DatabaseAccessor.java:551)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.executeCall(DatabaseAccessor.java:501)
at
org.eclipse.persistence.internal.helper.LOBValueWriter.build AndExecuteCall(LOBValueWriter.java:71)
at
org.eclipse.persistence.internal.helper.LOBValueWriter.build AndExecuteSelectCalls(LOBValueWriter.java:182)
at
org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.flushSelectCalls(DatabaseAccessor.java:135)
at
org.eclipse.persistence.internal.queries.DatasourceCallQuery Mechanism.insertObject(DatasourceCallQueryMechanism.java:350 )
at
org.eclipse.persistence.internal.queries.StatementQueryMecha nism.insertObject(StatementQueryMechanism.java:162)
at
org.eclipse.persistence.internal.queries.StatementQueryMecha nism.insertObject(StatementQueryMechanism.java:177)
at
org.eclipse.persistence.internal.queries.DatabaseQueryMechan ism.insertObjectForWrite(DatabaseQueryMechanism.java:461)
at
org.eclipse.persistence.queries.InsertObjectQuery.executeCom mit(InsertObjectQuery.java:80)
at
org.eclipse.persistence.queries.InsertObjectQuery.executeCom mitWithChangeSet(InsertObjectQuery.java:90)
at
org.eclipse.persistence.internal.queries.DatabaseQueryMechan ism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:28 6)
at
org.eclipse.persistence.queries.WriteObjectQuery.executeData baseQuery(WriteObjectQuery.java:58)
at
org.eclipse.persistence.queries.DatabaseQuery.execute(Databa seQuery.java:664)
at
org.eclipse.persistence.queries.DatabaseQuery.executeInUnitO fWork(DatabaseQuery.java:583)
at
org.eclipse.persistence.queries.ObjectLevelModifyQuery.execu teInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery. java:109)
at
org.eclipse.persistence.queries.ObjectLevelModifyQuery.execu teInUnitOfWork(ObjectLevelModifyQuery.java:86)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.int ernalExecuteQuery(UnitOfWorkImpl.java:2755)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1181)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1165)
at
org.eclipse.persistence.internal.sessions.AbstractSession.ex ecuteQuery(AbstractSession.java:1125)
at
org.eclipse.persistence.internal.sessions.CommitManager.comm itNewObjectsForClassWithChangeSet(CommitManager.java:195)
at
org.eclipse.persistence.internal.sessions.CommitManager.comm itAllObjectsWithChangeSet(CommitManager.java:103)
at
org.eclipse.persistence.internal.sessions.AbstractSession.wr iteAllObjectsWithChangeSet(AbstractSession.java:3175)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToDatabase(UnitOfWorkImpl.java:1298)
at
org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:468)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1398)
at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.iss ueSQLbeforeCompletion(UnitOfWorkImpl.java:3022)
at
org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.j ava:224)
at
org.eclipse.persistence.transaction.AbstractSynchronizationL istener.beforeCompletion(AbstractSynchronizationListener.jav a:157)
at
org.eclipse.persistence.transaction.JTASynchronizationListen er.beforeCompletion(JTASynchronizationListener.java:68)
at
com.evermind.server.ApplicationServerTransaction.callBeforeC ompletion(ApplicationServerTransaction.java:1066)
at
com.evermind.server.ApplicationServerTransaction.doCommit(Ap plicationServerTransaction.java:275)
at
com.evermind.server.ApplicationServerTransaction.commit(Appl icationServerTransaction.java:162)
at
com.evermind.server.ApplicationServerTransactionManager.comm it(ApplicationServerTransactionManager.java:472)
at com.mypackage.MyBean.doTheDeed(MyBean.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointIm pl.invoke(EJBJoinPointImpl.java:35)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.SetContextActionI nterceptor.invoke(SetContextActionInterceptor.java:44)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.DMSInterceptor.in voke(DMSInterceptor.java:52)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.TxBeanManagedInte rceptor.invoke(TxBeanManagedInterceptor.java:53)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.interceptor.system.DMSInterceptor.in voke(DMSInterceptor.java:52)
at
com.evermind.server.ejb.interceptor.InvocationContextImpl.pr oceed(InvocationContextImpl.java:119)
at
com.evermind.server.ejb.InvocationContextPool.invoke(Invocat ionContextPool.java:55)
at
com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invok eMethod(StatelessSessionEJBObject.java:87)
at MyBean_RemoteProxy_1d98pf4.doTheDeed(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java :53)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker. run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

[EL Finer]: 2009-06-05
10:35:55.91--UnitOfWork(26864146)--Thread(Thread[RMICallHand ler-5,5,HTTPThreadGroup])--TX
afterCompletion callback, status=ROLLEDBACK
[EL Finer]: 2009-06-05
10:35:55.91--UnitOfWork(26864146)--Thread(Thread[RMICallHand ler-5,5,HTTPThreadGroup])--release
unit of work
[EL Finer]: 2009-06-05
10:35:55.911--ClientSession(20705522)--Thread(Thread[RMICall Handler-5,5,HTTPThreadGroup])--client
released
Re: Trying to persist @Lob field throws NullPointerException [message #389417 is a reply to message #389406] Tue, 09 June 2009 13:49 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The null pointer is occurring in the JDBC driver. The issue seems to be
related to EclipseLink Oracle thin JDBC driver Lob support. In order to
workaround the drivers 4k size limit, we insert an empty Lob and then
select it back to populate it. This requires access to Oracle JDBC
specific syntax so we unwrap the DataSource connection to get the real
JDBC connection instance. This seems to be related to the issue.

What version of OC4J are you using? Are you setting your ServerPlatform
to OC4J in your persistence.xml? What database platform are you using,
Oracle or Oracle9Platform? Are you using the thin or OCI driver?

If you Lob works without the @Lob annotation (maybe up to 4k?), then you
could probably just use the OraclePlatform instead of the Oracle9Platform
to avoid the issue. You might also look into the unwrap method in your
ServerPlatform.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: Trying to persist @Lob field throws NullPointerException [message #389434 is a reply to message #389417] Wed, 10 June 2009 08:34 Go to previous messageGo to next message
Torben Putkonen is currently offline Torben PutkonenFriend
Messages: 34
Registered: July 2009
Member
> What version of OC4J are you using?

10.1.3.3.1

> Are you setting your ServerPlatform to OC4J in your persistence.xml?

I was not, but I added:
<property name="eclipselink.target-server" value="OC4J" />

I also tried OC4J_10_1_3 which some people seem to be using, but then I
got the error message "Missing class: OC4J_10_1_3".

> What database platform are you using, Oracle or Oracle9Platform?

Platform was not specified at all, now I tested with:

<property name="eclipselink.target-database"
value=" org.eclipse.persistence.platform.database.oracle.OraclePlatf orm "/>

and

<property name="eclipselink.target-database"
value=" org.eclipse.persistence.platform.database.oracle.Oracle10Pla tform "/>

> Are you using the thin or OCI driver?

Thin

> If you Lob works without the @Lob annotation (maybe up to 4k?),
> then you could probably just use the OraclePlatform instead of the
> Oracle9Platform to avoid the issue. You might also look into the
> unwrap method in your ServerPlatform.

I still get the NullPointerException with the changes to persistence.xml.
Re: Trying to persist @Lob field throws NullPointerException [message #389438 is a reply to message #389434] Wed, 10 June 2009 11:48 Go to previous message
Torben Putkonen is currently offline Torben PutkonenFriend
Messages: 34
Registered: July 2009
Member
I take it back, now it seems to work with these properties:

<property name="eclipselink.target-database"
value=" org.eclipse.persistence.platform.database.oracle.OraclePlatf orm "/>
<property name="eclipselink.target-server" value="OC4J"/>

I have a couple of new issues though but I will add another thread for
those :)

Thanks once again, James!
Previous Topic:Join Query based on JoinTable with multiple joinColumns
Next Topic:Setting entity's cache type to none throws StackOverflowError
Goto Forum:
  


Current Time: Wed Apr 24 23:55:29 GMT 2024

Powered by FUDForum. Page generated in 0.03130 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top