It's not a secret anymore!*
The moose likes Flex and the fly likes NoSuchMethodError in Flex yet I see Tomcat handle the request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "NoSuchMethodError in Flex yet I see Tomcat handle the request" Watch "NoSuchMethodError in Flex yet I see Tomcat handle the request" New topic
Author

NoSuchMethodError in Flex yet I see Tomcat handle the request

Alvin Watkins
Ranch Hand

Joined: May 25, 2011
Posts: 53
I had a hard drive fail which has been several weeks of hell for me. It took a few days to get the new hard drive from the vendor, a week for Carbonite to restore all my files and now I'm into my second week of setting my environment back up so that I can get to work. I am sure my frustration is not helping. Nonetheless, I seem to have hit a wall. All of this worked fine before the hard drive failure. Now I am getting the following error in Flex when I talk to Tomcat:



I have no errors on Tomcat or in any of the Tomcat logs which is strange because I know Tomcat is returning the response to Flex and I have print statements in Tomcat to try to diagnose where the problem is....

I am using BlazeDS. Here is my code at the server:



What prints on the server is this:



BTW, I'm using encryption to pass messages back and forth between client and server - I encrypt everything but ip addresses. I made sure that the JCE is in my JRE under %JAVA_HOME% - if it were not, this code would not run on Eclipse which is how I discovered that I needed to put the JCE in the lib\security of the JRE...

I get no response, no error message, no nothing from Tomcat as soon as it tries to instantiate the first object in the algorithm (in this case AlfrescoLogin). The catch logic does not run and thus I get no stacktrace. When I run this code from within Eclipse, it runs fine - finds the dependencies (AlfrescoLogin is in one of my dependencies), logs me in, et al. Before the hard drive crash, this all ran fine via Flex as well.

In case this is hard to follow, my project set up is:

1. Flex = UI running in browser
2. Web = BlazeDS on Tomcat deployed as WAR
3. Server = Java POJO as dependency in WAR

I have done everything I can think of to make this work. FYI, I have also verified Happy Axis. I am at a loss for what to try next. Any help you can offer is appreciated. Fixing this will be such a relief. I'd like to get back to work!

Thanks everyone.

Al
Alvin Watkins
Ranch Hand

Joined: May 25, 2011
Posts: 53
Anyone? I guess I'm just to wander in the wilderness for a while longer. I wonder who I pissed off in a past life... This has to be something I've not configured right or a jar file missing or SOMETHING. Unfortunately, the logs aren't saying what it is (at least not in any way that I can discern what the problem is - the logs at the server side are silent).
Alvin Watkins
Ranch Hand

Joined: May 25, 2011
Posts: 53
In case anyone ever comes across this obscure problem in the future, I have an answer now.

Turns out that one of my dependencies needs Apache Axis and Apache Axis-Ant packages. Some of the code compiles against those packages. However, Tomcat also has an Axis webapp which is used by BlazeDS. Apache had version 1.4 of Axis but my Maven project was building with version 1.1. So, the code was compiling against 1.1 but running against 1.4.

Honestly, I have no clue how the versions got so off - something latent from the rebuild of my computer after the crash. It would be nice if everything had interoperability or at least an error message that would lead you in some direction or another but in this instance, all I got was Tomcat handling the request up to whatever point and then it would just sit there. No more code would run but Tomcat would handle new requests just fine (up to the same point). If you ever see behavior like that, I suggest you check Axis.

What I eventually did was ran the mvn install:install -Dfile... using the jars in the axis webapp on Tomcat. That brought my versions in line and everything now works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoSuchMethodError in Flex yet I see Tomcat handle the request