geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neal Sanche <n...@nsdev.org>
Subject Standalone Clients
Date Sat, 25 Jun 2005 20:51:21 GMT
Hi All,

I am trying to make a standalone client using Geronimo HEAD. It's not 
going so well so far. I've done the following:

    public void Connect() {
        String hostName = "127.0.0.1";
        String port = "4201";
       
        System.setProperty("java.naming.factory.initial",
                "org.openejb.client.RemoteInitialContextFactory");
        System.setProperty("java.naming.provider.url", hostName+":"+port);
        System.setProperty("java.naming.security.principal", "system");
        System.setProperty("java.naming.security.credentials", "manager");
       
        try {
            Context ic = new InitialContext();
            Object o = ic.lookup(PhoneBookSessionHome.JNDI_NAME);
           
            PhoneBookSession session = 
PhoneBookSessionUtil.getHome().create();
           
            fireConnectionEvent(true);
        } catch (Throwable ex) {
            ex.printStackTrace();
            fireConnectionEvent(false);
        }
    }

The code fails on the 'new InitialContext()' with the error:

javax.naming.AuthenticationException: Cannot read the response from the 
server.; nested exception is:
    java.io.EOFException
    at org.openejb.client.JNDIContext.authenticate(JNDIContext.java:196)
    at 
org.openejb.client.JNDIContext.getInitialContext(JNDIContext.java:181)
    at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:175)
    at org.acme.phonebook.client.Application.Connect(Application.java:70)

Should I be loading some sort of deployment into my Geronimo server 
first? The port 4201 seems to answer telnet connections, so there's 
something there. According to an article on the IBM site, the client 
needs the following Jars in the classpath, which I have done:

    * openejb-core-2.0-SNAPSHOT.jar
    * geronimo-spec-j2ee-1.4-rc4.jar
    * geronimo-kernel-1.0-SNAPSHOT.jar
    * geronimo-security-1.0-SNAPSHOT.jar
    * cglib-nodep-2.1.jar

Any ideas?

Thanks.

-Neal




Mime
View raw message