JiBX
  1. JiBX
  2. JIBX-113

The JIBX bind task definition cannot be loaded using ant taskdef

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: JiBX 1.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      Ant 1.6.1, Ant 1.6.1 & Maven 1.0.2, JDK 1.4.2_08, JIBX
    • Number of attachments :
      1

      Description

      The JIBX bind task definition cannot be loaded using ant taskdef.

      The error message produced by Ant is the following:

      Taskdef A class needed by class org.jibx.binding.ant.CompileTask cannot be found: org/apache/tools/ant/Task

      We have tried putting all the ant libraries on the taskdef classpath, but to no avail.

      Attached you will find the build.xml that will allow you to reprodcue the error..

      1. build.xml
        0.5 kB
        mark van holsteijn

        Issue Links

          Activity

          Hide
          mark van holsteijn added a comment -

          This is the reproduction ant build file. Please set jibx.home as a property to point to the jibx installation directory.

          <project default="jibx">

          <path id="mypath">
          <pathelement location="$

          {jibx.home}/lib/jibx-bind.jar"/>
          <pathelement location="${jibx.home}

          /lib/jibx-run.jar"/>
          </path>

          <target name="jibx">
          <property name="mp" refid="mypath"/>
          <echo message="$

          {mp}

          "/>

          <taskdef name="jibx"
          classname="org.jibx.binding.ant.CompileTask"
          classpathref="mypath"/>
          </target>

          </project>

          Show
          mark van holsteijn added a comment - This is the reproduction ant build file. Please set jibx.home as a property to point to the jibx installation directory. <project default="jibx"> <path id="mypath"> <pathelement location="$ {jibx.home}/lib/jibx-bind.jar"/> <pathelement location="${jibx.home} /lib/jibx-run.jar"/> </path> <target name="jibx"> <property name="mp" refid="mypath"/> <echo message="$ {mp} "/> <taskdef name="jibx" classname="org.jibx.binding.ant.CompileTask" classpathref="mypath"/> </target> </project>
          Hide
          Dennis Sosnoski added a comment -

          I cannot duplicate your problem using the supplied build.xml Are you still experiencing this problem?

          Show
          Dennis Sosnoski added a comment - I cannot duplicate your problem using the supplied build.xml Are you still experiencing this problem?
          Hide
          Stanislav Tsybyshev added a comment -

          I've encountered exactly the same problem and (probably) discovered the reason.
          The problem occurs when JIBX_HOME contains directories with spaces (i.e. c:\Java libs\JiBX). When I've changed it to c:\Java_libs\JiBX\lib build was done successfully.

          This is probably the Ant problem, not the JiBX, but I think it's worth mentioning somewhere in FAQ or readme (just not to disappoint newcomers like me).

          Show
          Stanislav Tsybyshev added a comment - I've encountered exactly the same problem and (probably) discovered the reason. The problem occurs when JIBX_HOME contains directories with spaces (i.e. c:\Java libs\JiBX). When I've changed it to c:\Java_libs\JiBX\lib build was done successfully. This is probably the Ant problem, not the JiBX, but I think it's worth mentioning somewhere in FAQ or readme (just not to disappoint newcomers like me).

            People

            • Assignee:
              Dennis Sosnoski
              Reporter:
              mark van holsteijn
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: