Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DC3C9CE7 for ; Sun, 5 Feb 2012 15:04:12 +0000 (UTC) Received: (qmail 99901 invoked by uid 500); 5 Feb 2012 15:04:08 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 99708 invoked by uid 500); 5 Feb 2012 15:04:07 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 99699 invoked by uid 99); 5 Feb 2012 15:04:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 15:04:07 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of milesg78@gmail.com designates 209.85.160.45 as permitted sender) Received: from [209.85.160.45] (HELO mail-pw0-f45.google.com) (209.85.160.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 15:04:00 +0000 Received: by pbaa11 with SMTP id a11so4545131pba.18 for ; Sun, 05 Feb 2012 07:03:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=qWzYuepEt8RAmSB/bVbtcYLbgWHTUEFGNuI4NQm12cY=; b=jioZ0KSf1dZnCfsugtLMSqS+dbC3woMhXZMsB5osRZdjayvXDgAj1DnARQc5n0n05w n9XGulure2tCUFZTcS3oQWcqy5M6DoY3EC69h2yoR1js+9C5zik/G2ekivmx0HVowh0n pYcw/v7SngC4VtiLek4wDX6Jt2c0TXnf5hKw4= MIME-Version: 1.0 Received: by 10.68.232.202 with SMTP id tq10mr38610977pbc.68.1328454219282; Sun, 05 Feb 2012 07:03:39 -0800 (PST) Received: by 10.143.158.21 with HTTP; Sun, 5 Feb 2012 07:03:39 -0800 (PST) In-Reply-To: <4F2E6C60.5090704@pidster.com> References: <4F2D7672.9050200@christopherschultz.net> <4F2E6C60.5090704@pidster.com> Date: Sun, 5 Feb 2012 17:03:39 +0200 Message-ID: Subject: Re: Dependencies on extensions functionality From: Violeta Georgieva To: Tomcat Users List Content-Type: multipart/alternative; boundary=047d7b33d6e8d739a504b838d92e X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33d6e8d739a504b838d92e Content-Type: text/plain; charset=ISO-8859-1 Hi, As I wrote I'm placing the extension jar in "C:\apache-tomcat-7.0.25\ext". I tried the following: I specified "C:\apache-tomcat-7.0.25\lib" as value for "catalina.ext.dirs" property and now the web application is working. But then I have two questions: - Do we need "catalina.ext.dirs" at all if we can use only Tomcat's classpath dirs? Let's look through them instead of introducing additional property. - Does this mean that we can use only Tomcat's classpath dirs and we cannot specify a custom directory for these extensions? Thanks Violeta 2012/2/5 Pid > On 04/02/2012 21:02, Violeta Georgieva wrote: > > Hi, > > > > Here is how one can reproduce the scenario: > > > > 1. Start Tomcat > > 2. Put attached war in webapps folder > > 3. In the console the following error message is printed: > > In the example above, where have you placed the extension? Is it in one > of Tomcat's classpath directories? > > > p > > > INFO: Deploying web application archive > > C:\apache-tomcat-7.0.25\webapps\test-web-app.war > > Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator > > validateManifestResources > > INFO: ExtensionValidator[/test-web-app][Web Application Manifest]: > > Required extension [test-jar] not found. > > Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator > > validateManifestResources > > INFO: ExtensionValidator[/test-web-app]: Failure to find [1] required > > extension(s). > > Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext > > startInternal > > SEVERE: Error getConfigured > > Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext > > startInternal > > SEVERE: Context [/test-web-app] startup failed due to previous errors > > > > 4. Stop Tomcat > > 5. Create folder - C:\apache-tomcat-7.0.25\ext > > 6. Put the attached jar file in the folder created on step 5 > > 7. Start Tomcat with additional VM argument > > -Dcatalina.ext.dirs=C:/apache-tomcat-7.0.25/ext > > 8. This time the application is deployed successfully. > > 9. Request http://localhost:8080/test-web-app/TestServlet > > 10. Internal Server Error is returned with the following Exception: > > > > > > java.lang.ClassNotFoundException: test.TestExtension > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701) > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546) > > test.TestServlet.doGet(TestServlet.java:28) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:621) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > > > > I did not change any other Tomcat configuration so it is running with > > defaults. > > > > The scenario is that TestServlet (in war file) instantiates > > TestExtension (in jar file, placed in the ext directory). > > > > Regards > > Violeta > > 2012/2/4 Christopher Schultz > > > > > > Violetta, > > > > On 2/3/12 8:25 AM, Violeta Georgieva wrote: > >> I have a web application that specifies in the Manifest that wants > >> to use an extension. > > > >> I specify "catalina.ext.dirs" to point to the directory where I > >> placed my extensions jar files. > > > > What is the value of the catalina.ext.dirs system property? Where did > > you set it? Can you verify that it is set when the JVM actually starts? > > > > What files are in the directory or directories specified by > > catalina.ext.dir? > > > >> Unfortunately when I request my application I'm receiving > >> "ClassNotFoundException". > > > > What class cannot be found? Is it found in any of the JAR files you > > have in your catalina.ext.dir (which is, of course, the whole point of > > the feature)? > > > >> I verified that > > > >> ExtensionValidator.validateApplication() succeeded to find the > >> extension jar file. > > > > How did you verify this? Are there logs that suggest your JAR file is > > being scanned? Please provide them. > > > >> What could be the problem? May be I'm missing some configuration? > > > > You might be, but you haven't provided any configuration to us, so we > > don't know if you're missing something. Clearly, something is > > misconfigured. > > > > -chris > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > -- > > [key:62590808] > > --047d7b33d6e8d739a504b838d92e--