Issue with Castor XML Upgrade: MarshalException - ValidationException

91 Views Asked by At

I recently upgraded from Castor version 0.9.53 to Castor-XML version 1.4.1 in my Java project. After making this update, I removed the old Castor version (0.9.53) from my classpath and added the new Castor-XML 1.4.1 library.

However, I'm now encountering an issue when trying to unmarshal XML data using the new Castor-XML library. Specifically, I'm getting the following error: org.exolab.castor.xml.MarshalException: ValidationException: Empty ID value encountered{File: [not available]; line: 1; column:12 } This error is thrown at the line

reader.parse(source);

Additional Code:

I am using the following code to unmarshal XML data from a gzip-compressed file:

FileInputStream gzipReader = new FileInputStream("abc.xml.gz");
Reader reader = ZipInputStream(gzipReader);
abc = (Abc) Abc.unmarshal(reader);

Interestingly, I did not encounter this issue when using Castor version 0.9.53.

Question:

1.Can anyone help me understand what might be causing this error?

2.Is there something specific I need to do differently when using Castor-XML 1.4.1 compared to Castor 0.9.53?

3.Could the issue be related to unmarshaling from a gzip-compressed file using the provided code?

Any insights or guidance would be greatly appreciated. Thank you!

0

There are 0 best solutions below