The following comment has been added to this issue:

     Author: Dennis Sosnoski
    Created: Sat, 29 May 2004 3:43 PM
       Body:
As Falk pointed out on the mailing list, there is a workaround for this problem if you 
have control over the Java data structures. The workaround is to use a wrapper class 
for the forward references, rather than using the references directly in the 
collection. The wrapper class can be as simple as just:

  public class ForwardWrapper {
      public ForwardObject object;
  }

(where ForwardObject is the class of the objects being referenced before they're 
defined), but this will allow JiBX to fill the actual references in once they've been 
unmarshalled.
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/JIBX-19?page=comments#action_20191

---------------------------------------------------------------------
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: Sat, 29 May 2004 3:43 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 SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
jibx-devs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to