Hi,

I agree with Marco's assessment. Personally, I believe, that the problem is with 
Weblogic and its libraries. I don't know what version of Weblogic you are 
using, but if it build on top of JDK 1.4, parts of the XML APIs will already be 
included with the JDK extensions. Xerces as shipped with Castor includes 
most of the same APIs in the JAT file, so that might and will be the the most likely 
cause for your problems.

Have a look at the stack trace you posted originally, and it clearly tells you where 
the problems are occurring, i.e. when trying to load the serializer from 
Xerces.

Regars
Werner

--Original Message Text---
From: Marco Mistroni
Date: Fri, 5 Nov 2004 10:13:43 -0000


            If it runs perfectly as standalone&.then it means that something gets 
screwed  

Up in weblogic (and that does not surprise me J)))))))  

   

What can I suggest, since I have seen similar problems with other webapp in weblogic 
is:  

-          undeploy your webapplication from weblogic  

-          PHISICALLY delete it from the deploy directory  

-          Delete any weblogic temp directories  

-          Re-install your webapplication  

   

   

If after following those steps it does not work, it COULD be that there are some 
issues  

With xerces/xalan/j2ee?  APIs that weblogic is using  

   

To confirm that,  you should try to  take your (SUCCESSFUL) standalone webapplication, 
 

And put in the classpath the  jar files that weblogic uses (I guess you can take them 
from the lib directory of your WLS).  

   

By the way, which version of WLS are you using?  

   

I had Castor running on top of it successfully for version 5.1,6.1 & 7.0, t hough that 
was more than a year  

Ago in my previous company&.and I suppose I was using another version of castor..  

   

Hope this helps  

Regards  

            marco  

   

   

   

   

   

   

-----Original Message-----
From: Upinder_Bali [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2004 16:19
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] XML MARSHALLING ISSUE  

   

Hi Marco,  


We have run stand-alone application outside Weblogic and followed all steps as you 
have mentioned. Everything is working fine and its getting 
marshalled also.  


We use castor latest version 0.9.5.3 and for xerces 1.4.0.  


We tried some higher versions for xerces also for executing standlaone application. 
But they dont have InputSource class which we are using in our 
application.  


Thats available only in xerces 1.4.0 or may be some other version.  


   


Now it seems to be Classpath issue or environment issue with weblogic server.  


After doing some changes on Classpath, as of now still there also its not working.  


   


Thanks  


Upinder..  


   


   


-----Original Message-----
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 8:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] XML MARSHALLING ISSUE  

Hello,  

            Then, according to exception and what you said its working and not, looks 
like classpath problem..  

Could you:  

1  take your application OUT of weblogic  

2  run a standalone application where your code gets executed  

3  make sure that in your CLASSPATH you have EXACTLY one version of castor, one 
version of Xerces/Xalan (libraries needed by castor) and  

     exactly ONE version of your  java classes that you want to marshal/unmashal. Not 
only, but the version of your class should contain the fields  

     that you described while writing mapping.xml  

   

after this, it should be easier to find out what is going on&  

   

hope this helps  

   

regards  

            marco  

   

-----Original Message-----
From: Upinder_Bali [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2004 11:48
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] XML MARSHALLING ISSUE  

   

Hi Marco,  


We have done the debugging and previous statements are getting excuted.  


   


In the previous line:  


businessRuleData.setBusinessRuleId( businessRuleData.getRuleCode() );  


we are just modifying the business rule java object which was earlier created while 
unmarshalling xml file. Even if we comment this out, still its not 
working.  


All other previous statements are getting executed.  


   


   


Thanks  


Upinder..  


   


   


-----Original Message-----
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 4:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] XML MARSHALLING ISSUE  

Hello,  

            If that never gets executed, could the problem be at previoius line 
(businessRuleData)?  

Could it be that  it cannot find the mapping file?  

   

Regards  

            marco  

   

-----Original Message-----
From: Upinder_Bali [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2004 11:07
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] XML MARSHALLING ISSUE  

   

Hi,  


I used latest version of castor castor-0.9.5.3.jar & xerces-2.4.0. Its giving same 
problem.  


What could be the problem. We have tried with all possible combinations even with 
latest castor and latest xerces.  


Code looks pretty o.k.  


   


After debugging it, Run time failure happnes at:  


Marshaller marshaller = new Marshaller(writer);  


This never gets executed.  


   


   


   


   


I am putting code snippet here:  


String valuesXML = null;  

StringWriter writer = new StringWriter();  

// Create & Load Castor XML Mapping  

try  

{  

Mapping mapping = new Mapping();  

mapping.loadMapping( new InputSource(  

new StringReader( ruleXml.getXmlMap() ) ) );  

businessRuleData.setBusinessRuleId( businessRuleData.getRuleCode() );  

// Create Marshaller  

Marshaller marshaller = new Marshaller(writer);  

marshaller.setMapping(mapping);  

// Marshall Java Object to XML  

marshaller.marshal(businessRuleData);  

valuesXML = writer.toString();  

}  

catch ( IOException ioException )  

{  

ioException.printStackTrace(); 

}  

catch ( MappingException mappingException )  

{  

mappingException.printStackTrace(); 

}  

catch ( MarshalException marshalException )  

{  

marshalException.printStackTrace(); 

}  

catch ( ValidationException validationException )  

{  

validationException.printStackTrace(); 

}  

catch( Throwable t)  

{  

t.printStackTrace();  

}  

return valuesXML;  

}  


   


This is kind of show stopper for us. If anybody has faced similar issue and knows the 
solution, that would be greatly appreciated.  


   


   


   


   


Thanks  


Upinder..  


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


   


Thanks  


Upinder..  


   


-----Original Message-----
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 03, 2004 6:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] XML MARSHALLING ISSUE  

Hello,  

            I am currently using xerces-2.4.0 wihtout problems&  

   

Regrds  

            marco  

   

-----Original Message-----
From: Upinder_Bali [mailto:[EMAIL PROTECTED] 
Sent: 03 November 2004 10:05
To: [EMAIL PROTECTED]
Subject: [castor-user] XML MARSHALLING ISSUE  

   

Hi,  
There is a typical problem  being faced by us while marshalling of XML files.  

We were using Castor - castor-0.9.4.1.jar & xerces-J_1.4.0 jar initially.  
Till now we were using this version of Castor to only read existing XML files (having 
some business rule data) and there was no problem. Recently we 
developed another interface in our application to modify the 

data in these XML files and then save the XML files using Castor. This is where we 
started getting the IncompatibleClassChangeError. 

Even we tried with latest castor-0.9.5.3 but still we are facing the same problem.  
We have tried with all possible combinations of castor and xerces versions.  

Problem Details:  
java.lang.IncompatibleClassChangeError  
at org.exolab.castor.util.Configuration.getSerializer(Unknown Source)  
at org.exolab.castor.xml.Marshaller.<init>(Unknown Source)  
at com.gecs.apollo.wkst.helper.WksBrBOHelper.marshallXml(WksBrBOHelper.java:1063)  
at com.gecs.apollo.wkst.helper.WksBrBOHelper.save(WksBrBOHelper.java:785)  
at 
com.gecs.apollo.wkst.ejb.brmdbm.BrmdbmSessionFacade.save(BrmdbmSessionFacade.java:129) 
 
at 
com.gecs.apollo.wkst.ejb.brmdbm.BrmdbmSessionFacade_p3s1b6_EOImpl.save(BrmdbmSessionFacade_p3s1b6_EOImpl.java:37)
  
at 
com.gecs.apollo.wkst.ejb.brmdbm.BrmdbmSessionFacade_p3s1b6_EOImpl_WLSkel.invoke(Unknown
 Source)  
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)  
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)  
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)  
at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:166)  
at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)  
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)  
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:262)  
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:229)  
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)  
at $Proxy245.save(Unknown Source)  
at java.lang.reflect.Method.invoke(Native Method) 

Can anybody suggest or knows what combination of castor & xerces versions one should 
use if this is really a version issue.  

Thanks  
Upinder...  

**************************************************************************  
This email (including any attachments) is intended for the sole use of the intended 
recipient/s and may contain material that is CONFIDENTIAL AND 
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this 
message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact 
the sender by email and delete all copies; your cooperation 
in this regard is appreciated.  

**************************************************************************  


************************************************************************** 

This email (including any attachments) is intended for the sole use of the intended 
recipient/s and may contain material that is CONFIDENTIAL AND 
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this 
message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact 
the sender by email and delete all copies; your cooperation 
in this regard is appreciated.  

**************************************************************************  


************************************************************************** 

This email (including any attachments) is intended for the sole use of the intended 
recipient/s and may contain material that is CONFIDENTIAL AND 
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this 
message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact 
the sender by email and delete all copies; your cooperation 
in this regard is appreciated.  

**************************************************************************  



************************************************************************** 

This email (including any attachments) is intended for the sole use of the intended 
recipient/s and may contain material that is CONFIDENTIAL AND 
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this 
message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact 
the sender by email and delete all copies; your cooperation 
in this regard is appreciated.  

**************************************************************************  



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to