I first load an object through the object API and close the object db. The 
error happens when I'm accessing elements in that object while trying to 
use the Document API. (Clazz is mapped to an orientDB class). I essentially 
need a reliable way of detaching the whole object hierarchy. Since I do 
have some cyclic links, detachAll seems to be causing a stack overflow. 


SEVERE: Servlet.service() for servlet [StripesDispatcher] in context with 
path [/ebeweb] threw exception [Unhandled exception in exception handler.] 
with root cause

java.lang.ClassCastException: 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTxPooled 
cannot be cast to 
com.orientechnologies.orient.core.db.object.ODatabaseObject

at com.orientechnologies.orient.object.db.OObjectLazyList.getDatabase(
OObjectLazyList.java:469)

at com.orientechnologies.orient.object.db.OObjectLazyList.get(
OObjectLazyList.java:151)

at com.orientechnologies.orient.object.db.OObjectLazyListIterator.next(
OObjectLazyListIterator.java:53)

at com.orientechnologies.orient.object.db.OObjectLazyListIterator.next(
OObjectLazyListIterator.java:49)

at com.virtusa.gto.ebe.model.Clazz.findQuery(Clazz.java:100)

at com.virtusa.gto.ebe.api.DocumentManager.query(DocumentManager.java:51)

at com.virtusa.gto.ebeweb.web.QueryActionBean.query(QueryActionBean.java:47)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at net.sourceforge.stripes.controller.DispatcherHelper$6.intercept(
DispatcherHelper.java:456)

at net.sourceforge.stripes.controller.ExecutionContext.proceed(
ExecutionContext.java:158)

at 
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(
BeforeAfterMethodInterceptor.java:113)

at net.sourceforge.stripes.controller.ExecutionContext.proceed(
ExecutionContext.java:155)

at net.sourceforge.stripes.controller.ExecutionContext.wrap(
ExecutionContext.java:74)

at net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(
DispatcherHelper.java:454)

at net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(
DispatcherServlet.java:278)

at net.sourceforge.stripes.controller.DispatcherServlet.service(
DispatcherServlet.java:160)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:305)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)

at net.sourceforge.stripes.controller.StripesFilter.doFilter(
StripesFilter.java:260)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:243)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)

at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:222)

at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:123)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
AuthenticatorBase.java:472)

at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:171)

at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:99)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:407)

at org.apache.coyote.http11.AbstractHttp11Processor.process(
AbstractHttp11Processor.java:1004)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:589)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(
JIoEndpoint.java:312)

at java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:724)



On Saturday, June 28, 2014 2:55:16 PM UTC+5:30, Lvc@ wrote:
>
> Can you give us the full stack exception?
>
> Lvc@
>
>
> On 28 June 2014 05:04, CNM <[email protected] <javascript:>> wrote:
>
>> I have a situation where I need to use DocumentDatabase for one DB and 
>> the ObjectDatabase for another. I keep getting the following exception when 
>> I try to access fields from the Object which was supposed to be detached.
>>
>>  java.lang.ClassCastException: 
>> com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx cannot be 
>> cast to com.orientechnologies.orient.core.db.object.ODatabaseObject
>>
>>  -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to