openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: [jira] [Commented] (OPENJPA-2193) Nullpointer exception when persisting object during high load
Date Thu, 05 Jul 2012 14:39:35 GMT
This is sounding very similar to the connection race condition that we used
to have with the Container and EM pooling...  I noticed that the
JDBCStoreManager.free() method that resets _conn to null is not thread
protected.  A comment says that the protection needs to be provided by the
call chain...  I wonder if some change in the 2.x code path has
accidentally opened up this window and is accidentally resetting an active
connection back to null?  Just an idea.

Kevin

On Wed, Jul 4, 2012 at 9:58 AM, Daniel Persson (JIRA) <jira@apache.org>wrote:

>
>     [
> https://issues.apache.org/jira/browse/OPENJPA-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406569#comment-13406569]
>
> Daniel Persson commented on OPENJPA-2193:
> -----------------------------------------
>
> Hi Rick.
>
> It's quite easy to recreate in a tomcat environment. We get the error
> about 7 times every day in our environment.
> My guess is that the tomcat pool have connections with timeouts that will
> trigger and then the connections will be closed or unavailable for OpenJPA.
>
> I don't have any example code yet because of other failures to hunt down.
> But I will try to recreate this with an as small as possible example.
>
> Best regards
>
> Daniel
>
> > Nullpointer exception when persisting object during high load
> > -------------------------------------------------------------
> >
> >                 Key: OPENJPA-2193
> >                 URL: https://issues.apache.org/jira/browse/OPENJPA-2193
> >             Project: OpenJPA
> >          Issue Type: Bug
> >            Reporter: Daniel Persson
> >            Priority: Minor
> >
> > During high load and many persists _conn is null during commit.
> > Caused by: <openjpa-2.2.0-r422266:1244990 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: null
> >         at
> org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:2034)
> >         at
> org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:94)
> >         at
> org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1514)
> >         at
> org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:933)
> >         at
> org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:570)
> >         ... 29 more
> > Caused by: java.lang.NullPointerException
> >         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.commit(JDBCStoreManager.java:196)
> >         at
> org.apache.openjpa.kernel.DelegatingStoreManager.commit(DelegatingStoreManager.java:95)
> >         at
> org.apache.openjpa.datacache.DataCacheStoreManager.commit(DataCacheStoreManager.java:88)
> >         at
> org.apache.openjpa.kernel.DelegatingStoreManager.commit(DelegatingStoreManager.java:95)
> >         at
> org.apache.openjpa.kernel.BrokerImpl.endStoreManagerTransaction(BrokerImpl.java:1471)
> >         at
> org.apache.openjpa.kernel.BrokerImpl.endTransaction(BrokerImpl.java:2351)
> >         at
> org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:2010)
> >         ... 33 more
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message