You need to turn off forward reference support to do this, I think. Try
forward="false" on your <binding> element. Of course, that assumes that
you really aren't using forward references in your document. See my
email from earlier today "Re: Using IDs" for some more discussion of
this issue.
- Dennis
Linus Kamb wrote:
I have the following mapping:
<collection name="InstalledItems"
add-method="addHardwareInstallation"
iter-method="getInstalledHardwareIterator" >
<value name="Installation"
type="edu.iris.dmc.isis.HardwareInstallation"
ident="ref" />
</collection>
And I get a NPE when I try to compile the binding.
(from runtime binding:)
[java] Exception in thread "main" java.lang.NullPointerException
[java] at
org.jibx.binding.def.PropertyDefinition.getName(PropertyDefinition.java:307)
[java] at
org.jibx.binding.def.ValueChild.createBackfillClass(ValueChild.java:185)
[java] at
org.jibx.binding.def.ValueChild.genParseIdRef(ValueChild.java:283)
[java] at
org.jibx.binding.def.ValueChild.genUnmarshal(ValueChild.java:401)
[java] at
org.jibx.binding.def.ValueChild.genContentUnmarshal(ValueChild.java:587)
[java] at
org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:132)
[java] at
org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:272)
[java] at
org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:153)
[java] at
org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:611)
[java] at
org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:723)
[java] at
org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:272)
[java] at
org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:499)
[java] at
org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:593)
[java] at
org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:562)
[java] at
org.jibx.binding.Loader.processBindings(Loader.java:292)
[java] at org.jibx.binding.Run.main(Run.java:190)
[java] Java Result: 1
If I change the getName() method in PropertyDefinition to spit out
toString() at that point, I get:
[java] noSet for: property from collection
(edu.iris.dmc.isis.HardwareInstallation)
HardwareInstallation has a defined value for ident="def" .
Trying to figure out what I'm doing wrong...
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users