db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bobby Lawrence <robe...@jlab.org>
Subject Re: Incompatible class Exception
Date Thu, 02 Jun 2005 13:30:43 GMT
Well  -
Here is the catch-all....my java objects don't even use collections!  
They are using arrays.
I have not gotten the chance to upgrade them to Collections yet.



Armin Waibel wrote:

> Bobby Lawrence wrote:
>
>> Well -
>> The OJB jar is not in the web-app classpath.
>> I have the jar in the EJB classpath.
>> I have removed it and I get the desired effect...the app server can't 
>> find the PersistenceBroker class.
>> When I use ANY version of > 1.0.1, I get this exception.
>> --Bobby
>>
>
> you mentioned that you use a remote session bean, so your client need
> org.apache.ojb.broker.util.collections.RemovalAwareCollection
> class in classpath too, because the serialized objects with 1:n 
> references use this class to store the referenced objects. How does 
> your webApp get access to this class? Maybe you put only this class 
> object in the classpath of your webApp.
>
> regards,
> Armin
>
>
>> Armin Waibel wrote:
>>
>>> Hi Bobby,
>>>
>>> Bobby Lawrence wrote:
>>>
>>>> OK - After upgrading to 1.0.3 and the newer version of the 
>>>> OJB.properties file, I am still getting the exception:
>>>>
>>>> java.io.InvalidClassException: 
>>>> org.apache.ojb.broker.util.collections.RemovalAwareCollection; 
>>>> local class incompatible: stream classdesc serialVersionUID = 
>>>> -7915096023416965226, local class serialVersionUID = 
>>>> 6853709708973269593
>>>>     at 
>>>> java.io.ObjectStreamClass.initNonProxy(Ljava.io.ObjectStreamClass;Ljava.lang.Class;Ljava.lang.ClassNotFoundException;Ljava.io.ObjectStreamClass;)V(Unknown

>>>> Source)
>>>
>>>
>>>
>>>
>>> strange, seems that you have two different versions of class
>>> org.apache.ojb.broker.util.collections.RemovalAwareCollection
>>> in your classpath (this is what the exception asserted).
>>> Are you really sure that both OJB jars (web-app and appServer) are 
>>> the same? Could it be the case that the webApp or the appServer use 
>>> some kind of "jar-cache" that still use an outdated jar?
>>>
>>> regards,
>>> Armin
>>>
>>>
>>>
>>>>     at 
>>>> java.io.ObjectInputStream.readNonProxyDesc(Z)Ljava.io.ObjectStreamClass;(Unknown

>>>> Source)
>>>>     at 
>>>> java.io.ObjectInputStream.readClassDesc(Z)Ljava.io.ObjectStreamClass;(Unknown

>>>> Source)
>>>>     at 
>>>> java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unknown

>>>> Source)
>>>>     at 
>>>> java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown 
>>>> Source)
>>>>     at 
>>>> java.io.ObjectInputStream.readObject()Ljava.lang.Object;(Unknown 
>>>> Source)
>>>>     at 
>>>> weblogic.rmi.internal.CBVInputStream.readObjectInternal()Ljava.lang.Object;(CBVInputStream.java:67)

>>>>
>>>>     at 
>>>> weblogic.rmi.internal.CBVInputStream.readObject()Ljava.lang.Object;(CBVInputStream.java:61)

>>>>
>>>>     at 
>>>> weblogic.rmi.internal.ServerRequest.unmarshalReturn()Ljava.lang.Object;(ServerRequest.java:97)

>>>>
>>>>
>>>> Any other ideas?
>>>> --Bobby
>>>>
>>>>
>>>> Martin Kalén wrote:
>>>>
>>>>> Bobby Lawrence wrote:
>>>>>
>>>>>> I just upgraded from OJB 1.0.1 to 1.0.3 and I keep getting an
>>>>>>
>>>>>> java.io.InvalidClassException: 
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <snip/>
>>>>>
>>>>>> I have NOT changed my OJB.properties file, could this have 
>>>>>> something to do with it?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Without looking to deeply into the stacktrace you sent;
>>>>> it is always recommended to upgrade OJB.properties and repository
>>>>> between releases. Please diff your old property file against the
>>>>> reference version from 1.0.3 and check if you need to adjust 
>>>>> anything.
>>>>>
>>>>> For 1.0.1 => 1.0.3 this is especially true if you are using the 
>>>>> ODMG API.
>>>>>
>>>>> (Also not the required change of auto-* repository settings
>>>>> for ODMG in v1.0.3 -- see repository.dtd for full details.)
>>>>>
>>>>> Regards,
>>>>>  Martin
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>

-- 
----------------------------
Bobby Lawrence
MIS Application Developer

Jefferson Lab (www.jlab.org)

 Email: robertl@jlab.org
Office: (757) 269-5818
 Pager: (757) 584-5818
----------------------------





---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message