Jibx actually modifies classes to create new class files with Jibx code in 
them.  As far as I know, there is no way to pull in dependencies from something 
like an artifact repository because those dependencies are a reference, and the 
files don't actually reside in the project.  Though this is a bit of a hack, 
we've been able to get around this by running an Ant script (which it appears 
you are using) that copies *.class files from a jar to target/classes using the 
Ant unzip command:
<unzip src="<your repo jar>" dest="<your classes folder>">
    <patternset>
        <include name="**/*.class"/>
        <exclude name="**/*.java"/>
    </patternset>
</unzip>
I don't think that's your problem though.  Jibx would have thrown a 
ClassNotFoundException, not a NPE.  Did you debug through the stack trace?
 
Thanks,
Drew
 

________________________________

From: Anurag Khanna [mailto:anurag.kha...@baps.co.in] 
Sent: Thursday, February 12, 2009 2:24 AM
To: jibx-users@lists.sourceforge.net
Subject: [jibx-users] NullPointerException when running binding compiler



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. Here is the stack trace

 

[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(ClassHierarchyContext.java:88)

     [bind] at 
org.jibx.binding.model.ClassHierarchyContext.accumulateInterfaces(ClassHierarchyContext.java:94)

     [bind] at 
org.jibx.binding.model.ClassHierarchyContext.addTypedComponent(ClassHierarchyContext.java:116)

     [bind] at 
org.jibx.binding.model.DefinitionContext.addTemplate(DefinitionContext.java:575)

     [bind] at 
org.jibx.binding.model.RegistrationVisitor.visit(RegistrationVisitor.java:176)

     [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.java:110)

     [bind] at 
org.jibx.binding.model.BindingElement.runValidation(BindingElement.java:734)

     [bind] at 
org.jibx.binding.model.BindingElement.validateBinding(BindingElement.java:799)

     [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(InternalAntRunner.java:191)

     [bind] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:400)

     [bind] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.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.

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to