1 Reply Latest reply on Mar 14, 2006 5:35 AM by Emmanuel Bernard

    Client side EJB3 dependencies... jbossall-client is not enou

    paulo silveira Newbie

      With a remote client getting in touch with a serialized entity bean, I am getting a LazyInitializationException. Is this the right thing to do? it seems that the dynamic proxy is also been serialized, this way I need hibernate jars on client side. quite odd.

      shouldn't only an EJB expcetion be thrown?

      SEVERE: could not initialize proxy - no Session
      org.hibernate.LazyInitializationException: could not initialize proxy - no Session
       at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:53)
       at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
       at ejb3.Autor$$EnhancerByCGLIB$$dddbeaee.toString(<generated>)
       at java.lang.String.valueOf(Unknown Source)
       at java.lang.StringBuilder.append(Unknown Source)
       at ejb3.Livro.toString(Livro.java:49)
       at java.lang.String.valueOf(Unknown Source)
       at java.util.AbstractCollection.toString(Unknown Source)
       at java.lang.String.valueOf(Unknown Source)
       at java.io.PrintStream.print(Unknown Source)
       at java.io.PrintStream.println(Unknown Source)
       at ejb3.Cliente.main(Cliente.java:32)
      Exception in thread "main" org.hibernate.LazyInitializationException: could not initialize proxy - no Session
       at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:53)
       at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
       at ejb3.Autor$$EnhancerByCGLIB$$dddbeaee.toString(<generated>)
       at java.lang.String.valueOf(Unknown Source)
       at java.lang.StringBuilder.append(Unknown Source)
       at ejb3.Livro.toString(Livro.java:49)