Title: XML MARSHALLING ISSUE

Hello,

            Then, according to exception and what you said it’s 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.

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

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

Reply via email to