So forward="false" didn't help? I'd appreciate if you can add this in comments on http://jira.codehaus.org/browse/JIBX-19 so I can test it for beta 4.

 - Dennis

Linus Kamb wrote:

Still getting NPE when I compile the binding.

Work-around is that I've added a wrapper class:

    <mapping name="Installation"
        class="edu.iris.dmc.isis.ConfigInstall" >
        <value name="reference" field="hardwareInstallation"
            type="edu.iris.dmc.isis.HardwareInstallation"
            ident="ref" style="attribute" />
    </mapping>


<mapping name="StationConfiguration"
class="edu.iris.dmc.isis.StationConfiguration" >
<value name="epochStart" field="epochStart" style="attribute" />
<value name="epochEnd" field="epochEnd" usage="optional" style="attribute" />
<value field="station" ident="ref" name="stationId"/>
<collection name="InstalledItems"
add-method="addHardwareInstallation"
iter-method="getInstalledHardwareIterator">



But I have bigger problems with Hibernate....

Dennis Sosnoski wrote:

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:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to