I have written a class which utilizes the SAX api in JDK 1.4 in order to parse XML files. When running a small TesterUtility which I wrote to test it through the IDE everything works fine, however when running from the command line I kept on getting a java.util.EmptyStackException thrown somwhere within org.apache.crimson.Parser2.java.
Since generally such problems come from a bad classpath, I added:
in the begginning of the tester, and then began checking dir by dir which one was lacking.
After a while I found the when placing one of Fortes modules ('wasp-advanced.jar') in the classpath solved the problem and allowed the program to run from the command line as well. Now this is odd for two reasons:
a) I have absolutley no dependencies on wasp-advanced.jar, as does the SAX api. I have verified this by running a verbose output
b) The exception thrown was a java.util.EmptyStackException - which is a runtime exception, not a class not found exception, or any other exception one would expect to find when the VM doesn't find a class.
Unfortunatley the problem was not solved by simply adding the module into the classpath. I also need this to run under Tomcat, and placing the aforementioned module into Tomcats 'lib' directory does not help, and I still receive the same error.
So just to sum it all up:
a) The program worked fine under the IDE
b) Did not work under console until a single jar, wasp-advanced.jar, one of Forte's modules, was placed into the classpath. There are no dependencies on the jar file *verified* by running verbose output.
c) Adding this module into tomcat lib directory does not help, and the same EmptyStackException is still thrown, as if running from command prompt without correct classpath.
If anybody has any insight as to the origin of this error and/or suggestions for a solution they would be very much appreciated.