MXMLC throws a java.lang.NullExceptionPointer when compiling in windows (not in mac nor ubuntu)

1.5k views Asked by At

I'm running ant to compile a Flex application, and the build keeps failing when running it on a windows command line. Other people in my team can successfully run the very same build under mac and linux.

This is the error shown in the command prompt:

compile-main:
[mxmlc] Loading configuration file C:\Program Files (x86)\Adobe\Adobe Flash Builder Burrito\sdks\3.5.0\frameworks\flex-config.xml
[mxmlc] Error: null
[mxmlc]
[mxmlc] java.lang.NullPointerException
[mxmlc]     at flex2.compiler.CompilerSwcContext.createSource(CompilerSwcContext.java:353)
[mxmlc]     at flex2.compiler.CompilerSwcContext.getSource(CompilerSwcContext.java:337)
[mxmlc]     at flex2.compiler.API.findDefinition(API.java:2685)
[mxmlc]     at flex2.compiler.API.resolveMultiName(API.java:3350)
[mxmlc]     at flex2.compiler.API.resolveExpression(API.java:3193)
[mxmlc]     at flex2.compiler.API.batch2(API.java:399)
[mxmlc]     at flex2.compiler.API.batch(API.java:1117)
[mxmlc]     at flex2.compiler.API.compile(API.java:1290)
[mxmlc]     at flex2.compiler.API.compile(API.java:1210)
[mxmlc]     at flex2.tools.Compiler.mxmlc(Compiler.java:275)
[mxmlc]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[mxmlc]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[mxmlc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc]     at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc]     at flex.ant.FlexTask.executeInProcess(FlexTask.java:283)
[mxmlc]     at flex.ant.FlexTask.execute(FlexTask.java:225)
[mxmlc]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc]     at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc]     at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc]     at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc]     at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc]     at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[mxmlc]     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[mxmlc]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc]     at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc]     at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc]     at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc]     at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc]     at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[mxmlc]     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[mxmlc]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc]     at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc]     at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc]     at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc]     at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc]     at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[mxmlc]     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[mxmlc]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[mxmlc]     at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
[mxmlc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[mxmlc]     at java.lang.reflect.Method.invoke(Method.java:597)
[mxmlc]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc]     at org.apache.tools.ant.Task.perform(Task.java:348)
[mxmlc]     at org.apache.tools.ant.Target.execute(Target.java:390)
[mxmlc]     at org.apache.tools.ant.Target.performTasks(Target.java:411)
[mxmlc]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[mxmlc]     at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[mxmlc]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[mxmlc]     at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[mxmlc]     at org.apache.tools.ant.Main.runBuild(Main.java:809)
[mxmlc]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
[mxmlc]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[mxmlc]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

BUILD FAILED
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\build.xml:10: The following error occurred while executing this line:
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\AdToolSSP\build.xml:33: The following error occurred while executing this line:
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\AdToolSSP\build\build.xml:18: The following error occurred while executing this line:
D:\workspaces\Adobe Flash Builder Burrito Preview\FlexProjects\AdToolSSP\build\compileproject.xml:39: mxmlc task failed

Total time: 21 seconds

This is the particular target in the compileproject.xml build file:

    <target name="compile-main" description="Compila la aplicaciĆ³n principal">
    <mxmlc  allow-source-path-overlap="${compiler.allow_overlap}" 
            debug="${compiler.debug}" 
            file="${app.main.mxml}" 
            fork="${compiler.fork}" 
            keep-generated-actionscript="${compiler.keep_gen_as}" 
            link-report="${flex.output.dir}/report.xml"
            locale="${compiler.locale}" 
            maxmemory="256m"
            optimize="${compiler.optimize}" 
            output="${app.main.swf}"
            services="${flex.services.dir}/services-config.xml" 
        >

        <!-- Get default compiler options -->
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
        <!-- List of path elements that form the roots of ActionScript class hierarchies -->
        <source-path path-element="${FLEX_HOME}/frameworks" />
        <!-- Path to the locales -->
        <source-path path-element="${flex.resources.dir}/locale/{locale}" />
        <!-- List of SWC files or directories that contain SWC files -->
        <compiler.library-path dir="${flex.libs.dir}" append="true">
            <include name="**/as3-signals-v0.6.swc" />
            <include name="**/datavisualization_rb.swc" />
            <include name="**/datavisualization.swc" />
            <include name="**/GenAocCairngorm.swc" />
            <include name="**/GenAocLib.swc" />
        </compiler.library-path>
        <compiler.library-path dir="${flex.src.dir}/assets" append="true">
            <include name="**/*.swc" />
        </compiler.library-path>

    </mxmlc>
</target>

All tokens are set in corresponding build.properties and filter .properties files (and, as I said before, it compiles perfectly under mac and linux).

The windows version is 7 Ultimate, FLEX_HOME is set as an environment variable to the Flex SDK 3.5 (the 3.5.0.12683 build that comes with Adobe Flash Builder Burrito). ${compiler.fork} is set to false, to avoid an issue with the SDK and the source files being in different logic drives.

Any clues (at all) will be greatly appreciated!

1

There are 1 answers

1
splash On

Maybe it's a problem of the "Burrito Preview"? You could file this as a bug at http://bugs.adobe.com.