I have a servlet that is calling a Bean in my seam application. The servlet is working correctly and calls the Bean correctly, but when the bean needs to call the em.persist(object) method, the em is null.
I used this bean in my app using beta1 and used an initial context lookup | EnvelopeUpload uploader = null; | try | { | uploader = Utils.getEnvelopeUploader(); | } | catch (Exception e) | { | e.printStackTrace(); | } | | Utils returning | try | { | log.info("Getting the initial Context"); | InitialContext ctx = new InitialContext(); | log.info(" got the context - " + ctx); | EnvelopeUpload envelopeUpload = (EnvelopeUpload) ctx.lookup(EnvelopeUpload.class.getName()); | log.info("The envelope is - " + envelopeUpload); | return envelopeUpload; | } | catch (Exception e) | { | e.printStackTrace(); | throw e; | } | If I try the Context lookup now in beta2 I get a "classNotFound" exception. I have also tried em = (EntityManager) Component.getInstance("em", true); And get IllegalStateException: No active application scope Please can someone let me know how to solve this issue Thanks View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927698#3927698 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927698 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user