[jboss-user] [Beginners Corner] - Re: Call an ejb from Servlet in different application

bpet36 do-not-reply at jboss.com
Tue Dec 18 11:33:13 EST 2007


Anyone out there, Hello.

Anyway, here is my latest progress, I have added the lookup code and the exception that I am now getting.  The exception is encountered at 

obj = ctx.lookup("ejb/UserAdmin/UserBean);

Is this a classloading issue?

Thanks in advance, hopefully someone has a clue as to what this problem is.

Bob

Lookup code

InitialContext ctx = new InitialContext();
Object obj = null;
try {
    obj = ctx.lookup("ejb/UserAdmin/UserBean);
} catch (Exception e) {
    logger.log(Level.ERROR, e.getMessage(), e);
}               } 
UserBeanHome home = (UserBeanHome)obj; 
UserBean remote = (UserBean) home.create();


Exception

java.lang.ClassCastException: org.jboss.util.id.GUID cannot be cast to org.jboss
.util.id.GUID
        at org.jboss.invocation.InvokerInterceptor.readExternal(InvokerInterceptor.java:358)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
        at org.jboss.proxy.ejb.RetryInterceptor.readExternal(RetryInterceptor.java:291)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:80)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:156)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113860#4113860

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113860



More information about the jboss-user mailing list