I first load the Clazz object using the Object API. This is an object 
hierarchy that has cyclic links (eg. objects that refer to each other etc.) 
I close the DB. Then while I'm trying to do Document operations on another 
DB, I try to read this object. 


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.sample.generator.ebe.model.Clazz.findQuery(Clazz.java:100)
at 
com.sample.generator.ebe.api.DocumentManager.query(DocumentManager.java:51)
at 
com.sample.generatorweb.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