0 Replies Latest reply on Jan 15, 2010 2:42 PM by Markus Weiss

    GlassFish Webservice Problem desperately searching help

    Markus Weiss Newbie

      I'm using seam (tested with 2.1.2 and 2.2.0) on glassfish 2.1.1 with EAR deployment and everything including persistence works great within the web client (generated by seam-gen).
      If I add a web service following the web service guide in the documentation (include HandlerChain...) and add LifeCycle.beginCall()... to the service I can use seam components, but as far as I try to get data from the persistence unit I get:




      org.jboss.seam.InstantiationException: Could not instantiate Seam component: testComponent
      ...
      Caused by: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:comp/env/webservicetest/pu
          at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:245)
          at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:78)
          at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107)
          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:597)
          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
          at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
          at org.jboss.seam.Component.unwrap(Component.java:2275)
          at org.jboss.seam.Component.getInstance(Component.java:2041)
          at org.jboss.seam.Component.getInstance(Component.java:1983)
          at org.jboss.seam.Component.getInstance(Component.java:1977)
          at org.jboss.seam.Component.getInstance(Component.java:1972)
          at org.jboss.seam.framework.Controller.getComponentInstance(Controller.java:272)
          at org.jboss.seam.framework.PersistenceController.getPersistenceContext(PersistenceController.java:20)
          at org.jboss.seam.framework.EntityQuery.getEntityManager(EntityQuery.java:159)
          at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:39)
          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:597)
          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
          at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
          at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
          at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97)
          at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
          at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91)
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
          at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
          at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
          at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
          at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
          at com.siemens.energy.td.webservicetest.action.StatusList_$$_javassist_seam_2.validate(StatusList_$$_javassist_seam_2.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:597)
          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
          at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
          at org.jboss.seam.Component.callCreateMethod(Component.java:2172)
          at org.jboss.seam.Component.newInstance(Component.java:2132)
          ... 108 more





      I also tested seambay example in JBoss and GlassFish (both web clients work) and as expected the webservices in JBoss are working and in GlassFish not.