I think you should have in your jar also the jars under %JBOSS_HOME%/client

Hope it will help,

Marco
----- Original Message ----- 
From: "Satish" <[EMAIL PROTECTED]>
To: "'James Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 6:23 AM
Subject: RE: Calling EJBs from mailet


> Steve,
> 
> Thanks for the mail. The following is the code I'm using in the mailet
> (invoking ejb deployed on jboss from them mailet):
> 
> Properties p = new Properties();
> p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContex
> tFactory");
> System.out.println(".......step 1.......");
> p.put(Context.PROVIDER_URL,
> "http://193.50.50.23:8080/invoker/JNDIFactory";);
> System.out.println(".......step 2.......");
> //p.put(Context.SECURITY_PRINCIPAL,user);
> //p.put(Context.SECURITY_CREDENTIALS,password);
> //return new javax.naming.InitialContext(p);
> Context ctx = new javax.naming.InitialContext(p);
> System.out.println(".......step 3......."); 
> Object obj=ctx.lookup("MailLogSearch");
> System.out.println(".......step 4.......");
> 
> 
> I compile and copy the .jar file to james/lib.
> When I invoke this mailet, I'm getting the following error after
> pringint ...step1....and ....step2.....
> So, the error is in the line
> Context ctx = new javax.naming.InitialContext(p);
> 
> There was a fatal error while starting Embeddor.
> ReflectionException: Class not found: mx4j.adaptor.http.HttpAdaptor
> Cause: java.lang.ClassNotFoundException: mx4j.adaptor.http.HttpAdaptor
> 
> 
> It's asking for all jboss packages. Why is it so?
> 
> Regards,
> Satish
> 
> -----Original Message-----
> From: Steve Short [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 21, 2003 11:17 PM
> To: James Users List
> Subject: RE: Calling EJBs from mailet
> 
> Satish,
> 
> The code is exactly the same as calling EJBs from anywhere else !  Are
> you running James in the same VM as Jboss?  If not you may need to set
> up some additional properties when creating the InitialContext.
> 
> If you provide more information I may be able to help you further.
> 
> Steve
> 
> > -----Original Message-----
> > From: Satish [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, July 21, 2003 5:11 AM
> > To: 'James Users List'
> > Subject: Calling EJBs from mailet
> > 
> > 
> > Can anyone give me a code snippet of calling EJBs running on 
> > JBoss from a JAMES mailet?
> > 
> > Thanks
> > Satish
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to