JiBX
  1. JiBX
  2. JIBX-200

java.lang.NullPointerException when running binding compiler

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JiBX 1.1.5
    • Fix Version/s: JiBX 1.1.6
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows Vista, Java 1.6.0_03
    • Number of attachments :
      1

      Description

      check-runtime:
      check-binding:
      bind:
      [echo] Running JiBX binding compiler
      [bind] Error running binding compiler
      [bind] java.lang.NullPointerException
      [bind] at org.jibx.binding.model.NameAttributes.equals(NameAttributes.java:184)
      [bind] at java.util.HashMap.getEntry(Unknown Source)
      [bind] at java.util.HashMap.containsKey(Unknown Source)
      [bind] at org.jibx.binding.model.DefinitionContext.addMappedName(DefinitionContext.java:551)
      [bind] at org.jibx.binding.model.RegistrationVisitor.visit(RegistrationVisitor.java:183)
      [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:96)
      [bind] at org.jibx.binding.model.BindingElement.runValidation(BindingElement.java:765)
      [bind] at org.jibx.binding.model.BindingElement.validateBinding(BindingElement.java:830)
      [bind] at org.jibx.binding.Utility.validateBinding(Utility.java:228)
      [bind] at org.jibx.binding.Utility.loadBinding(Utility.java:269)
      [bind] at org.jibx.binding.Utility.loadFileBinding(Utility.java:413)
      [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.Target.performTasks(Target.java:369)
      [bind] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [bind] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [bind] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [bind] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      [bind] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [bind] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      [bind] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

        Activity

        Hide
        Dennis Sosnoski added a comment -

        Unfortunately the files.zip attachment only contains the binding.xml and build.xml file, without any of the classes used by the binding. In order to be sure the problem is fixed I need to have the class files, too.

        I've changed the NameAttribute.equals() method to use safe comparisons, so that the NPE should no longer occur. I don't know if this was masking a deeper problem, though.

        Show
        Dennis Sosnoski added a comment - Unfortunately the files.zip attachment only contains the binding.xml and build.xml file, without any of the classes used by the binding. In order to be sure the problem is fixed I need to have the class files, too. I've changed the NameAttribute.equals() method to use safe comparisons, so that the NPE should no longer occur. I don't know if this was masking a deeper problem, though.
        Hide
        Dennis Sosnoski added a comment -

        Considering this fixed unless I hear otherwise (hopefully with corrected demonstration code).

        Show
        Dennis Sosnoski added a comment - Considering this fixed unless I hear otherwise (hopefully with corrected demonstration code).

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Filippos Papadopoulos
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: