1 Reply Latest reply on Jun 6, 2006 10:34 AM by Christian Fein

    @PersistenceContext(type=PersistenceContextType.EXTENDED) -

    Christian Fein Newbie

      with:
      @PersistenceContext(type=PersistenceContextType.EXTENDED)
      protected EntityManager em;

      i get a ClassCastException. Without the EXTENDED PersistenceContextType everything works fine.

      But i wanna change from EAGER to Lazy loading and so i need a Extended PersistenceContext.

      i googled for: "org.jboss.ejb3.injection.ExtendedPersistenceContextInjector.inject(ExtendedPersistenceContextInjector.java:57)" and got 0 results. Maybe i found something or i just did another stupid error ;)

      JBoss-4.0.4-GA

      Exception in thread "main" java.lang.ClassCastException: org.jboss.ejb3.stateless.StatelessBeanContext
       at org.jboss.ejb3.injection.ExtendedPersistenceContextInjector.inject(ExtendedPersistenceContextInjector.java:57)
       at org.jboss.ejb3.injection.ExtendedPersistenceContextInjector.inject(ExtendedPersistenceContextInjector.java:52)
       at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:88)
       at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java: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.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
       at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
       at org.jboss.remoting.Client.invoke(Client.java:525)
       at org.jboss.remoting.Client.invoke(Client.java:488)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
       at $Proxy0.getAllBoards(Unknown Source)