Hello
We have been using Castor for over 5 years on our product without any major
issues.
We recently upped version of Castor to 1.3.1 and have started to encounter
issues when our application starts up then begins unmarshalling files.
The sequence of events seems to be the same every time.
The first failure reports this error...
Failed to convert string to object: Nested error:
org.exolab.castor.xml.MarshalException: White space is required between the
processing instruction target and data.{File: [not available]; line: 1; column:
10}
The second failure reports this error...
Failed to convert string to object: Nested error:
org.exolab.castor.xml.MarshalException: Content is not allowed in prolog.{File:
[not available]; line: 1; column: 1}
Then every single file the application tries to unmarshall results in this
error...
Failed to convert string to object: The class for the root element
'OUR_TO_ARP_File' could not be found.
The application must be stopped and restarted to alleviate the situation.
There is nothing wrong with any of the files we are asking Castor to
unmarshall, they are well formed and if we restart the application it will
unmarshall the files without issue.
I have tried to recreate the sequence of events in a development environment as
yet without success.
I have even forced the first two errors by creating a file with random text
before the declaration to force the 'Content not allowed..' error and by
removing all of the spaces from the xml declaration in another file to force
the 'White space...' error but subsequent files unmarshall without any problem.
Does Castor go through some sort of initialisation process that may be failing
to complete leading to the problems we are seeing or could someone suggest
another reason this may be happening?
Thanks
Mike.