Ive Googled and searched the mail archives and cant find an answer on this one, 
so hopefully someone here can help.

 

Im new to Jibx and have created a simple mapping to start with. If I comment 
out the internal <structure>, jibx binding compile works. If I put it in, I get 
the error (and stack) at the end. The TransactionRequest class is part of a 
hierarchy, so Im thinking I need to define something in my mapping to let Jibx 
understand that?

 

The binding:

---------------

<binding>

  <mapping name=" RequestTransaction" class="TransactionRequest" 
ordered="false" flexible="true">

    <value name="version" set-method="setVersion" get-method="getVersion" 
style="attribute" />

    <structure name="transHeader">

      <value name="requestCount" set-method="setRequestCount" 
get-method="getRequestCount"/>

      .lots more stuff will go here once I get this simple mapping working.

    </structure>

</binding>

 

The TransactionRequest definition and its superclass definition.

public class TransactionRequest extends Request implements Enumeration<Request>

 

abstract public class Request implements RemoteRequest, Serializable

 

Ive at a bit of a loss on exactly what to do and I cant find an example that 
seems to start with a mapping that is itself a implementation of an 
interface/abstract class. The examples I find all seem to have a concrete base 
mapping and any interfaces are for elements inside it.

 

Thanks,

Chris

 

java.lang.NullPointerException

                at 
org.jibx.binding.classes.ClassFile.accumulateInterfaces(ClassFile.java:555)

                at 
org.jibx.binding.classes.ClassFile.getInstanceSigs(ClassFile.java:613)

                at 
org.jibx.binding.model.ClassWrapper.isAssignable(ClassWrapper.java:261)

                at 
org.jibx.binding.model.ContainerElementBase.checkCompatibleChildren(ContainerElementBase.java:583)

                at 
org.jibx.binding.model.TemplateElementBase.validate(TemplateElementBase.java:221)

                at 
org.jibx.binding.model.MappingElementBase.validate(MappingElementBase.java:359)

                at 
org.jibx.binding.model.MappingElement.validate(MappingElement.java:90)

                at 
org.jibx.binding.model.ValidationContext$ValidationVisitor.exit(ValidationContext.java:293)

                at 
org.jibx.binding.model.ModelVisitor.exit(ModelVisitor.java:280)

                at 
org.jibx.binding.model.ModelVisitor.exit(ModelVisitor.java:307)

                at 
org.jibx.binding.model.ModelVisitor.exit(ModelVisitor.java:316)

                at 
org.jibx.binding.model.ModelVisitor.exit(ModelVisitor.java:364)

                at 
org.jibx.binding.model.TreeContext.tourTree(TreeContext.java:264)

                at 
org.jibx.binding.model.TreeContext.tourTree(TreeContext.java:238)

                at 
org.jibx.binding.model.TreeContext.tourTree(TreeContext.java:124)

                at 
org.jibx.binding.model.ValidationContext.validate(ValidationContext.java:105)

                at 
org.jibx.binding.model.BindingElement.runValidation(BindingElement.java:839)

                at 
org.jibx.binding.model.BindingElement.validateBinding(BindingElement.java:909)

                at org.jibx.binding.Utility.validateBinding(Utility.java:246)

                at org.jibx.binding.Utility.loadBinding(Utility.java:288)

                at org.jibx.binding.Utility.loadFileBinding(Utility.java:431)

                at org.jibx.binding.Compile.compile(Compile.java:212)

                at 
org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248)

                at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

                at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:585)

                at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

                at org.apache.tools.ant.Task.perform(Task.java:348)

                at org.apache.tools.ant.Target.execute(Target.java:357)

                at org.apache.tools.ant.Target.performTasks(Target.java:385)

                at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)

                at org.apache.tools.ant.Project.executeTarget(Project.java:1306)

                at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

                at 
org.apache.tools.ant.Project.executeTargets(Project.java:1189)

                at org.apache.tools.ant.Main.runBuild(Main.java:758)

                at org.apache.tools.ant.Main.startAnt(Main.java:217)

                at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)

                at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:585)

                at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)

Error: Error during validation: null; on mapping element at (line 2, col 129, 
in jibx-binding.xml)

Attachment: PGP.sig
Description: PGP signature

------------------------------------------------------------------------------
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to