I got this to work by copying my ejb's jar file to JBOSS_HOME\lib\ext
I'm not sure why this is needed since this file is already in the deploy
directory.
Also, Can someone point me to a good resource to explain what .war and .ear
files are supposed to contain and what threir purposes are?
Thanks,
dave
- Original Message -
From: "David L Solomon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 16, 2001 2:16 PM
Subject: [JBoss-user] problem with JNDI lookup...
> I am running JBOSS 2.2 with embedded tomcat 3.2.1 on NT 4.0 sp6
>
> I have a test program which tests my ejb using the following code:
>
>
> // Get a naming context
>
> InitialContext jndiContext = new InitialContext();
>
> System.out.println("Got context");
>
> // This is in the case you use the jboss.xml to override the JNDI name
>
> Object ref = jndiContext.lookup("ValidateUser");
>
> System.out.println("Got reference");
>
> // Get a reference from this to the Bean's Home interface
>
> ValidateUserHome home = (ValidateUserHome) PortableRemoteObject.narrow
(ref,
> ValidateUserHome.class);
>
> // Create an Interest object from the Home interface
>
> ValidateUser l_ValidateUser = home.create();
>
> .// call beans methods here
>
>
>
>
>
> This works just fine. However, when i call this exact same code from a
> servlet, I get the following exception ( thrown from the call to
> jndiContext.lookup("ValidateUser");) )
>
>
>
> Got context javax.naming.CommunicationException [Root exception is
> java.lang.ClassNotFoundException: database.ValidateUserHome]
>
>
>
>
>
> Finally, this works just fine from a servlet when i run (older versions
Pre
> 2.1 ) jboss and and tomcat 3.2.1 in separate JVMs.
>
> Thanks in advance for any help on this.
>
>
>
> dave
>
>
>
>
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user