tags:

views:

629

answers:

2

Hi there,

I'm attempting to use the Adobe Flex Apache (2.2) module under Linux from here - http://labs.adobe.com/wiki/index.php/Flex_Module_for_Apache_and_IIS (the manual install). I have a perfectly working Apache system, with Ubuntu 8.10 and the Sun JDK v6 update 10 so installing this is not about support tools.

I can't figure out how to make this apache module work.

My httpd.conf shows this:

LoadModule flex_module /usr/lib/apache2/modules/mod_flex.so
AddHandler flex .mxml

The mod_flex.so is in the right place.

I have /usr/bin/compiler.sh:

#!/bin/sh
java  -Djava.awt.headless=true -ms128M -mx256M -jar "/home/jamie/Adobe_Flex_Builder_Linux/flexc.jar" ${*} 2>&1

(why on earth would you hardcode the location of this?). This shell script gets executed (e.g. if I put a echo "hi!" >> /tmp/log.txt, it shows up).

But, it just returns to the browser a blank page. So the module is doing something, it just ain't doing it correctly.

The compiler configuration file (which I've put in the same directory as compiler.sh, as the flexc.jar and as the .mxml file being compiled references:

flex_config=/home/jamie/Adobe_Flex_Builder_Linux/sdks/3.0.0/frameworks/flex-config.xml
flex_lib=/home/jamie/Adobe_Flex_Builder_Linux/sdks/3.0.0/frameworks

Now, sometimes I manage to get error output into the browser - it complains about not being able to find the class flash.localization.ILocalizer.

I've managed to squash that error by editing the manifest in flexc.jar to point to the necessary jar files from the 3.0.0 Flex SDK from Adobe (I did try and set the CLASSPATH environment variable to point to the necessary jars, but that didn't work) Now, my latest error is:

An error occured on the server. Server error is: 'Error occurred in server thread; nested exception is: java.lang.NoClassDefFoundError: flex2/linker/SimpleMovie'

This shows up in a nicely formatted "Compilation Results" page in the browser, so obviously now I've got the compiler trying to compile the mxml, and failing because it's missing mxmlc.jar. Adding mxmlc.jar to the flexc.jar manifest has not helped this last problem.

Any help appreciated!

A: 

After some googling, I've found one Linux Macromedia Flex on Tomcat-HOWTO, at http://members.cox.net/midian/howto/flex+tomcat.htm It looks pretty simple, from that perspective. Have you installed Tomcat?

I haven't attempted that approach, but long ago I started using the FlexBuilder environment, which is just as efficient, if (under Linux), still lacking some features.
Jamie Love
A: 

i have the same problem! please give us an professional asnwer.

eldo