aspose file tools*
The moose likes Tomcat and the fly likes Compilation exeption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Compilation exeption" Watch "Compilation exeption" New topic
Author

Compilation exeption

schneider jean-marie
Greenhorn

Joined: Apr 24, 2005
Posts: 8
Hello !

I have developed a java application and it work fine on my own server where is installed Tomcat (this server is not the develpment machine). When I call the index.php with my browser I can see the expected result (as well if I do the deployment with the war file or if I upload the file of the application.
As my application work fine I uploaded the files on my remote site (here I can only upload the files, I can't use the war file) which use also Tomcat. But when I call the URL I have the following error :
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 11 in the jsp file: /index.jsp
Generated servlet error:
[javac] Compiling 1 source file

/usr/local/jakarta-tomcat4.1/work/Standalone/chemical-sourcing.com/Marvinb/index_jsp.java:7: package chemaxon.calculations does not exist
import chemaxon.calculations.ElementalAnalyser;

But the chemaxon library is in the lib folder as on my own server ?

What I am doing wrong ?
Thanks you for your help,
Jean-Marie
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

But the chemaxon library is in the lib folder as on my own server ?


Can you post the directory structure for the entire web app?
There is more than one "lib" directory in a Tomcat installation.

The location of the lib directory (and several others) is also important.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
schneider jean-marie
Greenhorn

Joined: Apr 24, 2005
Posts: 8
Thank you for your reply !
The directory is as follow :
+ Marvinb
_______index.jsp
_____+ META-INF
________ contex.xml
_____+ WEB-INF
_______+ class
_______+ lib
__________ marvin.jar


jean-Marie
[ May 25, 2005: Message edited by: schneider jean-marie ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

That looks correct to me.

Were you able to restart Tomcat or reload your application after uploading the files?

Is it possible that the jar file was corrupted during upload?
(I'm guessing not. You would usually see a java.util.zip exception in that case)

On your local machine, do the classes from the jar file also exist in under the classes directory?
schneider jean-marie
Greenhorn

Joined: Apr 24, 2005
Posts: 8
No all of the classes are in the jar file.
I have not the possibility to restart Tomcat : the server is not mine.

I upload twice the jar file, so I think that my problem is not comming from this...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

I have not the possibility to restart Tomcat


You can upload the jar file as many times as you'd like, but it will not take effect until the web app can be reloaded. The brute force approach is to restart the server, but if you an convice the owner of the server to set up the Tomcat manager for your context, you will be able to stop and start the web app itself without requiring a server restart.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
schneider jean-marie
Greenhorn

Joined: Apr 24, 2005
Posts: 8
but if you an convice the owner of the server to set up the Tomcat manager for your context, you will be able to stop and start the web app itself without requiring a server restart.
What are you saying is very interresting. I am not aware for that. All time I restart my Tomcat server.
Can you give me the way to restart the application itself ?

Thanks again !
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

Since this is Tomcat-specific, moving to that forum.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

Tomcat comes with a web app manager application which should be configured for the default host. If you are putting your web app in the default host, you should be able to hit the following URL:

http://yourserver/manager/html/list

and get the manager control panel. You will need to have the server owner set you up as a Tomcat user with the "manager" role.

If you have set up your web app in a virtual host, you can add the manager app to that host by adding the following context declaration to the host declaration in server.xml. Here's an example from an OS X/Tomcat 5.0.25 setup:



Of course, you would need to adjust the path as suitable for your own installation.
[ May 25, 2005: Message edited by: Bear Bibeault ]
schneider jean-marie
Greenhorn

Joined: Apr 24, 2005
Posts: 8
Thank you for this very interresting answer. Now I have to know if I can do that !

Jean-Marie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compilation exeption