Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

errors accessing collections in CMP-CMR

2 views
Skip to first unread message

Steve Ebersole

unread,
May 31, 2002, 9:50:36 AM5/31/02
to

I have a m:n relationship defined between Company and Address entity beans (the pertinent
mapping sections are below).
I am able to successfully retrieve a Company remote reference. However, when attempting
to call it's getAddresses() method I get the following error:

java.io.InvalidClassException: javax.ejb.EJBException; Local class not compatible:
stream classdesc serialVersionUID=-9219910240172116449 local class serialVersionUID=796770993296843510
at java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:523)
at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:567)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:936)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:29)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:66)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:38)
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:175)
at weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputStream.java:154)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:581)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:311)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:225)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Exception creating response
stream ] - with nested exception:
[java.io.InvalidClassException: javax.ejb.EJBException; Local class not compatible:
stream classdesc serialVersionUID=-9219910240172116449 local class serialVersionUID=796770993296843510]
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:184)
at weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputStream.java:154)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:581)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:311)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:225)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Error occurred : weblogic.rjvm.PeerGoneException: ; nested exception is:
weblogic.utils.NestedException: ***** ASSERTION FAILED *****[ Exception creating
response stream ] - with nested exception:
[weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Exception creating
response stream ] - with nested exception:
[java.io.InvalidClassException: javax.ejb.EJBException; Local class not compatible:
stream classdesc serialVersionUID=-9219910240172116449 local class serialVersionUID=796770993296843510]]

Anyone have any ideas on what I need to do to correct this?


Mapping from ejb-jar.xml:
<ejb-relation>
<ejb-relation-name>Company-Address</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Company-Has-Addresses</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>Company</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>addresses</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>Address-Has-Companies</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>Address</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>

Mapping from weblogic-cmp-rdbms-jar.xml:
<weblogic-rdbms-relation>
<relation-name>Company-Address</relation-name>
<table-name>COMP_ADDR_JT</table-name>
<weblogic-relationship-role>
<relationship-role-name>Company-Has-Addresses</relationship-role-name>
<column-map>
<foreign-key-column>COMP_ID</foreign-key-column>
<key-column>COMP_ID</key-column>
</column-map>
</weblogic-relationship-role>
<weblogic-relationship-role>
<relationship-role-name>Address-Has-Companies</relationship-role-name>
<column-map>
<foreign-key-column>ADDR_ID</foreign-key-column>
<key-column>ADDR_ID</key-column>
</column-map>
</weblogic-relationship-role>
</weblogic-rdbms-relation>

Greg Nyberg

unread,
May 31, 2002, 5:32:46 PM5/31/02
to
My guess is that you are trying to retrieve a "magic" cmr collection of
local interfaces through a remote method. I don't believe that is legal...

If you want to use a remote method to retrieve cmr collections, you may need
to iterate through the cmr collection within the remote method
implementation and create a new regular collection of remote interfaces, one
remote for each local reference returned by the cmr get method.. then return
that collection. You can't manipulate the collection and modify the bean
relationships, of course, since it is just a clone of the "magic" cmr
collection.

For grins, you could try getting a local interface to Company and calling
getAddresses() on it to verify that it is the "remoteness" of the Company
that is breaking things.

-Greg
-----------------------------------------------------------
Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
www.amazon.com/exec/obidos/ASIN/1931822468 or www.titan-books.com

"Steve Ebersole" <steb...@vignette.com> wrote in message
news:3cf77fac$1...@newsgroups2.bea.com...

0 new messages