views:

47

answers:

1

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

A: 

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

mowanato
Yes, it works! Thanks for answer!
Rostyslav Kinash