MXMLC 在 Windows 中编译时抛出 java.lang.NullExceptionPointer (不在 mac 或 ubuntu 中)

发布于 2024-10-19 01:21:24 字数 8272 浏览 0 评论 0原文

我正在运行 ant 来编译 Flex 应用程序,但在 Windows 命令行上运行它时构建始终失败。我团队中的其他人可以在 Mac 和 Linux 下成功运行相同的构建。

这是命令提示符中显示的错误:

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

这是compileproject.xml构建文件中的特定目标:

    <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>

所有标记都在相应的build.properties和filter .properties文件中设置(并且,正如我之前所说,它在mac下完美编译和 Linux)。

Windows 版本是 7 Ultimate,FLEX_HOME 设置为 Flex SDK 3.5(Adobe Flash Builder Burrito 附带的 3.5.0.12683 版本)的环境变量。 ${compiler.fork} 设置为 false,以避免 SDK 和源文件位于不同逻辑驱动器中的问题。

任何线索(全部)将不胜感激!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

临风闻羌笛 2024-10-26 01:21:24

也许这是“玉米煎饼预览”的问题?您可以将此问题作为错误提交到 http://bugs.adobe.com

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文