tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Dependencies on extensions functionality
Date Sun, 05 Feb 2012 11:47:44 GMT
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 <chris@christopherschultz.net
> <mailto:chris@christopherschultz.net>>
> 
> 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
>     <mailto:users-unsubscribe@tomcat.apache.org>
>     For additional commands, e-mail: users-help@tomcat.apache.org
>     <mailto: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]


Mime
View raw message