Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 78EEDD6EF for ; Wed, 11 Jul 2012 15:02:38 +0000 (UTC) Received: (qmail 91477 invoked by uid 500); 11 Jul 2012 15:02:38 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 90764 invoked by uid 500); 11 Jul 2012 15:02:36 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 89884 invoked by uid 99); 11 Jul 2012 15:02:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 15:02:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 2E0E3141887 for ; Wed, 11 Jul 2012 15:02:35 +0000 (UTC) Date: Wed, 11 Jul 2012 15:02:35 +0000 (UTC) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Message-ID: <170677651.35793.1342018955190.JavaMail.jiratomcat@issues-vm> In-Reply-To: <165681720.58437.1336834729117.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (OPENJPA-2193) Nullpointer exception when persisting object during high load MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411605#comment-13411605 ] Rick Curtis commented on OPENJPA-2193: -------------------------------------- I did some digging this morning and I'm getting the feeling that this doesn't have anything to do with tomcat connections going stale.... In my JSE testing, the callflow for committing a transaction which has no connection is something like this : em.getTransaction.commit() -> BrokerImpl.commit() -> LocalManagedRuntime.commit() -> BrokerImpl.beforeCompletion() -> .... BrokerImpl.flush() ... -> BrokerImpl.beginStoreManagerConnection() -> JDBCStoreManager.retainConnection() -> ... [eventually gets a connection] -> Can you do some debugging to see why we aren't getting a connection when going down the transaction commit path? Perhaps a before/after completion call isn't happening? Also, could you post your entire persistence.xml file? Thanks, Rick > 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 > Attachments: patch-tomcat-pooling-fix.patch > > > During high load and many persists _conn is null during commit. > Caused by: 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