[jboss-user] [JNDI/Naming/Network] - NamingContext cannot be cast to AnswerBean

2007-04-06 Thread efmcuiti
Hello everyone, I have an EJB3 (.par) persistence project deployed in a Jboss 4.0.5 GA. I needs to instantiate the AnswerBean (a remote interface) from a stand alone java application. My code looks like: | props.put(Context.INITIAL_CONTEXT_FACTORY,org.jnp.interfaces.NamingContextFactory);

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Failed to Laizy load the Collection

2006-11-28 Thread efmcuiti
reubenf wrote : I think the problem is as follows: With lazy loading, objects are not loaded until referenced. Until then, references are to proxy objects. So, since all loads need to be done in the context of a session, if you load a parent object and never reference the child object until

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Failed to Laizy load the Collection

2006-11-27 Thread efmcuiti
Hello everyone, I'm using jboss 4.0.5 GA and EJB3 specification with JPA(Java Persistence API). In one persistent entity a have something like this: @OneToMany private Collection roles; But when in my web application (in a Servlet or jsp) i do something like this: Collection roles =

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Failed to Laizy load the Collection

2006-11-27 Thread efmcuiti
Here is the error message that the jboss console throws: org.hibernate.lazyInitializationException: failed to lazily initialize a collection of role: org.tha.User.roles, no session or session was closed I hope you can help me View the original post :