[JBossWS] - problems with EJB3WS invoked from J2ME client
by MmarcoM
hi all,
i wrote an EJB3 webservice and i am tryingn to connect to it using J2ME client written using WTK 2.5
Now, webservice is fine because when i try to connect to it using a java standalone client, everything works fine
But wihth J2ME, i receive following exception
| javax.xml.rpc.JAXRPCException: java.rmi.MarshalException: (1)Missing end tag for Body or Envelope
| at com.sun.j2mews.xml.rpc.SOAPDecoder.decode(+243)
| at com.sun.j2mews.xml.rpc.OperationImpl.invoke(+90)
| at com.mm.j2me.ws.WSRemoteSEI_Stub.login(+48)
| at com.mm.j2me.midp.model.HTTPCommunicationHandler.createAccount(+36)
| at com.mm.j2me.midp.model.RemoteModelRequestHandler.createAccount(+16)
| at com.mm.j2me.midp.model.RemoteModelProxy.createAccount(+16)
| at com.mm.j2me.midp.model.ModelFacade.createAccount(+16)
| at com.mm.j2me.midp.ui.UIController$EventDispatcher.run(+277)
| Remote exception in invoking WS...
| java.lang.ArrayIndexOutOfBoundsException
| at com.mm.j2me.midp.model.ModelFacade.createAccount(+31)
| at com.mm.j2me.midp.ui.UIController$EventDispatcher.run(+277)
|
Now, i have seen a similar thread where it was said that J2ME clients are not HTTP1.1 compliant, and the solution suggeste dwas to list the J2ME agent in tomcat\server.xml
my tomcat\server.xml looks like this:
| <!-- A HTTP/1.1 Connector on port 8080 -->
| <Connector port="8090" address="${jboss.bind.address}"
| maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| enableLookups="false" redirectPort="8443" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true"
| restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$ .*MIDP*" />
|
but still i am getting the exception...
can anyone suggest me any workaround? or any solutions?
thanks in advance and regards
Marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991452#3991452
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991452
18 years, 1 month
[EJB 3.0] - Serialization problem of Stateful Session Bean and Seam
by dungying
I have the following problem and no idea what it means. This exception will be thrown only after the application sits still for a while without being touched by the users. I think the serialization/de-serialization happens, and somehow inbetween it has problem to proceed. By the way I am using DataModel feature of Seam with a stateful session bean. Please shed some light if you have any clue. Appreciated.
12:42:14,113 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: Cannot get value for expression '#{dealadmin.lookupValue.runSta
tusDescriptions}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
at javax.faces.component.UISelectItems.getValue(UISelectItems.java:55)
at org.apache.myfaces.shared_impl.util.SelectItemsIterator.hasNext(SelectItemsIterator.java
:102)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(Rendere
rUtils.java:477)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getSelectItemList(RendererUtils.j
ava:453)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.internalRenderSelect(Htm
lRendererUtils.java:277)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererU
tils.java:251)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRen
dererBase.java:54)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
at org.apache.jsp.datamng.RunDetails_jsp._jspx_meth_h_selectOneMenu_1(RunDetails_jsp.java:1
910)
at org.apache.jsp.datamng.RunDetails_jsp._jspService(RunDetails_jsp.java:473)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java
:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalCo
ntextImpl.java:416)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java
:234)
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.j
ava:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Ht
tp11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: Exception getting value of property lookupValue of b
ase of type : $Proxy662
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:96)
at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
... 53 more
Caused by: javax.faces.el.EvaluationException: Bean: $Proxy662, property: lookupValue
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
... 56 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
... 57 more
Caused by: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not
create instance of java.util.HashMap$KeySet - java.util.HashMap$KeySet
at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanConte
xt.java:365)
at org.jboss.ejb3.stateful.StatefulBeanContext.getInstance(StatefulBeanContext.java:309)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.j
ava:75)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.ja
va:78)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:
106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:188)
at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
at $Proxy662.getLookupValue(Unknown Source)
... 62 more
Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of java.uti
l.HashMap$KeySet - java.util.HashMap$KeySet
at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:327)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
39)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersis
ter.java:353)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.jav
a:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
41)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersis
ter.java:353)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.jav
a:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
41)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersis
ter.java:353)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.jav
a:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
41)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.ArrayPersister.readObjectArray(ArrayPersister.java:196)
at org.jboss.serial.persister.ArrayPersister.readData(ArrayPersister.java:172)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.jav
a:165)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:342)
at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68)
at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanConte
xt.java:342)
... 74 more
Caused by: java.lang.InstantiationException: java.util.HashMap$KeySet
at java.lang.Class.newInstance0(Class.java:335)
at java.lang.Class.newInstance(Class.java:303)
at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:319)
... 105 more
12:42:14,123 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Cannot get value for expression '#{dealadmin.lookupValue.runStatusDescr
iptions}'
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalCo
ntextImpl.java:435)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java
:234)
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.j
ava:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Ht
tp11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: Cannot get value for expression '#{dealadmin.lookupV
alue.runStatusDescriptions}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
at javax.faces.component.UISelectItems.getValue(UISelectItems.java:55)
at org.apache.myfaces.shared_impl.util.SelectItemsIterator.hasNext(SelectItemsIterator.java
:102)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(Rendere
rUtils.java:477)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getSelectItemList(RendererUtils.j
ava:453)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.internalRenderSelect(Htm
lRendererUtils.java:277)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererU
tils.java:251)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRen
dererBase.java:54)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
at org.apache.jsp.datamng.RunDetails_jsp._jspx_meth_h_selectOneMenu_1(RunDetails_jsp.java:1
910)
at org.apache.jsp.datamng.RunDetails_jsp._jspService(RunDetails_jsp.java:473)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173
)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java
:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalCo
ntextImpl.java:416)
... 28 more
Caused by: javax.faces.el.EvaluationException: Exception getting value of property lookupValue of b
ase of type : $Proxy662
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:96)
at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
... 53 more
Caused by: javax.faces.el.EvaluationException: Bean: $Proxy662, property: lookupValue
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
... 56 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
... 57 more
Caused by: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not
create instance of java.util.HashMap$KeySet - java.util.HashMap$KeySet
at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanConte
xt.java:365)
at org.jboss.ejb3.stateful.StatefulBeanContext.getInstance(StatefulBeanContext.java:309)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.j
ava:75)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.ja
va:78)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:
106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:188)
at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
at $Proxy662.getLookupValue(Unknown Source)
... 62 more
Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of java.uti
l.HashMap$KeySet - java.util.HashMap$KeySet
at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:327)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
39)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersis
ter.java:353)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.jav
a:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
41)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersis
ter.java:353)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.jav
a:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
41)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersis
ter.java:353)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.jav
a:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:2
41)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.persister.ArrayPersister.readObjectArray(ArrayPersister.java:196)
at org.jboss.serial.persister.ArrayPersister.readData(ArrayPersister.java:172)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStream
ing(ObjectDescriptorFactory.java:411)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDes
criptorFactory.java:81)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataC
ontainer.java:639)
at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.jav
a:165)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:342)
at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68)
at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanConte
xt.java:342)
... 74 more
Caused by: java.lang.InstantiationException: java.util.HashMap$KeySet
at java.lang.Class.newInstance0(Class.java:335)
at java.lang.Class.newInstance(Class.java:303)
at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:319)
... 105 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991451#3991451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991451
18 years, 1 month
[EJB/JBoss] - Transaction Isolation in Embeddable EJB3
by dangelo1
I'm not sure if this is the right place to post this but I have a question about the Embeddable EJB3 Container and setting the datasource's Transaction Isolation Level:
Basically, I am trying to test that when we read a record from a database that we have a READ_LOCK on it by setting the Transaction Isolation level to REPEATABLE_READ. Here is what I'm doing in the test:
1) I have a Thread that starts a new transaction and obtains a read lock on a database record.
a) The record is created if it does not yet exists (by calling an EJB with REQUIRES_NEW and inserts that record.
b) The record is then fetched to obtain a readlock.
2) While holding that readlock, I have another thread that starts a new transaction and tries to update the locked record.
3) The test is basically to check that the updating thread blocks and waits for the locking thread to release the lock before updating the record.
I have successfully ran the test in JBOSS Application Server 4.0.4 but on the EmbeddableEJB3 container here is what happens:
1) If I don't have the transaction isolation level set to the datasource, the test fails because the database has a READ_COMMITTED (this is the expected behaviour)
2) If I set the transaction isolation level to REPEATABLE_READ, on the first instance where it tries to insert the record to lock because it doesn't exists yet, my test just hangs and goes into a deadlock situation.
This is last entry I get from the logs and I noticed that it doesn't seem to be commiting the transactions began:
4328 DEBUG com.orchestral.component.repository.core.persistence.PersistenceStateManager - PersistenceState was successfully rebuilt.
4328 DEBUG com.orchestral.component.repository.core.persistence.PersistenceStateManager - Initial PersistenceState sucessfully initialised.
4422 TRACE org.jboss.tm.TxManager - began tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1165349215672/1, BranchQual=null:1165349215672, localId=0:1]
4438 INFO com.orchestral.component.repository.core.persistence.domain.metadata.DocumentStorageMetaDataTest - Locking Thread starting...
4438 INFO com.orchestral.component.repository.core.persistence.domain.metadata.DocumentStorageMetaDataTest - Locking Thread -- Retrieving the CoreMetaDataRepositoryBean/local...
4438 INFO com.orchestral.component.repository.core.persistence.domain.metadata.DocumentStorageMetaDataTest - Locking Thread -- Obtaining the lock for the metadata...
4438 DEBUG com.orchestral.component.repository.core.ejb.impl.CoreMetaDataRepositoryBean - Retrieving the storage metadata map...
4531 DEBUG com.orchestral.component.repository.core.ejb.impl.CoreMetaDataRepositoryBean - Obtaining a read lock for Storage metadata with id '9aa74314-9d28-4d6f-bb10-c86966bde8a2'...
4844 TRACE org.jboss.tm.TxManager - suspended tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1165349215672/1, BranchQual=null:1165349215672, localId=0:1]
4844 TRACE org.jboss.tm.TxManager - began tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1165349215672/2, BranchQual=null:1165349215672, localId=0:2]
4844 DEBUG com.orchestral.component.repository.core.ejb.impl.CoreMetaDataRepositoryBean - Creating a new StorageMetaData for item with id '9aa74314-9d28-4d6f-bb10-c86966bde8a2'.
4860 TRACE org.jboss.tm.TxManager - suspended tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1165349215672/2, BranchQual=null:1165349215672, localId=0:2]
4860 TRACE org.jboss.tm.TxManager - began tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1165349215672/3, BranchQual=null:1165349215672, localId=0:3]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991445#3991445
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991445
18 years, 1 month