Sorry, forgot to point out that we're in the process of upgrading from v1.0 RC0 to v1.0 RC1. With RC0 things work fine and we don't get this error. In fact, we didn't even have to define an abstract mapping for the marker interface. But with RC1 we have to define it otherwise we get a validation error for the mapping of the class that has an instance variable with the type equal to the marker interface.
The validation error is like this: Error: Non-abstract mapping must define an element name for mapping element at (line 2, col 57, in sample-binding.xml) Thanks, David -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David AhChong Sent: Thursday, November 10, 2005 4:55 PM To: [email protected] Subject: [jibx-users] Reporting error generated by binding compiler Hi all, This is to report the error at the bottom of this email that was generated by the JiBX v1.0 RC1 binding compiler. The error occurs with the following binding: <binding value-style="attribute"> <mapping class="AnInterface" abstract="true"/> <mapping name="one" class="AnInterfaceList"> <collection item-type="AnInterface" add-method="addAnInterface" iter-method="iterateAnInterfaces"/> </mapping> </binding> For the following classes/interfaces: public interface AnInterface { // marker interface } public class AnInterfaceList implements AnInterface { private List anInterfacesList = new ArrayList(); private Iterator iterateAnInterfaces() { return anInterfacesList.iterator(); } private void addAnInterface(AnInterface anInterface) { anInterfacesList.add(anInterface); } } Any suggestions on how the bindings could be changed to suit the interfaces/classes would be much appreciated. What we actually have is something even more complicated: - have many implementations of the marker interface - AnInterfaceList is really an abstract base class - two implementations of the marker interface are concrete classes that extend AnInterfaceList Thanks for your time, David ------------------ Here is the error: ------------------ Error running binding compiler *** Error during code generation - please report this error on the JiBX users list so that the condition can be caught during validation *** java.lang.IllegalStateException: Internal error - no content present at org.jibx.binding.def.NestedBase.genContentPresentTest(NestedBase.java:19 7) at org.jibx.binding.def.PassThroughComponent.genContentPresentTest(PassThro ughComponent.java:106) at org.jibx.binding.def.PassThroughComponent.genContentPresentTest(PassThro ughComponent.java:106) at org.jibx.binding.def.PassThroughComponent.genContentPresentTest(PassThro ughComponent.java:106) at org.jibx.binding.def.NestedCollection.genContentUnmarshal(NestedCollecti on.java:137) at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure .java:156) at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding .java:757) at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.jav a:905) at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.j ava:272) at org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.ja va:565) at org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.ja va:604) at org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.ja va:611) at org.jibx.binding.Compile.compile(Compile.java:305) at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248) [snip] ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
