Title: Using jibx-genbinding.jar on a class containing a java.util.HashSet collection

Hello,

I'm currently taking my first steps with JiBX and already encountered a problem while generating a binding. I hope someone here can give me a hint or two ...

Everything's about two pretty simple POJOs, representing a document and a set of contained items:

public class SAPDocument {
    private String documentNo;
    private HashSet sapDocumentItems = new HashSet();
}

public class SAPDocumentItem {
    private String documentItemNo;
    private String documentNo;
}

The classes have been compiled and now I want to generate the JiBX binding using the generator by calling

java -jar ./jibx-genbinding.jar -v -f .../mappings/binding.xml SAPDocument SAPDocumentItem

Unfortunately this doesn't work - I get the following output:

Running binding generator version 0.2
Building mapping definition for de.ava.kas.model.SAPDocument
creating nested structure definition for java.util.HashSet
Warning: trying to create structure for java.util.HashSet
org.jibx.runtime.JiBXException: No content found for class java.util.HashSet
at org.jibx.binding.BindingGenerator.createStructure(BindingGenerator.java:699)
at org.jibx.binding.BindingGenerator.defineFields(BindingGenerator.java:404)
at org.jibx.binding.BindingGenerator.defineStructure(BindingGenerator.java:621)
at org.jibx.binding.BindingGenerator.createMapping(BindingGenerator.java:736)
at org.jibx.binding.BindingGenerator.generate(BindingGenerator.java:888)
at org.jibx.binding.BindingGenerator.main(BindingGenerator.java:1089)

What does "No content found for class ..." mean? What content is the generator looking for?

Thanks for your help and regards
Alexander




Reply via email to