On 06/02/2012 11:08, Violeta Georgieva wrote: >> I was going to ask you why you were using it! So is your interest >> purely academic? > I have existing applications that are moving to Tomcat from another > application server. > As "dependencies on extensions" is a standard mechanism for shared > libraries, they use it in order to be independent from the application > servers.
I see - in my experience this mechanism is rarely used in web applications. Interesting. p > 2012/2/6 Pid <p...@pidster.com> > >> On 05/02/2012 15:03, Violeta Georgieva wrote: >>> 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. >> >> I was going to ask you why you were using it! So is your interest >> purely academic? >> >> >>> - Does this mean that we can use only Tomcat's classpath dirs and we >> cannot >>> specify a custom directory for these extensions? >> >> It should work. (As per Konstantin's message) >> >> >> p >> >> >>> Thanks >>> Violeta >>> >>> 2012/2/5 Pid <p...@pidster.com> >>> >>>> 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 <ch...@christopherschultz.net >>>>> <mailto:ch...@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-unsubscr...@tomcat.apache.org >>>>> <mailto:users-unsubscr...@tomcat.apache.org> >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>>> <mailto:users-h...@tomcat.apache.org> >>>> > >>>>> >>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> >>>> -- >>>> >>>> [key:62590808] >>>> >>>> >>> >> >> >> -- >> >> [key:62590808] >> >> > -- [key:62590808]
signature.asc
Description: OpenPGP digital signature