Quantcast
Channel: Adobe Community : Popular Discussions - FlexUnit
Viewing all articles
Browse latest Browse all 25673

java.lang.NullPointerException running ant task in 4.1 Beta 2

$
0
0

Hello,

 

After trying to debug this all day, I thought I would ask the community.

 

I am trying out the new FU4.1 Beta 2 (3.5) from the downloads page.  We have a working CI system set up with 4.0, and I thought trying out 4.1 beta 2 would simply be a matter of replacing the binaries in my lib folder and re-running the ant script.  Evidently not, or else I am missing something.

 

After updating to the 4.1 Beta 2 binaries, if I re-run a sample project in Eclipse, the build fails with a java NullPointerException when the <flexunit> ant task is invoked. We have an involved setup that uses the groovy AntBuilder and other esoteric constructs, so I thought I would create a very simple test script similar to the sample CI project to see if that would work.  Unfortunately, I am still seeing the NPE.  The worst part is that there is absolutely no debug information provided - no message, no traceback.  I even attached the Ant source and debugged it. I could see the NPE being caught, but it contained a null message and null traceback.

 

Here is the simplified ant script:

 

<project name="tests" basedir=".">


    <target name="test-init" depends="">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${reports.dir}"/>
        <mkdir dir="${reports.xml}"/>
        <mkdir dir="${reports.html}"/>
       
        <!-- Setup Flex and FlexUnit ant tasks -->
        <!-- You can set this directly so mxmlc will work correctly, or set
        <taskdef resource="flexUnitTasks.tasks" classpath="${lib}/flexUnitTasks-4.1.0-beta2.18.jar" />
    </target>

 

    <target name="run-flex-tests" depends="test-init">
      <sequential>
        <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
        <flexunit
            swf="${build.dir}/TestRunner.swf"
            toDir="${reports.xml}"
            haltonfailure="false"
            verbose="true"
            localTrusted="true"
            timeout="60000"/>
        <!-- Generate readable JUnit-style reports -->
        <junitreport todir="${reports.xml}">
            <fileset dir="${reports.xml}">
                <include name="TEST-*.xml" />
            </fileset>
            <report format="frames" todir="${reports.html}" />
        </junitreport>
      </sequential>   
    </target>
</project>

 

The output is:

 

Buildfile: C:\EclipseWorkspace\tests\Source\Flex\build_test.xml
test-init:
run-flex-tests:
[flexunit] Validating task attributes ...

 

BUILD FAILED
C:\EclipseWorkspace\tests\Source\Flex\build_test.xml:23: java.lang.NullPointerException

 

Total time: 297 milliseconds

 

Is there something obvious I am missing?

 

Thanks for any help!

Trevor


Viewing all articles
Browse latest Browse all 25673

Trending Articles