The following comment has been added to this issue:
Author: Linus Kamb
Created: Thu, 28 Oct 2004 12:51 PM
Body:
I also get the NPE when compiling my binding.
The is a backwards reference, both in the mapping file and in the XML document.
I tried adding forward="false" to the jibx-binding root element, but I still got the
NPE.
The following binding (with much snipped)
<mapping name="HardwareInstallation"
class="edu.iris.dmc.isis.HardwareInstallation" >
<structure name="dbInfo" >
<value name="uid" field="uid" ident="def" />
</structure>
[snip]
</mapping>
<mapping name="StationConfiguration"
class="edu.iris.dmc.isis.StationConfiguration" >
[snip]
<collection name="InstalledItems"
add-method="addHardwareInstallation"
iter-method="getInstalledHardwareIterator" >
<value name="Installation"
type="edu.iris.dmc.isis.HardwareInstallation"
ident="ref" />
</collection>
[snip]
</mapping>
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
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/JIBX-19?page=comments#action_25853
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/JIBX-19
Here is an overview of the issue:
---------------------------------------------------------------------
Key: JIBX-19
Summary: NullPointerException in ident="ref" within collection
Type: Bug
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: JiBX
Components:
core
Versions:
1.0-beta3b
Assignee: Dennis Sosnoski
Reporter: Falk Langhammer
Created: Wed, 12 May 2004 11:48 AM
Updated: Thu, 28 Oct 2004 12:51 PM
Environment: JDK 1.4.2
Description:
java.lang.NullPointerException
at org.jibx.binding.def.PropertyDefinition.getName(PropertyDefinition.java:308)
at org.jibx.binding.def.ValueChild.createBackfillClass (ValueChild.java:185)
at org.jibx.binding.def.ValueChild.genParseIdRef(ValueChild.java:282)
at org.jibx.binding.def.ValueChild.genUnmarshal(ValueChild.java:400)
at org.jibx.binding.def.ValueChild.genContentUnmarshal(ValueChild.java:587)
at org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollection.java:130)
at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:611)
at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:723)
...
occurs with the following binding excerpt:
<mapping name="form" class="com.livis.xforms.desc.Form">
<collection name="constraints" field="constraints"/>
<value name="typeref" field="typeref" usage="optional"/>
<collection field="constraintrefs">
<value name="constraint-ref" type="com.livis.xforms.desc.Type" ident="ref"/>
</collection>
<structure field="layout" usage="optional"/>
</mapping>
<mapping name="type" class="com.livis.xforms.desc.Type">
<value name="name" field="name" ident="def" style="attribute"/>
</mapping>
...
This makes it impossible to unmarshall a list of pointers.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
jibx-devs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-devs