You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jamie Whitehouse <Ja...@genesyslab.com> on 2009/10/23 16:10:34 UTC

Unexplained Animal Sniffer errors with JSPC plugin

I recently discovered that animal sniffer will throw errors with
precompiled jsps.  I've attached a sample project which can be used to
reproduce this.
 
When I run mvn clean install it works fine, no errors, build successful.
Presumably because sniffer is running before the jsps are compiled and
hence not checked.  If I then run mvn install right after that (note no
clean) sniffer will check the compiled jsp classes and give me errors
such as:
 
[INFO] Checking unresolved references to
org.jvnet.animal-sniffer:java1.5:1.0
[ERROR] Undefined reference:
org/apache/jasper/runtime/HttpJspBase.<init>()V in
/home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
[ERROR] Undefined reference:
javax/servlet/jsp/JspFactory.getDefaultFactory()Ljavax/servlet/jsp/JspFa
ctory; in
/home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
[ERROR] Undefined reference:
javax/servlet/http/HttpServletResponse.setContentType(Ljava/lang/String;
)V in
/home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
[ERROR] Undefined reference:
javax/servlet/jsp/JspFactory.getPageContext(Ljavax/servlet/Servlet;Ljava
x/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/Strin
g;ZIZ)Ljavax/servlet/jsp/PageContext; in
/home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class

This is with the complier and signatures set to 1.5.
 
I can usually figure out the signature errors for regular Java code, but
I'm baffled by this.
 
Has anyone else run into this or have suggestions?
 
Thanks,
Jamie.

					
-------------------------------------------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential and proprietary information of Alcatel-Lucent and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Alcatel-Lucent and/or its affiliated entities.
					

RE: Unexplained Animal Sniffer errors with JSPC plugin

Posted by Jamie Whitehouse <Ja...@genesyslab.com>.
Yeah I saw the posts on the dev list and have been following along. 

-----Original Message-----
From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com] 
Sent: Friday, October 23, 2009 12:26 PM
To: Maven Users List
Subject: Re: Unexplained Animal Sniffer errors with JSPC plugin

just so you know:

org.codehaus.mojoLanimal-sniffer-maven-plugin is blocked waiting for
maven-toolchains-plugin to be released

I intend trying to release maven-toolchains-plugin once I have confirmed
that I can release maven plugins (i.e. it will be the second plugin I
will try to release)

The first apache plugin I am trying to release is
maven-invoker-plugin:1.5 which, all going well, will be staged
today/tomorrow (after brian finishes updating repository.apache.org to
sonatype nexus 1.4)

dizzy yet?

-Stephen

2009/10/23 Jamie Whitehouse <Ja...@genesyslab.com>

> Yes it's Kohsuke's original version since there's not a mojos release 
> yet.
>
> It was a missing dependency. I hadn't thought of it that way since the

> jspc compiler was added to catch compilation errors rather than being 
> used to ship the compiled jsp classes.  Either way, in this case the 
> dependencies are provided by the jspc compiler plugin or the Tomcat 
> container at runtime.  The jsp sources don't depend on anything jasper

> specific so it wasn't obvious to me.
>
> Thanks for pointing it out.  Simply adding the following dependencies 
> fixes this simple example:
>  <dependencies>
>    <dependency>
>      <groupId>tomcat</groupId>
>      <artifactId>jasper-compiler</artifactId>
>      <version>5.5.15</version>
>      <scope>provided</scope>
>    </dependency>
>    <dependency>
>      <groupId>tomcat</groupId>
>      <artifactId>jasper-runtime</artifactId>
>      <version>5.5.15</version>
>      <scope>provided</scope>
>    </dependency>
>  </dependencies>
>
> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> Sent: Friday, October 23, 2009 10:25 AM
> To: Maven Users List
> Subject: Re: Unexplained Animal Sniffer errors with JSPC plugin
>
> well that version of animal sniffer is Kohsuke's
>
> I have not released the migrated to codehaus version yet
>
> Looks like you are missing a dependency or two for your jar (probably 
> jasper-runtime and servlet-api)
>
> -Stephen
>
> 2009/10/23 Jamie Whitehouse <Ja...@genesyslab.com>
>
> >  I recently discovered that animal sniffer will throw errors with 
> > precompiled jsps.  I've attached a sample project which can be used 
> > to
>
> > reproduce this.
> >
> > When I run mvn clean install it works fine, no errors, build
> successful.
> > Presumably because sniffer is running before the jsps are compiled 
> > and
>
> > hence not checked.  If I then run mvn install right after that (note

> > no
> > clean) sniffer will check the compiled jsp classes and give me 
> > errors such
> > as:
> >
> > [INFO] Checking unresolved references to 
> > org.jvnet.animal-sniffer:java1.5:1.0
> > [ERROR] Undefined reference:
> > org/apache/jasper/runtime/HttpJspBase.<init>()V in 
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.clas
> > s
> > [ERROR] Undefined reference:
> > javax/servlet/jsp/JspFactory.getDefaultFactory()Ljavax/servlet/jsp/J
> > sp
> > Factory; in
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.clas
> > s
> > [ERROR] Undefined reference:
> > javax/servlet/http/HttpServletResponse.setContentType(Ljava/lang/Str
> > in
> > g;)V in
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.clas
> > s
> > [ERROR] Undefined reference:
> > javax/servlet/jsp/JspFactory.getPageContext(Ljavax/servlet/Servlet;L
> > ja 
> > vax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang
> > /S tring;ZIZ)Ljavax/servlet/jsp/PageContext;
> > in
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.clas
> > s This is with the complier and signatures set to 1.5.
> >
> > I can usually figure out the signature errors for regular Java code,

> > but I'm baffled by this.
> >
> > Has anyone else run into this or have suggestions?
> >
> > Thanks,
> > Jamie.
> >
> >
> >
> > CONFIDENTIALITY NOTICE: This e-mail and any files attached may 
> > contain
>
> > confidential and proprietary information of Alcatel-Lucent and/or 
> > its affiliated entities. Access by the intended recipient only is
> authorized.
> > Any liability arising from any party acting, or refraining from 
> > acting, on any information contained in this e-mail is hereby 
> > excluded. If you are not the intended recipient, please notify the 
> > sender immediately, destroy the original transmission and its 
> > attachments and do not disclose the contents to any other person, 
> > use it for any purpose, or store or copy the information in any
medium.
> > Copyright in this e-mail and any attachments belongs to 
> > Alcatel-Lucent
> and/or its affiliated entities.
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
>
> ----------------------------------------------------------------------
> ---------------------------------------------
> CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain

> confidential and proprietary information of Alcatel-Lucent and/or its 
> affiliated entities. Access by the intended recipient only is
authorized.
> Any liability arising from any party acting, or refraining from 
> acting, on any information contained in this e-mail is hereby 
> excluded. If you are not the intended recipient, please notify the 
> sender immediately, destroy the original transmission and its 
> attachments and do not disclose the contents to any other person, use 
> it for any purpose, or store or copy the information in any medium. 
> Copyright in this e-mail and any attachments belongs to Alcatel-Lucent
and/or its affiliated entities.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

					
-------------------------------------------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential and proprietary information of Alcatel-Lucent and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Alcatel-Lucent and/or its affiliated entities.
					

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Unexplained Animal Sniffer errors with JSPC plugin

Posted by Stephen Connolly <st...@gmail.com>.
just so you know:

org.codehaus.mojoLanimal-sniffer-maven-plugin is blocked waiting for
maven-toolchains-plugin to be released

I intend trying to release maven-toolchains-plugin once I have confirmed
that I can release maven plugins (i.e. it will be the second plugin I will
try to release)

The first apache plugin I am trying to release is maven-invoker-plugin:1.5
which, all going well, will be staged today/tomorrow (after brian finishes
updating repository.apache.org to sonatype nexus 1.4)

dizzy yet?

-Stephen

2009/10/23 Jamie Whitehouse <Ja...@genesyslab.com>

> Yes it's Kohsuke's original version since there's not a mojos release
> yet.
>
> It was a missing dependency. I hadn't thought of it that way since the
> jspc compiler was added to catch compilation errors rather than being
> used to ship the compiled jsp classes.  Either way, in this case the
> dependencies are provided by the jspc compiler plugin or the Tomcat
> container at runtime.  The jsp sources don't depend on anything jasper
> specific so it wasn't obvious to me.
>
> Thanks for pointing it out.  Simply adding the following dependencies
> fixes this simple example:
>  <dependencies>
>    <dependency>
>      <groupId>tomcat</groupId>
>      <artifactId>jasper-compiler</artifactId>
>      <version>5.5.15</version>
>      <scope>provided</scope>
>    </dependency>
>    <dependency>
>      <groupId>tomcat</groupId>
>      <artifactId>jasper-runtime</artifactId>
>      <version>5.5.15</version>
>      <scope>provided</scope>
>    </dependency>
>  </dependencies>
>
> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> Sent: Friday, October 23, 2009 10:25 AM
> To: Maven Users List
> Subject: Re: Unexplained Animal Sniffer errors with JSPC plugin
>
> well that version of animal sniffer is Kohsuke's
>
> I have not released the migrated to codehaus version yet
>
> Looks like you are missing a dependency or two for your jar (probably
> jasper-runtime and servlet-api)
>
> -Stephen
>
> 2009/10/23 Jamie Whitehouse <Ja...@genesyslab.com>
>
> >  I recently discovered that animal sniffer will throw errors with
> > precompiled jsps.  I've attached a sample project which can be used to
>
> > reproduce this.
> >
> > When I run mvn clean install it works fine, no errors, build
> successful.
> > Presumably because sniffer is running before the jsps are compiled and
>
> > hence not checked.  If I then run mvn install right after that (note
> > no
> > clean) sniffer will check the compiled jsp classes and give me errors
> > such
> > as:
> >
> > [INFO] Checking unresolved references to
> > org.jvnet.animal-sniffer:java1.5:1.0
> > [ERROR] Undefined reference:
> > org/apache/jasper/runtime/HttpJspBase.<init>()V in
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> > [ERROR] Undefined reference:
> > javax/servlet/jsp/JspFactory.getDefaultFactory()Ljavax/servlet/jsp/Jsp
> > Factory; in
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> > [ERROR] Undefined reference:
> > javax/servlet/http/HttpServletResponse.setContentType(Ljava/lang/Strin
> > g;)V in
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> > [ERROR] Undefined reference:
> > javax/servlet/jsp/JspFactory.getPageContext(Ljavax/servlet/Servlet;Lja
> > vax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/S
> > tring;ZIZ)Ljavax/servlet/jsp/PageContext;
> > in
> > /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> > This is with the complier and signatures set to 1.5.
> >
> > I can usually figure out the signature errors for regular Java code,
> > but I'm baffled by this.
> >
> > Has anyone else run into this or have suggestions?
> >
> > Thanks,
> > Jamie.
> >
> >
> >
> > CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain
>
> > confidential and proprietary information of Alcatel-Lucent and/or its
> > affiliated entities. Access by the intended recipient only is
> authorized.
> > Any liability arising from any party acting, or refraining from
> > acting, on any information contained in this e-mail is hereby
> > excluded. If you are not the intended recipient, please notify the
> > sender immediately, destroy the original transmission and its
> > attachments and do not disclose the contents to any other person, use
> > it for any purpose, or store or copy the information in any medium.
> > Copyright in this e-mail and any attachments belongs to Alcatel-Lucent
> and/or its affiliated entities.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
>
> -------------------------------------------------------------------------------------------------------------------
> CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain
> confidential and proprietary information of Alcatel-Lucent and/or its
> affiliated entities. Access by the intended recipient only is authorized.
> Any liability arising from any party acting, or refraining from acting, on
> any information contained in this e-mail is hereby excluded. If you are not
> the intended recipient, please notify the sender immediately, destroy the
> original transmission and its attachments and do not disclose the contents
> to any other person, use it for any purpose, or store or copy the
> information in any medium. Copyright in this e-mail and any attachments
> belongs to Alcatel-Lucent and/or its affiliated entities.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Unexplained Animal Sniffer errors with JSPC plugin

Posted by Jamie Whitehouse <Ja...@genesyslab.com>.
Yes it's Kohsuke's original version since there's not a mojos release
yet.

It was a missing dependency. I hadn't thought of it that way since the
jspc compiler was added to catch compilation errors rather than being
used to ship the compiled jsp classes.  Either way, in this case the
dependencies are provided by the jspc compiler plugin or the Tomcat
container at runtime.  The jsp sources don't depend on anything jasper
specific so it wasn't obvious to me.

Thanks for pointing it out.  Simply adding the following dependencies
fixes this simple example:
  <dependencies>
    <dependency>
      <groupId>tomcat</groupId>
      <artifactId>jasper-compiler</artifactId>
      <version>5.5.15</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>tomcat</groupId>
      <artifactId>jasper-runtime</artifactId>
      <version>5.5.15</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

-----Original Message-----
From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com] 
Sent: Friday, October 23, 2009 10:25 AM
To: Maven Users List
Subject: Re: Unexplained Animal Sniffer errors with JSPC plugin

well that version of animal sniffer is Kohsuke's

I have not released the migrated to codehaus version yet

Looks like you are missing a dependency or two for your jar (probably
jasper-runtime and servlet-api)

-Stephen

2009/10/23 Jamie Whitehouse <Ja...@genesyslab.com>

>  I recently discovered that animal sniffer will throw errors with 
> precompiled jsps.  I've attached a sample project which can be used to

> reproduce this.
>
> When I run mvn clean install it works fine, no errors, build
successful.
> Presumably because sniffer is running before the jsps are compiled and

> hence not checked.  If I then run mvn install right after that (note 
> no
> clean) sniffer will check the compiled jsp classes and give me errors 
> such
> as:
>
> [INFO] Checking unresolved references to 
> org.jvnet.animal-sniffer:java1.5:1.0
> [ERROR] Undefined reference:
> org/apache/jasper/runtime/HttpJspBase.<init>()V in 
> /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> [ERROR] Undefined reference:
> javax/servlet/jsp/JspFactory.getDefaultFactory()Ljavax/servlet/jsp/Jsp
> Factory; in 
> /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> [ERROR] Undefined reference:
> javax/servlet/http/HttpServletResponse.setContentType(Ljava/lang/Strin
> g;)V in 
> /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> [ERROR] Undefined reference:
> javax/servlet/jsp/JspFactory.getPageContext(Ljavax/servlet/Servlet;Lja
> vax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/S
> tring;ZIZ)Ljavax/servlet/jsp/PageContext;
> in 
> /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> This is with the complier and signatures set to 1.5.
>
> I can usually figure out the signature errors for regular Java code, 
> but I'm baffled by this.
>
> Has anyone else run into this or have suggestions?
>
> Thanks,
> Jamie.
>
>
>
> CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain

> confidential and proprietary information of Alcatel-Lucent and/or its 
> affiliated entities. Access by the intended recipient only is
authorized.
> Any liability arising from any party acting, or refraining from 
> acting, on any information contained in this e-mail is hereby 
> excluded. If you are not the intended recipient, please notify the 
> sender immediately, destroy the original transmission and its 
> attachments and do not disclose the contents to any other person, use 
> it for any purpose, or store or copy the information in any medium. 
> Copyright in this e-mail and any attachments belongs to Alcatel-Lucent
and/or its affiliated entities.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

					
-------------------------------------------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential and proprietary information of Alcatel-Lucent and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Alcatel-Lucent and/or its affiliated entities.
					

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Unexplained Animal Sniffer errors with JSPC plugin

Posted by Stephen Connolly <st...@gmail.com>.
well that version of animal sniffer is Kohsuke's

I have not released the migrated to codehaus version yet

Looks like you are missing a dependency or two for your jar (probably
jasper-runtime and servlet-api)

-Stephen

2009/10/23 Jamie Whitehouse <Ja...@genesyslab.com>

>  I recently discovered that animal sniffer will throw errors with
> precompiled jsps.  I've attached a sample project which can be used to
> reproduce this.
>
> When I run mvn clean install it works fine, no errors, build successful.
> Presumably because sniffer is running before the jsps are compiled and hence
> not checked.  If I then run mvn install right after that (note no
> clean) sniffer will check the compiled jsp classes and give me errors such
> as:
>
> [INFO] Checking unresolved references to
> org.jvnet.animal-sniffer:java1.5:1.0
> [ERROR] Undefined reference:
> org/apache/jasper/runtime/HttpJspBase.<init>()V in
> /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> [ERROR] Undefined reference:
> javax/servlet/jsp/JspFactory.getDefaultFactory()Ljavax/servlet/jsp/JspFactory;
> in /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> [ERROR] Undefined reference:
> javax/servlet/http/HttpServletResponse.setContentType(Ljava/lang/String;)V
> in /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> [ERROR] Undefined reference:
> javax/servlet/jsp/JspFactory.getPageContext(Ljavax/servlet/Servlet;Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/String;ZIZ)Ljavax/servlet/jsp/PageContext;
> in /home/basil/work/eval/jspc-sniffer/target/classes/jsp/index_jsp.class
> This is with the complier and signatures set to 1.5.
>
> I can usually figure out the signature errors for regular Java code, but
> I'm baffled by this.
>
> Has anyone else run into this or have suggestions?
>
> Thanks,
> Jamie.
>
>
>
> CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain
> confidential and proprietary information of Alcatel-Lucent and/or its
> affiliated entities. Access by the intended recipient only is authorized.
> Any liability arising from any party acting, or refraining from acting, on
> any information contained in this e-mail is hereby excluded. If you are not
> the intended recipient, please notify the sender immediately, destroy the
> original transmission and its attachments and do not disclose the contents
> to any other person, use it for any purpose, or store or copy the
> information in any medium. Copyright in this e-mail and any attachments
> belongs to Alcatel-Lucent and/or its affiliated entities.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>