[Beginners Corner] - java.lang.ClassCastException: org.jboss.util.id.GUID cannot
by bpet36
Hi,
I am attempting to lookup and call methods on an ejb from a servlet where the two are deployed in separate ear files on the same JBoss server.
I believe I have encountered a classloading issue, if so, I am not sure how to resolve it. Can anyone help me resolve this problem?
Anyway, here is my latest progress, the exception is encountered at
obj = PortableRemoteObject.narrow(ctx.lookup("ejb/UserAdmin/UserBean" , Class.forName(className));
Is this a classloading issue or a configuration issue?
Has anyone encountered this problem? And if so do you know what I may be doing wrong.
Thanks in advance, hopefully someone has a clue as to what this problem may be.
Bob
Lookup code
InitialContext ctx = new InitialContext();
Object obj = null;
try {
obj = PortableRemoteObject.narrow(ctx.lookup("ejb/UserAdmin/UserBean"), Class.forName(className));
} 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)at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113960#4113960
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113960
18 years, 4 months
[JBoss Seam] - Error selecting object - SEAM 1.2.1GA
by james_hays
I'm using SEAM 1.2.1GA and have all of a sudden run into random errors selecting objects out of a drop down list. It doesn't have all the time and seems very random.
I've attempted to enhance the equals() method and the hashcode, but nothing seems to matter in that regard. When I debug the EntityConverter, the key associated with the object is incorrect. You can see this from the error message as well.
anonymous wrote : ERROR [EntityConverter] Cannot load entity (com.ball.lcgm.entity.User with id org.jboss.seam.ui.NoSelectionConverter.noSelectionValue) from persistence context
I mainly see this when my dropdown list is populated from an ajax call, but I've also seen this error when selecting from a selectManyCheckbox:
| <h:selectManyCheckbox value="#{manageOwners.ownersToRemove}" layout="pageDirection">
| <s:selectItems value="#{profileRecord.owners}" var="user" label="#{user.fullName}"/>
| <s:convertEntity/>
| </h:selectManyCheckbox>
| <h:commandButton action="#{manageOwners.removeOwners}" value="Remove Owners"/>
|
The error quoted above is directly from the specified code. As you can see, there is no mention of noSelectionValue.
Any help would be appreciated. I've read before to upgrade to the latest in CVS, but that is not an option at the moment. We do have a JBoss support agreement and if needed, I can escalate it there.
Thanks,
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113953#4113953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113953
18 years, 4 months