db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles N. Harvey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OJB-15) Randomly concurrency problem in Identity class
Date Wed, 16 Nov 2005 00:40:29 GMT
    [ http://issues.apache.org/jira/browse/OJB-15?page=comments#action_12357747 ] 

Charles N. Harvey commented on OJB-15:
--------------------------------------

I am getting a similar exception.  I am using the .SequenceManagerStoredProcedureImpl.  It
seems to generate some better logs.
I am using db-ojb-1.0.3.jar.

Here are the highlights:
        org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init Identity
for given object.
    caused by:
        org.apache.ojb.broker.PersistenceBrokerException: Could not get key value
    caused by:
        org.apache.ojb.broker.util.sequence.SequenceManagerException: Could not grab next
id although a sequence seems to exist
    caused by:
        java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults()


All my ID fields have autoincrement="true".  And, as I said, I am using the Stored Proceedure
Sequence manager.    


Servlet.service() for servlet action threw exception
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init Identity
for given object.
objectTopLevelClass=com.alloy.tsa.bean.ReferAFriend
objectRealClass=com.alloy.tsa.bean.ReferAFriend
pkValues=null
object to identify: com.alloy.tsa.bean.ReferAFriend@11daf60
        at org.apache.ojb.broker.Identity.createException(Identity.java:383)
        at org.apache.ojb.broker.Identity.init(Identity.java:171)
        at org.apache.ojb.broker.Identity.<init>(Identity.java:121)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:716)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:175)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:175)
        at com.alloy.tsa.business.ReferAFriendLogic.addReferAFriend(ReferAFriendLogic.java:44)
        at com.alloy.tsa.action.referafriend.ReferAFriend_process.execute(ReferAFriend_process.java:105)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.ojb.broker.PersistenceBrokerException: Could not get key value
        at org.apache.ojb.broker.util.BrokerHelper.setAutoIncrementValue(BrokerHelper.java:340)
        at org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java:374)
        at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:180)
        at org.apache.ojb.broker.Identity.init(Identity.java:154)
        ... 36 more
Caused by: org.apache.ojb.broker.util.sequence.SequenceManagerException: Could not grab next
id although a sequence seems to exist
        at org.apache.ojb.broker.util.sequence.SequenceManagerStoredProcedureImpl.getUniqueLong(SequenceManagerStoredProcedureImpl.java:220)
        at org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(AbstractSequenceManager.java:139)
        at org.apache.ojb.broker.util.BrokerHelper.setAutoIncrementValue(BrokerHelper.java:327)
        ... 39 more
Caused by: java.sql.SQLException: Output parameters have not yet been processed. Call getMoreResults().
        at net.sourceforge.jtds.jdbc.ParamInfo.getOutValue(ParamInfo.java:159)
        at net.sourceforge.jtds.jdbc.JtdsCallableStatement.getOutputValue(JtdsCallableStatement.java:115)
        at net.sourceforge.jtds.jdbc.JtdsCallableStatement.getLong(JtdsCallableStatement.java:157)
        at org.apache.ojb.broker.util.sequence.SequenceManagerStoredProcedureImpl.buildNextSequence(SequenceManagerStoredProcedureImpl.java:253)
        at org.apache.ojb.broker.util.sequence.SequenceManagerStoredProcedureImpl.getUniqueLong(SequenceManagerStoredProcedureImpl.java:186)
        ... 41 more

> Randomly concurrency problem in Identity class
> ----------------------------------------------
>
>          Key: OJB-15
>          URL: http://issues.apache.org/jira/browse/OJB-15
>      Project: OJB
>         Type: Bug
>   Components: JDO-API, ODMG-API, PB-API, OTM-API
>     Versions: 1.0.x CVS, 1.1 CVS
>  Environment: all
>     Reporter: Armin Waibel
>     Priority: Minor

>
> Seems that randomly a concurrency problem occur in Identity class. The stack trace look
like this:
> <snip>
> testLockingOfObject Error OJB needs at least one primary key attribute for class
> OJB needs at least one primary key attribute for class:
> objectTopLevelClass=org.apache.ojb.odmg.LockingMultithreadedTest$LockObjectobjectRealClass=org.apache.ojb.odmg.LockingMultithreadedTest$LockObjectpkValues=null
> object to identify: org.apache.ojb.odmg.LockingMultithreadedTest$LockObject@ad339b at
org.apache.ojb.broker.Identity.createException(Identity.java:391) 
> </snip>
> If this happen again, please post your stack trace as comment. Maybe it is possible to
isolate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message