I am trying to access my EJB from a Unix command line client.
I am on Solaris using JDK 1.2.2.


When I create my initial context, I get this exception :

java.lang.ClassFormatError: __Proxy1 (Repeative method name/signature)

Exception in thread "main" java.lang.InstantiationError: No location
specified for ejb-ref Response



This is my code:

  try { InitialContext context = new InitialContext(); }
  catch ( Exception e ) { System.out.println(e) ; }

This is my application-client.xml :

<?xml version="1.0"?>
<!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application Client 1.2//EN"
"http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">

<application-client>
        <display-name>ApplicantClient</display-name>
        
        <ejb-ref>
                <ejb-ref-name>Response</ejb-ref-name>
                <home>ResponseHome</home>
                <ejb-ref-type>Entity</ejb-ref-type>
        </ejb-ref>
</application-client>

This is my jndi.properties:

java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont
extFactory
java.naming.provider.url=ormi://apsu.ocas.on.ca/bos
java.naming.security.principal=admin
java.naming.security.credentials=123

This is the full exception :

java.lang.ClassFormatError: __Proxy1 (Repeative method name/signature)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass0(Compiled Code)
        at java.lang.ClassLoader.defineClass(Compiled Code)
        at java.lang.ClassLoader.defineClass(Compiled Code)
        at com.evermind.net.if.findClass(Compiled Code)
        at java.lang.ClassLoader.loadClass(Compiled Code)
        at java.lang.ClassLoader.loadClass(Compiled Code)
        at java.lang.ClassLoader.loadClassInternal(Compiled Code)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName0(Compiled Code)
        at java.lang.Class.forName(Compiled Code)
        at com.evermind.reflect.Proxy.aks(JAX)
        at com.evermind.reflect.Proxy.akr(JAX)
        at com.evermind.reflect.Proxy.akp(JAX)
        at com.evermind.server.rmi.a8.f3(Compiled Code)
        at com.evermind.server.rmi.a5.resolveObject(JAX)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:383)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
        at com.evermind.server.rmi.a5.fi(JAX)
        at com.evermind.server.rmi.a8.gr(JAX)
        at com.evermind.server.rmi.a8.run(Compiled Code)
        at java.lang.Thread.run(Thread.java:479)
Exception in thread "main" java.lang.InstantiationError: No location
specified for ejb-ref Response
        at java.lang.Throwable.fillInStackTrace(Native Method)
        at java.lang.Throwable.fillInStackTrace(Compiled Code)
        at java.lang.Throwable.<init>(Compiled Code)
        at java.lang.Error.<init>(Error.java:50)
        at java.lang.LinkageError.<init>(LinkageError.java:43)
        at
java.lang.IncompatibleClassChangeError.<init>(IncompatibleClassChangeError.j
ava:43)
        at java.lang.InstantiationError.<init>(InstantiationError.java:47)
        at com.evermind.server.Application.akc(Compiled Code)
        at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(Compiled Code)
        at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
        at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
        at javax.naming.InitialContext.init(InitialContext.java:226)
        at javax.naming.InitialContext.<init>(InitialContext.java:182)
        at ApplicantClient.<init>(ApplicantClient.java:16)
        at ApplicantClient.main(ApplicantClient.java:24)

Reply via email to