aspose file tools*
The moose likes Tomcat and the fly likes JasperException  - Error Can't Write.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JasperException  - Error Can Watch "JasperException  - Error Can New topic
Author

JasperException - Error Can't Write....

Mike DeStefano
Ranch Hand

Joined: May 24, 2002
Posts: 36
OK... This is very weird in my oppinion. I loaded my application (which works on my computer) to the hosting server. When I try to bring up my pages I get an error message as follows:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
error: Can't write: /home/virtual/site22/fst/var/www/html/WEB-INF/classes/util/MyMail.class
error: Can't write: /home/virtual/site22/fst/var/www/html/WEB-INF/classes/util/JavaMail.class
error: Can't write: /home/virtual/site22/fst/var/www/html/WEB-INF/classes/pbatravel/MailForm.class
error: Can't write: /home/virtual/site22/fst/var/www/html/WEB-INF/classes/pbatravel/Security.class
error: Can't write: /home/virtual/site22/fst/var/www/html/WEB-INF/classes/pbatravel/Customer.class
error: Can't write: /home/virtual/site22/fst/var/www/html/WEB-INF/classes/pbatravel/CustomerProfile.class
error: Can't write: /home/virtual/site22/fst/var/www/html/WEB-INF/classes/pbatravel/Registration.class
7 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
etc...

After I refresh the page, I get the old page which was there. None of any changes take effect, and the new jsp is ignored. All classes compile perfectly, and everything is fine and dandy in my own pc environment. But I am getting these freakish messages everywhere, and have't a clue why. I am importing everything I am using (have to be, or it wouldn't work on my pc).
PLEASE HELP... I thank you in advance for your support and time.
- Mike DeStefano


-Mike Destefano<br />"Sometimes you feel like a nut..."
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

There seems to be multiple thoughts on why this is:

beans (or other classes) with no package. If you have a class that is not packaged, you must explicitly import it into your JSP. Or, recompile the class to be in an appropriate package.

using jdk1.4. Apparently the entry point for the compiler (sun.tools.javac.Main) is being deprecated.

If this is a remote (hosting) server problem, then you probably can't control the jdk being used. So I'd try the packaging solution.

ps:
http://www.coderanch.com/t/279887/JSP/java/sun-tools-javac-Main-has
and the link at the very bottom of that page ^
Mike DeStefano
Ranch Hand

Joined: May 24, 2002
Posts: 36
Thank you for your thoughts and suggestions. I appreciate it.
My beans, as well as other objects, are all in packages within the WEB-INF/classes directory. I have been hearing a lot of problems coming out of the change in the compiler just as you have said. What to do, what to do...
Any idea on how I can totally destroy what tomcat already has in it's cache? I get the error message only when I update a class. It takes new classes with no problem (I believe), so my thought is to remove them from tomcat's memory and start over. Is it as easy as emptying the tomcat/work directory? or is there other spots where tomcat hides it's cached items?
Do you think this is a viable option?
Thank you for your response.
- Mike
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

As flakey as I've found it, have you tried to use the manager app to 'restart' your application. I'd say to restart Tomcat, but obviously with a shared/hosted instance, you can't do this.

Perhaps you don't even have access to the manager app!

There is something in the back of my mind about someone else having this problem - updating classes in a shared/hosted instance of Tomcat. He figured out a sneaky way to fool Tomcat into reloading. I tried searching for it, but no luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JasperException - Error Can't Write....
 
Similar Threads
Jasper Exception = error: Can't write class....
sun.tools.javac.Main has been deprecated. error: Can't write: ???.class
Server problem (JasperException) Error Can't Write
sun.tools.javac.Main has been deprecated. error: Can't write: ???.class
JasperException... Error Can't Write...