• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JasperException - Error Can't Write....

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
https://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
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic