So you've just finished developing your Java app, and it all runs fine on your development machine. The client is itching to get their hands on it so you deploy to their Tomcat server. Everything is fine right? Err NO! The app comes crashing down in a heap with a log file to rival War and Peace! Big oops moment and the client is starting to page through the classifieds looking for a developer who actually knows what they are doing. It's not a comfortable moment in your otherwise shining career.
No problems you decide, I'll just install Glassfish and everything will be fine, that's the app server I'm using so how can it possibly not work. A bit of slight of hand and Glassfish is up and running, your WAR file is deployed and away we go ... or perhaps not. Same error, same servlet, same bemused look on the clients face.
Apologies ensue, virtual machines deployed with a full development environment, router reconfigured to own development machine, lots of red faces (yours) and more bemused looks. So what(TF) went wrong you ask?
Well the answer is actually simple, at least it was in my case. The issue that I had was all because I had used a local WSDL file to define my web service. Netbeans kindly compiles the physical path to the file into the application, but when the app was deployed the path was completely different. When I changed the reference to run from a URL the app started working ... just like magic.
So here's a trap for young (and not so young) players. Regardless of how attractive the option is, don't use the physical WSDL file in your app. Always point it to the URL :-)
LCD
No comments:
Post a Comment