1 2 3 4 Previous Next 49 Replies Latest reply on Feb 15, 2008 9:27 AM by jbalunas Go to original post
      • 45. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
        jbalunas

        That is really good feedback and thanks for checking your application on windows and linux.

        I'll look into the windows behavior of websphere and attempt to figure out what is happening there. I will attempt to look into it next week and see if I can figure out what websphere is doing differently on windows.

        Jay

        • 46. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
          ioannis

          Ok, Thanks, that's great.

          But, as I said, while the jpa example worked on linux, my own application (with identical components.xml and persistence.xml) did not work. It still got the same ClassCastException on linux. So there's probably a bit more to it that just Linux vs Windows.

          • 47. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
            vietbird

            I got the same problem some weeks ago but I have fixed it.
            You can avoid the class cast exception just by removing the persistence-api.jar from the ear/war.

            • 48. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
              vietbird

              Seam + EJB3 in WAS 6.1 example works fine for me.
              EXCEPT:
              When a session is time out while a stateful bean is in action (e.g. if I search for the Hotels and leave the result list open for about 10 minutes without doing anything else), there will be an exception:

              [15/02/08 12:20:33:984 EST] 0000001f Helpers W NMSV0605W: A javax.naming.Reference object looked up from the context "java:" with the name "comp/EJBContext" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
              Reference Factory Class Name: com.ibm.ws.ejbcontainer.injection.factory.EJBContextObjectFactory
              Reference Factory Class Location URLs: <null>
              Reference Class Name: javx.ejb.EJBContext
              
              Exception data follows:
              com.ibm.wsspi.injectionengine.InjectionException: EJBContext may only be looked up by or injected into an EJB
               at com.ibm.ws.ejbcontainer.injection.factory.EJBContextObjectFactory.getObjectInstance(EJBContextObjectFactory.java:84)
               at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:316)
               at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:917)
               at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:191)
               at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:407)
               at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1280)
               at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
               at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204)
               at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144)
               at javax.naming.InitialContext.lookup(InitialContext.java:363)
               at org.jboss.seam.util.EJB.getEJBContext(EJB.java:115)
               at org.jboss.seam.transaction.Transaction.createCMTTransaction(Transaction.java:66)
               at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:50)
               at sun.reflect.GeneratedMethodAccessor751.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:618)
               at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
               at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
               at org.jboss.seam.Component.unwrap(Component.java:2108)
               at org.jboss.seam.Component.getInstance(Component.java:1887)
               at org.jboss.seam.Component.getInstance(Component.java:1852)
               at org.jboss.seam.Component.getInstance(Component.java:1829)
               at org.jboss.seam.Component.getInstance(Component.java:1824)
               at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
               at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:331)
               at org.jboss.seam.contexts.Lifecycle.endCall(Lifecycle.java:96)
               at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:122)
               at org.jboss.seam.intercept.RootInterceptor.invokeAndHandle(RootInterceptor.java:84)
               at org.jboss.seam.intercept.SessionBeanInterceptor.prePassivate(SessionBeanInterceptor.java:56)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:618)
               at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:227)
               at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:526)
               at com.ibm.ejs.container.interceptors.InvocationContextImpl.doLifeCycle(InvocationContextImpl.java:231)
               at com.ibm.ejs.container.StatefulBeanO.passivate(StatefulBeanO.java:1083)
               at com.ibm.ejs.container.StatefulBeanO.uninstall(StatefulBeanO.java:1485)
               at com.ibm.ejs.container.activator.StatefulSessionActivationStrategy.atTimeout(StatefulSessionActivationStrategy.java:611)
               at com.ibm.ejs.container.activator.Activator.timeoutBean(Activator.java:851)
               at com.ibm.ejs.container.StatefulBeanReaper.deleteBean(StatefulBeanReaper.java:468)
               at com.ibm.ejs.container.StatefulBeanReaper.sweep(StatefulBeanReaper.java:295)
               at com.ibm.ejs.container.StatefulBeanReaper.alarm(StatefulBeanReaper.java:252)
               at com.ibm.ejs.util.am._Alarm.run(_Alarm.java:90)
               at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
              
              [15/02/08 12:20:33:984 EST] 0000001f Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
              Context implementation: com.ibm.ws.naming.java.javaURLContextRoot
              Context method: lookup(Name)
              Context name: java:
              Target name: comp/EJBContext
              Other data: ""
              Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.wsspi.injectionengine.InjectionException: EJBContext may only be looked up by or injected into an EJB]
               at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1021)
               at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:191)
               at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:407)
               at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1280)
               at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
               at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204)
               at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144)
               at javax.naming.InitialContext.lookup(InitialContext.java:363)
               at org.jboss.seam.util.EJB.getEJBContext(EJB.java:115)
               at org.jboss.seam.transaction.Transaction.createCMTTransaction(Transaction.java:66)
               at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:50)
               at sun.reflect.GeneratedMethodAccessor751.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:618)
               at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
               at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
               at org.jboss.seam.Component.unwrap(Component.java:2108)
               at org.jboss.seam.Component.getInstance(Component.java:1887)
               at org.jboss.seam.Component.getInstance(Component.java:1852)
               at org.jboss.seam.Component.getInstance(Component.java:1829)
               at org.jboss.seam.Component.getInstance(Component.java:1824)
               at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
               at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:331)
               at org.jboss.seam.contexts.Lifecycle.endCall(Lifecycle.java:96)
               at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:122)
               at org.jboss.seam.intercept.RootInterceptor.invokeAndHandle(RootInterceptor.java:84)
               at org.jboss.seam.intercept.SessionBeanInterceptor.prePassivate(SessionBeanInterceptor.java:56)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:618)
               at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:227)
               at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:526)
               at com.ibm.ejs.container.interceptors.InvocationContextImpl.doLifeCycle(InvocationContextImpl.java:231)
               at com.ibm.ejs.container.StatefulBeanO.passivate(StatefulBeanO.java:1083)
               at com.ibm.ejs.container.StatefulBeanO.uninstall(StatefulBeanO.java:1485)
               at com.ibm.ejs.container.activator.StatefulSessionActivationStrategy.atTimeout(StatefulSessionActivationStrategy.java:611)
               at com.ibm.ejs.container.activator.Activator.timeoutBean(Activator.java:851)
               at com.ibm.ejs.container.StatefulBeanReaper.deleteBean(StatefulBeanReaper.java:468)
               at com.ibm.ejs.container.StatefulBeanReaper.sweep(StatefulBeanReaper.java:295)
               at com.ibm.ejs.container.StatefulBeanReaper.alarm(StatefulBeanReaper.java:252)
               at com.ibm.ejs.util.am._Alarm.run(_Alarm.java:90)
               at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
              Caused by: com.ibm.wsspi.injectionengine.InjectionException: EJBContext may only be looked up by or injected into an EJB
               at com.ibm.ws.ejbcontainer.injection.factory.EJBContextObjectFactory.getObjectInstance(EJBContextObjectFactory.java:84)
               at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:316)
               at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:917)
               ... 43 more
              
              



              I am using OpenJPA provider shipped with WAS. Also declared inside components.xml the transaction:
              <transaction:ejb-transaction/>


              Does anyone have some ideas about this?

              Thanks


              • 49. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                jbalunas

                This is documented as a note in the reference documentation. Websphere's statefull session bean timeout default is 10 minutes. You can adjust this using Websphere specific deployment descriptors.

                As stated in the note - that was beyond the scope of the reference docs. Take a look at the websphere docs site for details on how to do that.

                -Jay

                1 2 3 4 Previous Next