开发者

Error: null, while compiling resource bundles under Linux with hudson

I am using Flex 3.5.0.12683 with hudson CI server and Ant to compile our project. While compiling resource bundles for this project I am having problems.

With root user everything is compiled successfully but when I am trying to compile my flex project with hudson (ant) it fails with:

compile_resource:
[mxmlc] Loading configuration file /opt/lib/flex3.5/frameworks/flex-config.xml
[mxmlc] Error: null
[mxmlc]
[mxmlc] java.lang.NullPointerException
[mxmlc]     at flex2.tools.CommandLineConfiguration.compilingResourceModule(CommandLineConfiguration.java:70)
[mxmlc]     at flex2.tools.CommandLineConfiguration.getTargetFile(CommandLineConfiguration.java:45)
[mxmlc]     at flex2.tools.CommandLineConfiguration.validate(CommandLineConfiguration.java:97)
[mxmlc]     at flex2.tools.Compiler.processConfiguration(Compiler.java:672)
[mxmlc]     at flex2.tools.Compiler.processConfiguration(Compiler.java:526)
[mxmlc]     at flex2.tools.Compiler.mxmlc(Compiler.java:84)
[mxmlc]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[mxmlc]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[mxmlc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[mxmlc]     at java.lang.reflect.Method.invoke(Method.java:616)
[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.NativeMethodAccessorImpl.invoke0(Native Method)
[mxmlc]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[mxmlc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[mxmlc]     at java.lang.reflect.Method.invoke(Method.java:616)
[mxmlc]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[mxmlc]    开发者_JAVA百科 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:1360)
[mxmlc]     at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
[mxmlc]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[mxmlc]     at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
[mxmlc]     at org.apache.tools.ant.Main.runBuild(Main.java:801)
[mxmlc]     at org.apache.tools.ant.Main.startAnt(Main.java:218)
[mxmlc]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[mxmlc]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Looks like there some permissions fails but I can't figure what and where since there is no much output from compiler.


Because the compiler create a directory /tmp/Adobe/Flex/GeneratedResourceModules and create a temporary file under the directory while compiling a resource module, if super user compiled at first on the system other normal users can't create the temporary file. To avoid this I executed the following commands before normal user compile.

chmod a+w /tmp/Adobe/Flex/GeneratedResourceModules

or

rm -rf /tmp/Adobe


If you don't have super-user privs on the box, you could also change where the compiler is placing the output file by setting the java.io.tmpdir property in the mxmlc ant task:

<java jar="${FLEX_HOME}/lib/mxmlc.jar" failonerror="true" fork="true">
  <jvmarg value="-Djava.io.tmpdir=${MY_OUTPUT_DIR}"/>
  ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜