-
1. Re: Error NoInitialContextException
cdkcdk Aug 27, 2002 10:38 AM (in response to alexb)See Beginner's corner
-
2. Re: Error NoInitialContextException
alexb Aug 27, 2002 10:58 AM (in response to alexb)Thanks looked at beginner's nothing.
-
3. Re: Error NoInitialContextException
cdkcdk Aug 27, 2002 11:03 AM (in response to alexb)What did u put in your jndi file ?
What do u use to run your client ? -
4. Re: Error NoInitialContextException
alexb Aug 27, 2002 11:09 AM (in response to alexb)Sorry I look at your post in Beginner's corner my jndi looks like this
java.naming.provider.url=localhost:1099
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
My client is a simple class using jndi lookup. -
5. Re: Error NoInitialContextException
cdkcdk Aug 27, 2002 11:16 AM (in response to alexb)This seems good...
What command line do you use to run your client ? -
6. Re: Error NoInitialContextException
alexb Aug 27, 2002 11:24 AM (in response to alexb)I'm running the client using JBuilder 4.0 I have jbuilder configured to use junit.
-
7. Re: Error NoInitialContextException
cdkcdk Aug 27, 2002 11:30 AM (in response to alexb)Ok try the following command into console Window :
yourdirectory:\>java -cp yourJNDIfile yourClient
I had the same problem with another Java editor, so maybe this will help you... -
8. Re: Error NoInitialContextException
alexb Aug 27, 2002 11:56 AM (in response to alexb)Tried that got this now what do you have on your classpath
I think something is missing.
java.lang.NoClassDefFounderError
thanks -
9. Re: Error NoInitialContextException
cdkcdk Aug 27, 2002 12:02 PM (in response to alexb)Try then to use this after the -cp :
%CLASSPATH%;yourJNDIfile;someJarFilesLocatedInJbossClient
Directory
Those depends on what your client uses. But I think all you need is in the %JBOSS_HOME%\client directory, unless you use an external package...
Obiwan -
10. Re: Error NoInitialContextException
alexb Aug 27, 2002 12:42 PM (in response to alexb)I added Boss3.0\jboss-3.0.0\client to my classpath it still didn't work I have no Idea do you have any example you can zip up because I bought the documention and the book follow it just can't test the session bean.
thanks
Alex -
11. Re: Error NoInitialContextException
cdkcdk Aug 28, 2002 4:59 AM (in response to alexb)There are some examples available in this forum. You can try them out...
I saw some 'uno.jar' that might help you.
What's the error message now ? -
12. Re: Error NoInitialContextException
alexb Aug 28, 2002 8:59 AM (in response to alexb)I'm now getting this error javax.naming.NameNotFoundException: comp not bound
I have been reading some of the post on the forum about it. In my test client I do a look up like this.
Object ref = initCtx.lookup("java:comp/env/ejb/SleeperServiceHome");
SleeperServiceHome home = (SleeperServiceHome)PortableRemoteObject.narrow( ref, SleeperServiceHome.class );
thanks
Alex -
13. Re: Error NoInitialContextException
cdkcdk Aug 28, 2002 9:31 AM (in response to alexb)I've also had problems of type 'NameNotFoundException', but never saying that 'comp' was 'not bound'...
Maybe you can try
Object ref = initCtx.lookup("ejb/SleeperServiceHome");
but I'm not convinced it'll work...
Good luck !