Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] nullpointer exception cause rollback

My only guess from the stack is that you are trying to persist a non mapped
subclass of a persistence class, or have some sort of class loader issue.

Please try to isolate the issue and include how you have mapped the class
and what you are doing to get the error, and what environment and version
you are using.  Try to determine when the error occurs and when it does not,
and if it occurs with some objects, and not others.

I have not seen this error before.  Also try the latest release to see if it
is something that has been fixed.


Antonino Vitale wrote:
> 
> Hi everybody,
> I'm using Eclipselink as JPA provider for my application.
> I have many classes generated from a xml schema using hyperjaxb3.
> I have annotations for both jpa and xml elements.
> my classes have one-to-many relationships, for example a class person has
> a
> relationship with a class names and a class record has a relationship with
> person etc...
> the problem is that i get a nullpointerexception during committing changes
> to database.
> this is the stacktrace:
> 
> Exception in thread "main" javax.persistence.
> RollbackException: java.lang.NullPointerException
>     at
> org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
>     at
> org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
>     at BatchLoadWorldCheck.loadWCLists(BatchLoadWorldCheck.java:428)
>     at BatchLoadWorldCheck.main(BatchLoadWorldCheck.java:137)
> Caused by: java.lang.NullPointerException
>     at
> org.eclipse.persistence.internal.descriptors.ObjectBuilder.extractValueFromObjectForField(ObjectBuilder.java:2565)[EL
> Warning]: 2012-04-12
> 14:58:45.918--UnitOfWork(18164750)--java.lang.NullPointerException
> 
>     at
> org.eclipse.persistence.mappings.OneToManyMapping.updateTargetRowPostInsertSource(OneToManyMapping.java:1337)
>     at
> org.eclipse.persistence.mappings.OneToManyMapping.performDataModificationEvent(OneToManyMapping.java:900)
>     at
> org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:157)
>     at
> org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3799)
>     at
> org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1415)
>     at
> org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:636)
>     at
> org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1505)
>     at
> org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:267)
>     at
> org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1143)
>     at
> org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
>     ... 3 more
> 
> using hibernate as jpa provider all goes well. I thought to move to
> eclipselink because of a huge number of load operations that in hibernate
> make my application slower.
> if you know the answer, please help me! I'm really confused about this
> error and I'm new to this kind of things so I can not find solutions.
> thank you very much.
> bye
> 
> Nino
> 
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.eclipse.org/forums/index.php?t=thread&frm_id=111&S=1b00bfd151289b297688823a00683aca
EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
Blog:  http://java-persistence-performance.blogspot.com/ Java Persistence
Performance 
-- 
View this message in context: http://old.nabble.com/nullpointer-exception-cause-rollback-tp33675463p33708611.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top