We worked through this offline and I wanted to let anyone following this thread know the resolution. This seems to be related to the old Railo application template (which is no longer supported). The problem is related to the latest version of Railo not being friendly about running its libs from a shared readonly location, (which is why we pulled the template a while back). For now, the suggestion is to put the Railo jars directly into your web application's WEB-INF/lib dir.
1. Create a new app in the stax app console and set Application core runtime = Basic Servlet & JSP
2. fetch the app using Stax SDK (stax getapp -a ...)
3. locally, drop the Railo jars directly into your web application's WEB-INF/lib dir
Dropping in the jars would work, but you'd also need to update the web.xml to reference the Railo servlets too. The easiest way to do it is to grab the Railo WAR file from the Railo Custom section of the download site and unzip it into your Stax application's webapp folder so you get all of the Railo files and configuration.
Got Railo running with BlazeDS. Seems to work just fine locally, but not when deployed to Stax. Wondering if the cloud environment requires a different setup for blazeDS.
I'll research but wondering if you were aware of any blazeds/railo limitations in the cloud.
FYI, here's how I set it up:
- using app console, created app (Basic servlet & JSP)
- stax getapp...
- downloaded Railo 3.1 WAR file from getrailo.com
- deleted the local contents of webapp directory
- extracted the contents of the Railo WAR file to the webapp directory (includes WEB-INF)
- stax run, check localhost:8080, railo is running.
- stop tomcat
- downloaded BlazeDS WAR file from Adobe
- copy the contents of BlazeDS WEB-INF/lib directory to webapp/WEB-INF/lib
- copy the following code from BlazeDS WEB-INF/web.xml file and added it to webapp/WEB-INF/web.xml file:
- ported an existing flex app (currently running on CF8) to Railo utilizing BlazeDS, stax run, checked app on localhost:8080. runs perfectly.
- deployed app to stax. parts of it run. parts do not.
It seems weird that half of the app seems to be working fine and fetching data from the MySQL database via Railo via BlazeDS. The other half does not. Seems weird that it works perfect locally but not on Stax. Maybe my BlazeDS configuration is not adequate for the stax environment.
Off the top of my head I'd guess that deployment-specific issues could be related to assumptions about local filesystem access or making non-HTTP connections to the Flex gateway. I checked out your app and it seemed to be working after logging in, but I don't know which parts of the app are broken. I compared your flex config to what we use for our Flex and CF app templates and nothing jumps out at me as to what might be wrong. I'm afraid this one will take a little debugging on your side to get some clues about what is failing when deployed, and then we can determine if that's a Stax-level issue or and app-level issue.
Here is the answer to my problem if anyone is interested (thank you google and the guy that was kind enough to post this for everyone). The problem had to do with the behavior of the MySQL JDBC driver as it relates to column aliases...
It's funny, I now see that the original thread reported the same issue with it working locally, but not remotely. I'm still puzzled at why that would be the case.
Alias Handling: Should the driver use the legacy behavior for "AS" clauses on columns and tables, and only return aliases (if any) rather than the original column/table name? In 5.0.x, the default value was true. True / False
I tick the true radio button and life is good but a few days later, the setting value appears to be lost and my error resurfaces...
again, i tick the true radio button and aliases are recognized and the problem is solved...but a few days pass....you get the idea.
if memory serves, Railo writes its config files to the WEB-INF folder. Are you using the Railo admin on the deployed instance in the cloud? or are you using the Railo admin locally, and then deploying your application with the modified configuration?
If you are modifying your Railo application configuration in the deployed cloud using the Railo admin, your settings will only be effective while your app is running and will be reset each time an instance of your application is activated in the cloud. This is because when you deploy your application, the config files in the uploaded archive are always used as the basis for new instances of the application.
If you run your app locally, and make changes using the Railo admin, the confugruation will be written to your local WEB-INF folder, and then will always be present when you application is deployed to the cloud.
that makes perfect sense, spike. i had a feeling you'd have some insight into this. i was making this config change using the Railo admin on the deployed instance in the cloud. i'll make the change locally and redeploy.