Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 19484 invoked from network); 30 Oct 2007 15:48:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2007 15:48:08 -0000 Received: (qmail 18552 invoked by uid 500); 30 Oct 2007 15:45:59 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 18525 invoked by uid 500); 30 Oct 2007 15:45:59 -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 18510 invoked by uid 99); 30 Oct 2007 15:45:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2007 08:45:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2007 15:46:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A04047141F1 for ; Tue, 30 Oct 2007 08:45:50 -0700 (PDT) Message-ID: <11729685.1193759150653.JavaMail.jira@brutus> Date: Tue, 30 Oct 2007 08:45:50 -0700 (PDT) From: "Albert Lee (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-366) InternalException thrown in BrokerImpl.endOperation In-Reply-To: <4840269.1189607252428.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee updated OPENJPA-366: ------------------------------- Fix Version/s: (was: 1.0.1) 1.0.2 There are still other issues need to be resolved. Defer to next release. > InternalException thrown in BrokerImpl.endOperation > --------------------------------------------------- > > Key: OPENJPA-366 > URL: https://issues.apache.org/jira/browse/OPENJPA-366 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.0.0 > Environment: All platforms > Reporter: Albert Lee > Assignee: Albert Lee > Fix For: 1.0.2, 1.1.0 > > Attachments: OPENJPA-366.patch > > > Under heavy load during stress test, the following exception is observed: > org.apache.openjpa.persistence.PersistenceException: null > at org.apache.openjpa.kernel.BrokerImpl.endOperation(BrokerImpl.java:1728) > at org.apache.openjpa.kernel.BrokerImpl.isActive(BrokerImpl.java:1676) > at org.apache.openjpa.kernel.DelegatingBroker.isActive(DelegatingBroker.java:420) > at org.apache.openjpa.persistence.EntityManagerImpl.isActive(EntityManagerImpl.java:502) > at org.apache.openjpa.persistence.PersistenceExceptions$2.translate(PersistenceExceptions.java:66) > at org.apache.openjpa.kernel.DelegatingBroker.translate(DelegatingBroker.java:110) > at org.apache.openjpa.kernel.DelegatingBroker.newObjectId(DelegatingBroker.java:262) > at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:347) > at com.ibm.svt.shoppingcartModule.stationstore.StationStoreSessionBean.getListOrders(StationStoreSessionBean.java:603) > at com.ibm.svt.shoppingcartModule.stationstore.EJSRemoteStatelessStationStoreSession_5a5c538c.getListOrders(Unknown Source) > at com.ibm.svt.shoppingcartModule.stationstore._EJSRemoteStatelessStationStoreSession_5a5c538c_Tie.getListOrders(_EJSRemoteStatelessStationStoreSession_5a5c538c_Tie.java:244) > at com.ibm.svt.shoppingcartModule.stationstore._EJSRemoteStatelessStationStoreSession_5a5c538c_Tie._invoke(_EJSRemoteStatelessStationStoreSession_5a5c538c_Tie.java:100) > at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613) > at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466) > at com.ibm.rmi.iiop.ORB.process(ORB.java:503) > at com.ibm.CORBA.iiop.ORB.process(ORB.java:1553) > at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2680) > at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2554) > at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62) > at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118) > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) > [8/31/07 22:45:26:265 EDT] 000000c1 SystemOut O MDD Translating exception: org.apache.openjpa.util.InternalException: null > [8/31/07 22:45:26:265 EDT] 000000c1 SystemErr R org.apache.openjpa.util.InternalException: null > [8/31/07 22:45:26:265 EDT] 000000c1 SystemErr R at org.apache.openjpa.kernel.BrokerImpl.endOperation(BrokerImpl.java:1728) > After some investigation, it was determined that the internal exception is caused by > if (_operationCount < 1) > throw new InternalException(); > in BrokerImpl.endOperation(); > We believe the cause of the problem is a lock() method call is missing in the endOperation() > public boolean endOperation() { > lock(); <<<<< This is the missing lock() call since BrokerImpl.java was created > try { > if (_operationCount == 1 && (_autoDetach & DETACH_NONTXREAD) != 0 > && (_flags & FLAG_ACTIVE) == 0) { > detachAllInternal(null); > } > if (_operationCount < 1) > throw new InternalException(); > return _operationCount == 1; > } catch (OpenJPAException ke) { > throw ke; > } catch (RuntimeException re) { > throw new GeneralException(re); > } finally { > _operationCount--; > if (_operationCount == 0) > _operating.clear(); > unlock(); > } > } > Once we have done more tests and verify the fix, I'll submit a patch for this problem. > If anyone doesn't think this is the solution. please response. > Albert Lee. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.