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