On Tuesday 02 October 2007 19:58, David Blevins wrote:
> Hi Augustus,
>
> On Oct 2, 2007, at 10:35 AM, Augustus Gingell wrote:
>
> > This may be obvious but I have been pulling my hair out.
> >
> > Have unpacked beta1 and have started the server.
> > Have built a simple 'hello' style ejb and deployed it.
> > Have build a client app which tries to instance the bean.
> >
> > When trying to connect to the server using InitialContext:
> > Properties p = new Properties();
> > p.put("java.naming.factory.initial",
> > "org.openejb.client.RemoteInitialContextFactory");
> > p.put("java.naming.provider.url", "127.0.0.1:4201");
> > p.put("java.naming.security.principal", user);
> > p.put("java.naming.security.credentials", password);
> >
> > It throws a:
> > javax.naming.AuthenticationException: Error while communicating
> > with server: ; nested exception is:
> > java.rmi.RemoteException: Cannot open object input stream
> > to server: ; nested exception is:
> > java.net.SocketException: Connection reset
> > etc. at the getInitialContext line.
> >
> > In the openejb/logs/openejb.log file I get:
> >
> > 2007-10-02 16:43:52,674 - ERROR - "null ��/0.0" FAIL "Unexpected
> > error - For input string: "t""
>
> Based on the "null 0.0/0.0" string, which should be the protocol
> version, it looks like you've got an old openejb-client jar in your
> path.
>
> A couple things to try:
>
> - Use org.apache.openejb.client.RemoteInitialContextFactory as the
> factory. We still support usage of
> org.openejb.client.RemoteInitialContextFactory and it is just a
> sublcass of the apache packaged version, but it should fail with
> ClassNotFoundException if you only have the old client in your path.
>
> - In your client try printing out "java.class.path" and post it.
> Maybe with some code like:
> System.out.println(System.getProperty("java.class.path"));
>
> Let us know what you find.
>
> -David
>
>
>
David,
Thank you for the amazingly prompt and accurate response, it was a classpath issue (when isn't
it!).
I am now using org.apache.openejb.client.RemoteInitialContextFactory, which
did produce the ClassNotFoundException as you suggested.
I am now looking forward to some fun with EJB3.
I will try to write up an example or 2, which result from our current project, if I get them
working :) and
the code is OK to release etc.
Gus
--
Augustus Gingell BEng ACGI
|