I've been looking at this one problem for about a day now and I just cannot see the problem anymore, care to help (may be a newbie problem)? Binding file is as follows:

1: <?xml version="1.0" encoding="UTF-8"?>
2: <binding direction="input">
3:
4: <mapping name="car" class="test.Car">
5: <structure name="chassis" set-method="setChassis" class="test.Chassis">
6: <value style="attribute" name="type" field="type" />
7: <collection name="wheels" field="wheels"/>
8: </structure>
9: </mapping>
10:
11: <mapping name="wheel" class="test.Wheel">
12: </mapping>
13:
14:</binding>



Running this with binding compiler will result:


[echo] Compiling to /home/jsr/work/fqm/target/classes
[java] Exception in thread "main" java.lang.NullPointerException
[java] at org.jibx.binding.classes.ClassFile.isAccessible(ClassFile.java:938)
[java] at org.jibx.binding.def.PropertyDefinition.genLoad(PropertyDefinition.java:437)
...



The error message stops appearing if I:

a) change the 'set-method="setChassis"' -> 'field="chassis"'
b) change the binding direction -> "both" instead of "input" and add 'get-method="getChassis"'
c) comment out either of the lines 6 or 7 (commenting both out will cause: "Name not allowed when using mapping reference at tag "structure"(line 12, col 17")


None of these solutions are ok in the real-life situation I'm having.

JIBX: beta 3b
JDK: Sun 1.4.2-b28, Linux

Thanks for the help!

- Jukka -


------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to