tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: Client Deployer 5.5.11 NullPointerException
Date Thu, 25 Aug 2005 13:37:56 GMT
Hi,

I'd really love to I assure you, but I really don't 

a) have years and years of architecting Tomcat development to trace through how Jasper2 works
and 
b) the time whilst I am sat here working for a corporation trying to get Tomcat working for
the business

For what it's worth (which is nothing I realise) I do realise that jspCompiler.init(this,
jsw) is throwing the exception because the jspCompiler returned from the compiler = (Compiler)
Class.forName(className).newInstance(); is null due to what must be a CNFE (looks like logging
is needed there). I also see that this was why you asked me to copy the JDT compiler jar from
common/lib into the deployer/lib. 

However, I did just that, and this still does not solve the resolution of the compiler class.
Can I clarify that wnated me to copy common/lib/jasper-compiler-jdt.jar into deployer/lib?


Finally, is it documented anywhere that deployer won't work out of the box? If not, I'd be
happy to make a comment on the Deployer doc page.

Regards, Allistair.

     */
    public Compiler createCompiler() throws JasperException {
        if (jspCompiler != null ) {
            return jspCompiler;
        }
        jspCompiler = null;
        if (options.getCompiler() == null) {
            jspCompiler = createCompiler("org.apache.jasper.compiler.JDTCompiler");
            if (jspCompiler == null) {
                jspCompiler = createCompiler("org.apache.jasper.compiler.AntCompiler");
            }
        } else {
            jspCompiler = createCompiler("org.apache.jasper.compiler.AntCompiler");
            if (jspCompiler == null) {
                jspCompiler = createCompiler("org.apache.jasper.compiler.JDTCompiler");
            }
        }
        jspCompiler.init(this, jsw);
        return jspCompiler;
    }

    private static Compiler createCompiler(String className) {
        Compiler compiler = null; 
        try {
            compiler = (Compiler) Class.forName(className).newInstance();
        } catch (Throwable t) {
            // Log ?
            // FIXME: log
        }
        return compiler;
    }

> -----Original Message-----
> From: Remy Maucherat [mailto:remy.maucherat@gmail.com]
> Sent: 25 August 2005 13:05
> To: Tomcat Users List
> Subject: Re: Client Deployer 5.5.11 NullPointerException
> 
> 
> On 8/25/05, Allistair Crossley <Allistair.Crossley@qas.com> wrote:
> > Hi,
> > 
> > No I don't think that's it, both ant and javac work on my 
> command line. I do use Ant for build, I'm just trying 
> deployer for the first time. JAVA_HOME, ANT_HOME are also 
> both defined. Ant is also the latest version 1.6.5
> > 
> 
> Great. Then go look in the code and try to explain the exception by
> something other than "No Java compiler available".
> 
> -- 
> xxxxxxxxxxxxxxxxxxxxxxxxx
> Rémy Maucherat
> Developer & Consultant
> JBoss Group (Europe) SàRL
> xxxxxxxxxxxxxxxxxxxxxxxxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message