>>>>> Robert Miller writes:

    Robert> I'm about at my wit's end on this one. I admin a site that
    Robert> relies on jsp.  I just upgraded my development area to
    Robert> jdk1.2.2rc4, ApacheJServ1.1 and kept gnujsp0.9. Almost
    Robert> everything works great; actually I've got much better
    Robert> performance than I had before.

    Robert> However, I have a team of developers working on a new
    Robert> project. The jsp's they developed worked under the old
    Robert> jdk1.1.7v3, but now they are broken. The error I get is:

    Robert> java.lang.NoClassDefFoundError: sun/tools/javac/Main
    Robert>         at org.gjt.jsp.JSPCompiler.compileJavaFile(JSPCompiler.java, 
Compiled Code)
    Robert>         at org.gjt.jsp.JSPCompiler.compile(JSPCompiler.java, Compiled Code)
    Robert>     at org.gjt.jsp.JSPServlet.service(JSPServlet.java, Compiled Code)
    Robert>         at javax.servlet.http.HttpServlet.service(HttpServlet.java, 
Compiled Code)
    Robert>         at 
org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code)
    Robert>         at org.apache.jserv.JServConnection.run(JServConnection.java, 
Compiled Code)
    Robert>         at java.lang.Thread.run(Thread.java, Compiled Code)

    Robert> all my other jsp's can find javac no problem. I have
    Robert> updated /jdk/jre/lib/security/* as recommended in the
    Robert> faqOmatic, and i still get the same error.

    Robert> I NEED the performance boost I got with the upgrade;
    Robert> there's no way I'm going to roll it back. How can I get
    Robert> upgrade my config/codebase to work?

    Robert> These developers have been writing good code before... Is
    Robert> it an issue with my configuration? If so, where? If it's
    Robert> with their code, whereabouts should I look for the
    Robert> offending line(s)?

org.gjt.jsp.JSPCompiler is broken because it uses
sun.tools.javac.Main.  Take a look at
http://java.sun.com/products/jdk/faq/faq-sun-packages.html ("Why
Developers Should Not Write Programs That Call 'sun' Packages")

If you want to use sun.tools.javac.Main with 1.2.x you have to put
tools.jar on your classpath.  The better solution is not to use
sun.tools.javac.Main at all.


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to