Hi -
I'm trying to compile my object which has a superclass that implements
interfaces. I've tried running both the command as well as Ant options but
the error remains the same. The structure of my hierarchy is
1. AbstractClass A implements Interface
2. Class B extends A implements Serializable
3. Both classes are in different packages.
4. I can run the compiler on the base class and it works fine. The same
works fine for the subclass if I remove the inheritance [extends] from the
subclass.
I've tried the various extension tricks mentioned on the site but get the
same stack trace. My binding.xml is as below
<?xml version="1.0" encoding="UTF-8"?>
<binding>
<!--<mapping class="com.ClassA" abstract="true"
type-name="A">
<value name="creationDate" field="creationDate" usage="required"/>
...
</mapping>-->
<include path="bindingExt.xml"/> // moved the commented code above to a
different bindingExt.xml. Doesn't work even if I remove the comments and the
<mapping name="test" // <include> tag.
class="com.vo.ClassB"
extends="com.ClassA">
<structure map-as="A"/>
<value name="name" field="name" usage="required"/>
...
</mapping>
</binding>
Here is the stack trace: Can someone point me to what am I doing wrong here.
[bind] Running binding compiler version jibx_1_1_6a
[bind] Error running binding compiler
[bind] java.lang.NullPointerException
[bind] at
org.jibx.binding.model.ClassHierarchyContext.accumulateInterfaces(ClassHiera
rchyContext.java:88)
[bind] at
org.jibx.binding.model.ClassHierarchyContext.accumulateInterfaces(ClassHiera
rchyContext.java:94)
[bind] at
org.jibx.binding.model.ClassHierarchyContext.addTypedComponent(ClassHierarch
yContext.java:116)
[bind] at
org.jibx.binding.model.DefinitionContext.addTemplate(DefinitionContext.java:
575)
[bind] at
org.jibx.binding.model.RegistrationVisitor.visit(RegistrationVisitor.java:17
6)
[bind] at
org.jibx.binding.model.TreeContext.tourTree(TreeContext.java:171)
[bind] at
org.jibx.binding.model.TreeContext.tourTree(TreeContext.java:232)
[bind] at
org.jibx.binding.model.RegistrationVisitor.visitTree(RegistrationVisitor.jav
a:110)
[bind] at
org.jibx.binding.model.BindingElement.runValidation(BindingElement.java:734)
[bind] at
org.jibx.binding.model.BindingElement.validateBinding(BindingElement.java:79
9)
[bind] at org.jibx.binding.Utility.validateBinding(Utility.java:223)
[bind] at org.jibx.binding.Utility.loadBinding(Utility.java:264)
[bind] at org.jibx.binding.Utility.loadFileBinding(Utility.java:408)
[bind] at org.jibx.binding.Compile.compile(Compile.java:296)
[bind] at
org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248)
[bind] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[bind] at org.apache.tools.ant.Task.perform(Task.java:364)
[bind] at org.apache.tools.ant.Target.execute(Target.java:341)
[bind] at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
[bind] at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.parseBuildFile(Inte
rnalAntRunner.java:191)
[bind] at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunn
er.java:400)
[bind] at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRun
ner.java:137)
Since I'm new to JIBX I don't have an idea what exactly is going wrong.
Another thing is that JIBX fails to find classes that are included as
dependent projects when I run the compile option.
Thanks & Regards,
Anurag Khanna
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users