Andy-
No problem: CASTOR-1199
Thanks,
Stephen
Andrew Fawcett wrote:
Hi Stephen,
I've had a quick look at the changes in some files between these builds
and couldn't spot anything obvious. Best if you raise a JIRA issue for
this.
http://jira.codehaus.org/browse/CASTOR
Andy.
-----Original Message-----
From: Stephen Bash [mailto:[EMAIL PROTECTED]
Sent: 15 August 2005 17:01
To: dev@castor.codehaus.org
Subject: [castor-dev] [XML] Regression Issue with Transient Fields
Everyone-
I know I'm a little slow finding to be finding what appears to be a
regression issue with 0.9.7 now, but I figure better late than never
right?
Last week I went back to a project I hadn't touched in a while, and the
mapping file (used for XML marshalling and unmarshalling) had a few
fields labeled as transient. When I went to run the code, I received a
NPE when I attempted to create an Unmarshaller using new Unmarshaller(
mappingObj ) (see below for full trace).
I finally traced it down to the fact that I had not specified types for
the transient fields in the mapping file:
<field name="names" transient="true" />
versus:
<field name="names" transient="true" type="string"
collection="array" />
I honestly prefer the former (from my perspective, Castor shouldn't
waste clock cycles -- or programmer keystrokes -- on a field it doesn't
care about), but if this behavior was changed for a reason, I'd be
interested to hear it. (BTW, the latter form is not backward compatible
with 0.9.6 either, so it seems to be an all or nothing game)
I ran the same code with castor-0.9.7.jar and castor-0.9.6-xml.jar. In
0.9.6 the code runs fine, in 0.9.7 I get the exception. I'm running in
Eclipse 3.1 on JDK 1.4.2 on WinXP Pro.
Thanks everyone, and I'm happy to hear any comments anyone has.
Stephen
The exception:
java.lang.NullPointerException
at
org.exolab.castor.mapping.loader.CollectionHandlers.hasHandler(Collectio
nHandlers.java:128)
at
org.exolab.castor.xml.XMLMappingLoader.createFieldDesc(XMLMappingLoader.
java:515)
at
org.exolab.castor.mapping.loader.MappingLoader.createFieldDescs(MappingL
oader.java:639)
at
org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingL
oader.java:462)
at
org.exolab.castor.xml.XMLMappingLoader.createDescriptor(XMLMappingLoader
java:227)
at
org.exolab.castor.mapping.loader.MappingLoader.loadMapping(MappingLoader
java:282)
at
org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:292)
at
org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:247)
at
org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:475)
at
org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:246)
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
CODA has a new world-class consolidation package.
Find out more about www.coda.com/ocra <http://www.coda.com/ocra>
The information in this message is confidential and may be legally privileged.
It may not be disclosed to, or used by, anyone other than the addressee. If you
receive this message in error, please advise us immediately. Internet emails
are not necessarily secure. CODA does not accept responsibility for changes to
any email which occur after the email has been sent. Attachments to this email
may contain software viruses, which could damage your systems. CODA has checked
the attachments for viruses before sending, but you should virus-check them
before opening.
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------