i find a way to get it running:
moving all ejb-client relevant jars (including jndi.properties) from the
WEB-INF/lib directory to the tomcat/lib directory. i also have to place a
jar file with my ejb interface files in this directory.
why can't i use the WEB-INF/lib or WEB-INF/classes directory of my webapp
(at least for my application relevant ejb files) ?
what is the "standard" deployment procedure for this kind of web-frontend
(of an distributed application)?
thanx
sven
> -----Urspr�ngliche Nachricht-----
> Von: Scheil, Sven
> Gesendet am: Donnerstag, 13. September 2001 11:51
> An: '[EMAIL PROTECTED]'
> Betreff: [JBoss-user] HELP! error while getting reference to ejb
>
> hi!
>
> i've successfully deployed a stateless session bean on my
> jboss server. on
> another server i'm running an web application under
> apache/tomcat. from my
> webapplication (from within a javabean) i would like to get a
> connection to
> my ejb with the following lines:
>
> InitialContext jndiContext = new InitialContext();
> logger.debug("got context");
>
> // Get a reference to the Interest Bean
> Object ref = jndiContext.lookup("KundenModulServices");
> logger.debug("got reference");
>
> // Get a reference from this to the Bean's Home
> interface
> KundenModulServicesHome home = (KundenModulServicesHome)
> PortableRemoteObject.narrow(ref,
> KundenModulServicesHome.class);
>
> // Create an Interest object from the Home interface
> kundenModulServices = home.create();
> logger.debug("ejb created");
>
> the result is this error:
>
> javax.naming.NoInitialContextException: Need to specify class name in
> environment or system property, or as an applet parameter, or in an
> application resource file: java.naming.factory.initial
>
> i think the jndi.properties file is not found?!
>
> but: i put the jndi.properties in the WEB-INF/classes
> directory where all my
> other property files reside.
>
> i've tested the above code as a standalone client application. i've
> deployed the test client on my web server and the connection was
> established!
>
> Is there another way to specify the needed information?????
>
> please give me a hint....
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user