db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ziv Yankowitz" <z...@traiana.com>
Subject RE: OJb sequence manager - Force computation of unique values
Date Thu, 05 Feb 2004 10:10:03 GMT
Hi Armin,

once again thanks for the response,
we are you running OJB in an managed environment, 
we changed the sequence implementation to be : Database sequences based high/low implementation.

we are using oracle 8 as our database.

and we now receive the following error :

org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init Identity
for given object com.traiana.p
latform.test.sys.dco.ojb.TestTable@12ea730
        at org.apache.ojb.broker.Identity.init(Unknown Source)
        at org.apache.ojb.broker.Identity.<init>(Unknown Source)
        at com.traiana.platform.sys.dco.AbstractDcoData.insert(AbstractDcoData.java:109)
        at com.traiana.platform.test.sys.dco.ojb.TestTable.insert(TestTable.java:53)
        at com.traiana.platform.test.flow.void1.VoidFlow.insertRecordToDatabse(VoidFlow.java:127)
        at com.traiana.platform.test.flow.void1.VoidFlow.startProcessFlow(VoidFlow.java:72)
        at com.traiana.platform.core.engine.flow.FlowEPLogic.execClass(FlowEPLogic.java:194)
        at com.traiana.platform.core.engine.flow.FlowEPLogic.execute(FlowEPLogic.java:95)
        at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPointBean.callLogic(FlowEntryPointBean.jav
a:77)
        at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPointBean.executeNT(FlowEntryPointBean.jav
a:46)
        at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPoint_806z3c_EOImpl.executeNT(FlowEntryPoi
nt_806z3c_EOImpl.java:46)
        at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPoint_806z3c_EOImpl_WLSkel.invoke(Unknown
Source)
        at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
        at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
        at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
        at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPoint_806z3c_EOImpl_812_WLStub.executeNT(U
nknown Source)
        at com.traiana.platform.core.engine.flow.FlowExecuter.callFlow(FlowExecuter.java:357)
        at com.traiana.platform.core.engine.flow.FlowExecuter.execFlow(FlowExecuter.java:227)
        at com.traiana.platform.core.engine.flow.FlowRelay.invokeFlowSync(FlowRelay.java:224)
        at com.traiana.platform.core.engine.flow.FlowRelay.invokeFlowAll(FlowRelay.java:145)
        at com.traiana.platform.core.engine.adapter.RequestHandler.processSyncRequest(RequestHandler.java:68)
        at com.traiana.platform.core.engine.adapter.Broker.sendRequestDirect(Broker.java:311)
        at com.traiana.platform.core.engine.adapter.Broker.distributeRequests(Broker.java:101)
        at com.traiana.platform.core.engine.adapter.AdapterLogic.handleInMessageLogic(AdapterLogic.java:194)
        at com.traiana.platform.core.engine.adapter.AdapterLogic.handleInMsg(AdapterLogic.java:123)
        at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean.handleInMsg(AdapterBean.java:41)
        at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean_ozbv4w_EOImpl.handleInMsg(AdapterBean_oz
bv4w_EOImpl.java:98)
        at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean_ozbv4w_EOImpl_WLSkel.invoke(Unknown
Sour
ce)
        at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
        at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
        at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
        at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean_ozbv4w_EOImpl_812_WLStub.handleInMsg(Unk
nown Source)
        at com.traiana.platform.core.engine.connector.impl.ConnectorLogic.handleInMessage(ConnectorLogic.java:304)
        at com.traiana.platform.core.engine.connector.protocols.http.HttpConnectorLogic.connectHttpIncoming(HttpConnecto
rLogic.java:70)
        at jsp_servlet._connector.__connector._jspService(__connector.java:127)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:446)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Caused by: org.apache.ojb.broker.PersistenceBrokerException: Could not get key value
        at org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(Unknown Source)
        at org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(Unknown Source)
        at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(Unknown Source)
        ... 47 more
Caused by: org.apache.ojb.broker.util.sequence.SequenceManagerException:
Could not grab next id, failed with
This feature is not supported by this implementation
Creation of new sequence failed with
This feature is not supported by this implementation

        at org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.getUniqueLong(Unknown
Source)
        at org.apache.ojb.broker.util.sequence.SequenceManagerSeqHiLoImpl.getUniqueLong(Unknown
Source)
        at org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(Unknown
Source)
        ... 50 more
Caused by: java.lang.UnsupportedOperationException: This feature is not supported by this
implementation
        at org.apache.ojb.broker.platforms.PlatformDefaultImpl.createSequenceQuery(Unknown
Source)
        at org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.createSequence(Unknown
Source)
        ... 53 more



thanks again for all the help.

-----Original Message-----
From: Armin Waibel [mailto:arminw@apache.org]
Sent: Thursday, February 05, 2004 11:24 AM
To: OJB Users List
Subject: Re: OJb sequence manager - Force computation of unique values


Hi,

from your stack trace

Caused by: org.apache.ojb.broker.TransactionNotInProgressException: 
ConnectionManager is NOT in transaction
         at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.abortTransaction(Unknown 
Source)

Seems that an internal exception occur while lookup of the next 
HighLowSequence object and OJB try abort internal used PB instance.
Now, here is my question: Are you running OJB in an managed environment?
If yes, this sequence manager implementation will not work. See
http://db.apache.org/ojb/sequencemanager.html#High/Low sequence manager

By the way, I will update SequenceManagerHighLowImpl to log a clear 
error message.

regards,
Armin


Ziv Yankowitz wrote:
> Hi Armin,
> 
> thanks for the response.
> 
> The complete stack trace is :
> 
> org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init Identity
for given object com.traiana.
> latform.test.sys.dco.ojb.TestTable@1ed918d
>         at org.apache.ojb.broker.Identity.init(Unknown Source)
>         at org.apache.ojb.broker.Identity.<init>(Unknown Source)
>         at com.traiana.platform.sys.dco.AbstractDcoData.insert(AbstractDcoData.java:109)
>         at com.traiana.platform.test.sys.dco.ojb.TestTable.insert(TestTable.java:53)
>         at com.traiana.platform.test.flow.void1.VoidFlow.insertRecordToDatabse(VoidFlow.java:127)
>         at com.traiana.platform.test.flow.void1.VoidFlow.startProcessFlow(VoidFlow.java:72)
>         at com.traiana.platform.core.engine.flow.FlowEPLogic.execClass(FlowEPLogic.java:194)
>         at com.traiana.platform.core.engine.flow.FlowEPLogic.execute(FlowEPLogic.java:95)
>         at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPointBean.callLogic(FlowEntryPointBean.ja
> a:77)
>         at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPointBean.executeNT(FlowEntryPointBean.ja
> a:46)
>         at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPoint_806z3c_EOImpl.executeNT(FlowEntryPo
> nt_806z3c_EOImpl.java:46)
>         at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPoint_806z3c_EOImpl_WLSkel.invoke(Unknown
> Source)
>         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
>         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
>         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
>         at com.traiana.platform.core.engine.flow.ejb.sessions.flowep.FlowEntryPoint_806z3c_EOImpl_812_WLStub.executeNT(
> nknown Source)
>         at com.traiana.platform.core.engine.flow.FlowExecuter.callFlow(FlowExecuter.java:357)
>         at com.traiana.platform.core.engine.flow.FlowExecuter.execFlow(FlowExecuter.java:227)
>         at com.traiana.platform.core.engine.flow.FlowRelay.invokeFlowSync(FlowRelay.java:224)
>         at com.traiana.platform.core.engine.flow.FlowRelay.invokeFlowAll(FlowRelay.java:145)
>         at com.traiana.platform.core.engine.adapter.RequestHandler.processSyncRequest(RequestHandler.java:68)
>         at com.traiana.platform.core.engine.adapter.Broker.sendRequestDirect(Broker.java:311)
>         at com.traiana.platform.core.engine.adapter.Broker.distributeRequests(Broker.java:101)
>         at com.traiana.platform.core.engine.adapter.AdapterLogic.handleInMessageLogic(AdapterLogic.java:194)
>         at com.traiana.platform.core.engine.adapter.AdapterLogic.handleInMsg(AdapterLogic.java:123)
>         at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean.handleInMsg(AdapterBean.java:41)
>         at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean_ozbv4w_EOImpl.handleInMsg(AdapterBean_o
> bv4w_EOImpl.java:98)
>         at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean_ozbv4w_EOImpl_WLSkel.invoke(Unknown
Sou
> ce)
>         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
>         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
>         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
>         at com.traiana.platform.core.engine.adapter.ejb.adapterbean.AdapterBean_ozbv4w_EOImpl_812_WLStub.handleInMsg(Un
> nown Source)
>         at com.traiana.platform.core.engine.connector.impl.ConnectorLogic.handleInMessage(ConnectorLogic.java:304)
>         at com.traiana.platform.core.engine.connector.protocols.http.HttpConnectorLogic.connectHttpIncoming(HttpConnect
> rLogic.java:70)
>         at jsp_servlet._connector.__connector._jspService(__connector.java:127)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:446)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
>         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
>         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
>         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
>         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
>         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: org.apache.ojb.broker.TransactionNotInProgressException: ConnectionManager
is NOT in transaction
>         at org.apache.ojb.broker.core.PersistenceBrokerImpl.abortTransaction(Unknown
Source)
>         at org.apache.ojb.broker.core.DelegatingPersistenceBroker.abortTransaction(Unknown
Source)
>         at org.apache.ojb.broker.core.DelegatingPersistenceBroker.abortTransaction(Unknown
Source)
>         at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getSequence(Unknown
Source)
>         at org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUniqueLong(Unknown
Source)
>         at org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(Unknown
Source)
>         at org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(Unknown Source)
>         at org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(Unknown Source)
>         at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(Unknown Source)
>         ... 47 more
> 
> 
> 
> -----Original Message-----
> From: Armin Waibel [mailto:arminw@apache.org]
> Sent: Wednesday, February 04, 2004 7:53 PM
> To: OJB Users List
> Subject: Re: OJb sequence manager - Force computation of unique values
> 
> 
> Hi,
> 
> Ziv Yankowitz wrote:
> 
> 
>>Folks,
>>
>>we are using the High/Low sequence manager implementation and we try to compute the
id in 
>>advance with the following code :
>>
>>PersistenceBroker broker = ((HasBroker) tx).getBroker();
>>Identity oid = new Identity(object, broker);
>>
>>we encounter in the following error error :
>>
>>org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init Identity
for given object
>>
> 
> 
> Say that class of given object could not be found in repository. But 
> maybe there is another reason for that failure, please post the whole 
> stack trace and the error log before failure.
> 
> regards,
> Armin
> 
> 
>>what can be the problem?
>>
>>thanks.
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

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


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


Mime
View raw message