This is one of them things I just love about Java. I had a similar problem when building DTO. They were compiled into the ejb.jar file and also into the .war file. All compiled fine, but when I deployed the application I got the same classes not compatable error. I tried forcing the UIDs to match, which ran, but I eneded up with null objects begin returned.
It turned out that my problem was caused by JBuilder building the EJB's and an ant script building the war. They had different versions of the JDK and therefore set the UIDs differnetly. Crazy eh? Once I started to use ant to build everything all my incompatable classes disapeared. > from: Sachin Pandey <[EMAIL PROTECTED]> > date: Mon, 30 Sep 2002 07:03:49 > to: [EMAIL PROTECTED] > subject: Re: Local class not compatible > > I am storing a serialized version of a class in the database.I ran the upload on a >machine A, backed up the database and restored the database on another machine B. On >machine B when I try to retrieve the object back I am getting a SQLException saying >that the local class is not compatible showing two different serialVersionUID's.There >is no difference in the class source between machine A and machine B. I haven't >declared the private serialVersionUID instance variable for the class (which I >should). What's confusing me is if the class hasn't changed then why am I getting >this "Local class not compatible" exceptions. I am retrieving the object from an >Entity Bean the sql type is set as OID and the jdbc type as a JAVA_OBJECT. In what >cases can I get this exception apart from the class source changing? > > Cheers > Sachin Pandey > NUIX Pty Ltd > Level 8, 143 York Street, > Sydney 2000 > Phone: (02) 92839010 > Fax: (02) 92839020 > > Disclaimer: > This message is intended only for the named recipient. If you are not the intended >recipient you are notified that disclosing,copying, distributing or taking any action >in reliance on the contents of this information is strictly prohibited. http://www.amazon.co.uk/exec/obidos/redirect-home?tag=velloscouk-21&placement=home_multi.gif&site=amazon =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
