[jboss-user] [JBoss Seam] - Re: Seam-managed persistence contexts and Glassfish

giannidoe do-not-reply at jboss.com
Fri Mar 16 10:16:13 EDT 2007


Still unable to get SMPCs working with an enterprise app and PostgreSQL, although the jpa example app works fine.

Anyone got any ideas why I'm receiving the following ClassCastException?

anonymous wrote : Caused by: java.lang.ClassCastException: java.lang.Long
  |         at org.jboss.seam.core.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:169)


anonymous wrote : [#|2007-03-16T14:43:58.503+0100|INFO|sun-appserver-pe9.0|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-8181-1;CommonLookupBean;|EJB5018: An exception was thrown during an ejb invocation on [CommonLookupBean]|#]
  | 
  | [#|2007-03-16T14:43:58.504+0100|INFO|sun-appserver-pe9.0|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-8181-1;|
  | javax.ejb.EJBException
  |         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3730)
  |         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3630)
  |         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
  |         at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(StatefulSessionContainer.java:1292)
  |         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
  |         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
  |         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:71)
  |         at $Proxy70.loadPersonTitles(Unknown Source)
  |         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.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  |         at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
  |         at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  |         at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
  |         at org.javassist.tmp.java.lang.Object_$$_javassist_0.loadPersonTitles(Object_$$_javassist_0.java)
  |         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.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
  |         at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
  |         at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1696)
  |         at org.jboss.seam.Component.getInstance(Component.java:1633)
  |         at org.jboss.seam.Component.getInstance(Component.java:1610)
  |         at org.jboss.seam.Component.getInstance(Component.java:1604)
  |         at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
  |         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
  |         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:58)
  |         at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
  |         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
  |         at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  |         at javax.faces.component.UISelectItems.getValue(UISelectItems.java:132)
  |         at org.jboss.seam.ui.UISelectItems.getValue(UISelectItems.java:188)
  |         at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:308)
  |         at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:506)
  |         at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:482)
  |         at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:447)
  |         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:847)
  |         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:893)
  |         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
  |         at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
  |         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:827)
  |         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:883)
  |         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
  |         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
  |         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
  |         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
  |         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
  |         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
  |         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
  |         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
  |         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
  |         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
  |         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
  |         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
  |         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
  |         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
  |         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
  |         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
  |         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
  |         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
  |         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
  |         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
  |         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processBlocked(ProcessorTask.java:607)
  |         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:842)
  |         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:436)
  |         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
  |         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
  | Caused by: java.lang.ClassCastException: java.lang.Long
  |         at org.jboss.seam.core.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:169)
  |         at org.jboss.seam.core.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:77)
  |         at org.jboss.seam.core.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:105)
  |         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.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
  |         at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
  |         at org.jboss.seam.Component.unwrap(Component.java:1860)
  |         at org.jboss.seam.Component.getInstance(Component.java:1657)
  |         at org.jboss.seam.Component.getInstance(Component.java:1610)
  |         at org.jboss.seam.Component.getValueToInject(Component.java:1885)
  |         at org.jboss.seam.Component.injectAttributes(Component.java:1368)
  |         at org.jboss.seam.Component.inject(Component.java:1195)
  |         at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  |         at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
  |         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 com.sun.ejb.containers.interceptors.AroundInvokeInterceptor$1.run(InterceptorManager.java:485)
  |         at java.security.AccessController.doPrivileged(Native Method)
  |         at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:479)
  |         at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:414)
  |         at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:188)
  |         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3839)
  |         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:184)
  |         ... 83 more
  | |#]
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028785#4028785

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028785



More information about the jboss-user mailing list