Re: Where's the source code of Tomcat Installer?
On 16.10.2012 12:17, Chan David wrote: Hi, dear Tomcat Developers. I have finished a Java application and written service for it. If client want to use it under windows, I need deliver a friendly installer like Tomcat installer which is really nice. I downloaded Tomcat source bundle and can't found any source code about installer. Have you checked http://izpack.org/ ? -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where's the source code of Tomcat Installer?
Thank your help, actually I need the source code of application such as tomcat7.exe/tomcat7w.exe, which include code to show configuration window, start/stop service, notication, shell etc.. 2012/10/16 Mikolaj Rydzewski m...@ceti.pl On 16.10.2012 12:17, Chan David wrote: Hi, dear Tomcat Developers. I have finished a Java application and written service for it. If client want to use it under windows, I need deliver a friendly installer like Tomcat installer which is really nice. I downloaded Tomcat source bundle and can't found any source code about installer. Have you checked http://izpack.org/ ? -- Mikolaj Rydzewski m...@ceti.pl --**--**- To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where's the source code of Tomcat Installer?
On 10/16/2012 02:53 PM, Chan David wrote: Thank your help, actually I need the source code of application such as tomcat7.exe/tomcat7w.exe, which include code to show configuration window, start/stop service, notication, shell etc.. AFAIK, these are renamed procrun binaries from commons-daemon project - http://commons.apache.org/daemon/procrun.html 2012/10/16 Mikolaj Rydzewskim...@ceti.pl On 16.10.2012 12:17, Chan David wrote: Hi, dear Tomcat Developers. I have finished a Java application and written service for it. If client want to use it under windows, I need deliver a friendly installer like Tomcat installer which is really nice. I downloaded Tomcat source bundle and can't found any source code about installer. Have you checked http://izpack.org/ ? -- Mikolaj Rydzewskim...@ceti.pl --**--**- To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards, Alex Kasko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where's the source code of Tomcat Installer?
On 16/10/2012 11:53, Chan David wrote: Thank your help, actually I need the source code of application such as tomcat7.exe/tomcat7w.exe, which include code to show configuration window, start/stop service, notication, shell etc.. The service wrapper is Apache Commons Daemon. The installer is NSIS. Both of which would be obvious if you had looked at the build script in the root of the source tree. Mark 2012/10/16 Mikolaj Rydzewski m...@ceti.pl On 16.10.2012 12:17, Chan David wrote: Hi, dear Tomcat Developers. I have finished a Java application and written service for it. If client want to use it under windows, I need deliver a friendly installer like Tomcat installer which is really nice. I downloaded Tomcat source bundle and can't found any source code about installer. Have you checked http://izpack.org/ ? -- Mikolaj Rydzewski m...@ceti.pl --**--**- To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
FAIL - Application at context path /test could not be started
Hello guys, well I could successfull deploy my web-application test on tomcat. My problem is now: If I want to run my web-application I get the following error: FAIL - Application at context path /test could not be started Does anyone know why this happen? Here ist the content of my catalina.out: Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 385 ms Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor ROOT.xml Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive test.war Oct 16, 2012 12:46:47 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/var/lib/tomcat6/webapps/test/WEB-INF/lib/servlet-api-2.5-6.1.14.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/test] startup failed due to previous errors Oct 16, 2012 12:46:47 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 501 ms 2 things are strange for me in catalina.out but I don't know how to solve them: INFO: validateJarFile(/var/lib/tomcat6/webapps/test/WEB-INF/lib/servlet-api-2.5-6.1.14.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class SEVERE: Error listenerStart Does anyone have tipps or so for me? The full day I ry to run my web-application but I can't make it... Greetings, Clodan
Re: FAIL - Application at context path /test could not be started
could you missing something on you web.xml ? 2012/10/16 majin_clo...@t-online.de majin_clo...@t-online.de Hello guys, well I could successfull deploy my web-application test on tomcat. My problem is now: If I want to run my web-application I get the following error: FAIL - Application at context path /test could not be started Does anyone know why this happen? Here ist the content of my catalina.out: Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 385 ms Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor ROOT.xml Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive test.war Oct 16, 2012 12:46:47 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/var/lib/tomcat6/webapps/test/WEB-INF/lib/servlet-api-2.5-6.1.14.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/test] startup failed due to previous errors Oct 16, 2012 12:46:47 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 501 ms 2 things are strange for me in catalina.out but I don't know how to solve them: INFO: validateJarFile(/var/lib/tomcat6/webapps/test/WEB-INF/lib/servlet-api-2.5-6.1.14.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class SEVERE: Error listenerStart Does anyone have tipps or so for me? The full day I ry to run my web-application but I can't make it... Greetings, Clodan
Re: FAIL - Application at context path /test could not be started
Thanks for your reply. :) my web.xml looks like this: ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; listener listener-classorg.test.web.servlets.BigBangServletContextListener/listener-class /listener servlet servlet-nameBatchSetPreferences/servlet-name servlet-classorg.test.web.servlets.BatchSetPreferencesServlet/servlet-class /servlet servlet servlet-nameSetPreference/servlet-name servlet-classorg.test.web.servlets.SetPreferenceServlet/servlet-class /servlet servlet servlet-nameTrain/servlet-name servlet-classorg.test.web.servlets.TrainServlet/servlet-class /servlet servlet servlet-nameRecommend/servlet-name servlet-classorg.test.web.servlets.RecommendServlet/servlet-class /servlet servlet servlet-nameAddCandidate/servlet-name servlet-classorg.test.web.servlets.AddCandidateServlet/servlet-class /servlet servlet servlet-nameBatchAddCandidates/servlet-name servlet-classorg.test.web.servlets.BatchAddCandidatesServlet/servlet-class /servlet servlet servlet-nameDeleteCandidate/servlet-name servlet-classorg.test.web.servlets.DeleteCandidateServlet/servlet-class /servlet servlet servlet-nameBatchDeleteCandidates/servlet-name servlet-classorg.test.web.servlets.BatchDeleteCandidatesServlet/servlet-class /servlet servlet-mapping servlet-nameBatchSetPreferences/servlet-name url-pattern/batchSetPreferences/url-pattern /servlet-mapping servlet-mapping servlet-nameSetPreference/servlet-name url-pattern/setPreference/url-pattern /servlet-mapping servlet-mapping servlet-nameTrain/servlet-name url-pattern/train/url-pattern /servlet-mapping servlet-mapping servlet-nameRecommend/servlet-name url-pattern/recommend/url-pattern /servlet-mapping servlet-mapping servlet-nameAddCandidate/servlet-name url-pattern/addCandidate/url-pattern /servlet-mapping servlet-mapping servlet-nameBatchAddCandidates/servlet-name url-pattern/batchAddCandidates/url-pattern /servlet-mapping servlet-mapping servlet-nameDeleteCandidate/servlet-name url-pattern/deleteCandidate/url-pattern /servlet-mapping servlet-mapping servlet-nameBatchDeleteCandidates/servlet-name url-pattern/batchDeleteCandidates/url-pattern /servlet-mapping /web-app Von: Daniel Barcellos danielpoa...@gmail.com An: Tomcat Users List users@tomcat.apache.org, majin_clo...@t-online.de majin_clo...@t-online.de Betreff: Re: FAIL - Application at context path /test could not be started Datum: Tue, 16 Oct 2012 15:19:17 +0200 could you missing something on you web.xml ? 2012/10/16 majin_clo...@t-online.de [1] majin_clo...@t-online.de [2] Hello guys, well I could successfull deploy my web-application test on tomcat. My problem is now: If I want to run my web-application I get the following error: FAIL - Application at context path /test could not be started Does anyone know why this happen? Here ist the content of my catalina.out: Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 385 ms Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Oct 16, 2012 12:46:47 PM
Re: FAIL - Application at context path /test could not be started
2012/10/16 majin_clo...@t-online.de majin_clo...@t-online.de: Hello guys, well I could successfull deploy my web-application test on tomcat. My problem is now: If I want to run my web-application I get the following error: FAIL - Application at context path /test could not be started Does anyone know why this happen? Here ist the content of my catalina.out: Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists: [false], isDirectory: [false], canRead: [false] There is no such directory as $CATALINA_HOME/server/classes in Tomcat 6. I guess that you are trying to start Tomcat 6 using configuration files from an old version such as 5.5. Do not do that (as mentioned in the migration doc on the web site). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Re: FAIL - Application at context path /test could not be started
You can try remove the test/WEB-INF/lib/servlet-api-2.5-6.1.14.jar , cantalou89 From: majin_clo...@t-online.de Date: 2012-10-16 21:26 To: Tomcat Users List Subject: Re: FAIL - Application at context path /test could not be started Thanks for your reply. :) my web.xml looks like this: ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; listener listener-classorg.test.web.servlets.BigBangServletContextListener/listener-class /listener servlet servlet-nameBatchSetPreferences/servlet-name servlet-classorg.test.web.servlets.BatchSetPreferencesServlet/servlet-class /servlet servlet servlet-nameSetPreference/servlet-name servlet-classorg.test.web.servlets.SetPreferenceServlet/servlet-class /servlet servlet servlet-nameTrain/servlet-name servlet-classorg.test.web.servlets.TrainServlet/servlet-class /servlet servlet servlet-nameRecommend/servlet-name servlet-classorg.test.web.servlets.RecommendServlet/servlet-class /servlet servlet servlet-nameAddCandidate/servlet-name servlet-classorg.test.web.servlets.AddCandidateServlet/servlet-class /servlet servlet servlet-nameBatchAddCandidates/servlet-name servlet-classorg.test.web.servlets.BatchAddCandidatesServlet/servlet-class /servlet servlet servlet-nameDeleteCandidate/servlet-name servlet-classorg.test.web.servlets.DeleteCandidateServlet/servlet-class /servlet servlet servlet-nameBatchDeleteCandidates/servlet-name servlet-classorg.test.web.servlets.BatchDeleteCandidatesServlet/servlet-class /servlet servlet-mapping servlet-nameBatchSetPreferences/servlet-name url-pattern/batchSetPreferences/url-pattern /servlet-mapping servlet-mapping servlet-nameSetPreference/servlet-name url-pattern/setPreference/url-pattern /servlet-mapping servlet-mapping servlet-nameTrain/servlet-name url-pattern/train/url-pattern /servlet-mapping servlet-mapping servlet-nameRecommend/servlet-name url-pattern/recommend/url-pattern /servlet-mapping servlet-mapping servlet-nameAddCandidate/servlet-name url-pattern/addCandidate/url-pattern /servlet-mapping servlet-mapping servlet-nameBatchAddCandidates/servlet-name url-pattern/batchAddCandidates/url-pattern /servlet-mapping servlet-mapping servlet-nameDeleteCandidate/servlet-name url-pattern/deleteCandidate/url-pattern /servlet-mapping servlet-mapping servlet-nameBatchDeleteCandidates/servlet-name url-pattern/batchDeleteCandidates/url-pattern /servlet-mapping /web-app Von: Daniel Barcellos danielpoa...@gmail.com An: Tomcat Users List users@tomcat.apache.org, majin_clo...@t-online.de majin_clo...@t-online.de Betreff: Re: FAIL - Application at context path /test could not be started Datum: Tue, 16 Oct 2012 15:19:17 +0200 could you missing something on you web.xml ? 2012/10/16 majin_clo...@t-online.de [1] majin_clo...@t-online.de [2] Hello guys, well I could successfull deploy my web-application test on tomcat. My problem is now: If I want to run my web-application I get the following error: FAIL - Application at context path /test could not be started Does anyone know why this happen? Here ist the content of my catalina.out: Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/server], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared/classes], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat6/shared], exists: [false], isDirectory: [false], canRead: [false] Oct 16, 2012 12:46:46 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 16, 2012 12:46:46 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 385 ms Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 16, 2012 12:46:47 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Oct 16, 2012 12:46:47 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor
Thread related MBean questions
Greetings. I have some questions on finding the number of active threads in Tomcat. (1) On our QA system, I notice that the currenthreadsBusy MBean is either zero or one for the 8443 and 8080 connectors. Why then is ThreadCount = 93 when there is not much going on on QA? (2) When I want to graph the thread activity in Tomcat (the thread Pool usage), which is a better counter to look at - currentThreadsBusy or ThreadCount? It seems like ThreadCount is what JConsole displays as Live Threads. (3) Why is TotalStartedThreadCount: 264? Is that a cumulative total since Tomcat was restarted? --Thread-related MBean snippet:- Name: Catalina:type=ThreadPool,name=http-apr-8443 currentThreadsBusy: 1 ... Name: Catalina:type=ThreadPool,name=http-apr-8080 currentThreadsBusy: 0 ... Name: java.lang:type=Threading DaemonThreadCount: 85 PeakThreadCount: 99 AllThreadIds: Array[long] of length 93 135 119 118 117 ... CurrentThreadCpuTime: 46 CurrentThreadUserTime: 402000 ThreadCount: 93 TotalStartedThreadCount: 264 ThreadCpuTimeSupported: true ... ---end of snippet Thanks! -Shanti
Servlet init method called twice (2nd time with null init params)
Hi all, I am not sure why but my servlet init method is getting called more than once and I am not sure why. Any help would be much appreciated. My web.xml is as follows: ?xml version=1.0 encoding=UTF-8? web-app servlet servlet-namemyserlvet/servlet-name servlet-classMyServlet/servlet-class async-supportedtrue/async-supported init-param param-nameexample/param-name param-valuevalue/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern/poll/url-pattern url-pattern/run/url-pattern url-pattern/stop/url-pattern /servlet-mapping listener listener-classMySessionListener/listener-class /listener /web-app I am accessing over HTTPS. The initial POST seems to work ok: 0:0:0:0:0:0:0:1%0 - - [16/Oct/2012:16:53:54 +0100] POST /myservlet/run HTTP/1.1 200 34 But then this is followed by a GET which fails: 0:0:0:0:0:0:0:1%0 - - [16/Oct/2012:16:53:54 +0100] GET /myservlet/poll?_dc=1350402834770 HTTP/1.1 500 2312 The reason the GET fails is because the creation of the Servlet fails. This is the second time the servlet init is called and for the second time the init parameters are null (so it fails to be created). If I could figure out why the init params are null the second time around I could probably come up with a work around BUT my preference is to figure out why the init method is being called twice. I bit more information: Tomcat version: apache-tomcat-7.0.29 Mac OS X 10.7.5 Cheers, Stuart - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat bug 53814 - PDF plugin in IE cannot download correctly
On 10/15/2012 6:37 PM, 孙文 wrote: You are not suitable the open source community and you are a selfish guy. Wonderful, helpful and insightful! I egregiously suggested that reverting a line of code back to 7.0.26, which was also standards-compliant, would have been easy and would have helped many who use PDF and IE, an apparently selfish request even though I rarely use IE myself. It seemed practical and helpful to me, in the spirit of open source, a community I respect and contribute to daily. By the way, the web.xml change we made was suggested in the bug report and seems to resolve it for our IE site visitors. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat bug 53814 - PDF plugin in IE cannot download correctly
On 16/10/2012 18:54, David Wall wrote: By the way, the web.xml change we made was suggested in the bug report and seems to resolve it for our IE site visitors. Glad to head that disabling support for range requests works. That seems like a reasonable short-term workaround until someone experiencing this error contacts Adobe. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Restricting certain ports to certain contexts?
We have a situation: A Tomcat server with a number of contexts. One of those contexts should be available unsecured on port 8080. The others should only be available secured, on port 443. Is there a way we can restrict 8080 to the one unsecured context? -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: pushing updates to a running tomcat instance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 S Ahmed, On 10/15/12 3:59 PM, S Ahmed wrote: so when you don't have reloads enabled, any updates (copying a new version of a .jar) to a folder will not do anything? Correct: Tomcat will basically ignore them. If you update a class file (or JAR file) before Tomcat loads it, then when it gets loaded, obviously it will get the latest one from the disk. This is a spring mvc application, and I'm scared of leaks via logging etc., I'll take the safe route and just recycle or whatever I have to do. That's one of the reasons I don't want the webapp auto-reloading without my explicit action. I have to explicitly start/stop the service if am doing this via the command line? That depends upon how you want everything to work. If you use the manager webapp, you can point-and-click the re-deployment. You can also script the redeployment using the ant tasks that Tomcat provides for working with the manager app. Or, you can just use the REST-based API to do the same thing (the ant tasks are just a wrapper around the REST-based API). Or, you can restart Tomcat entirely if that's what you want to do. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlB9qZQACgkQ9CaO5/Lv0PA/sACgopOKfJFLepusk05S3OKNtybn 8U4AoI3MkjRBYZ+lH8RXx4ZM6MLhBS5Q =gHYN -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: ask tomcat to look at a specifc folder for the root website
-Original Message- From: S Ahmed [mailto:sahmed1...@gmail.com] Sent: Tuesday, October 16, 2012 1:52 PM To: Tomcat Users List Subject: ask tomcat to look at a specifc folder for the root website For my deployment, I have a set directory structure that I use. Is it possible to tell tomcat to look at a specific folder for the ROOT website, instead of in the ../../webapps/ folder? my folder structure is like: /www/myappname/website/ /www/myappname/otherstuff/ I want tomcat to look in my /website/ folder. Yes, look at the documentation for the Context tag. You will need to manually create your ROOT.xml context file, with that specific name, but it is doable. Look in the archives for this list if you need any additional help. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat eclipse and too many connections
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 g. rgar, On 10/15/12 5:16 PM, g. rgar wrote: No I am not leaking connections - definitely. I don't use a single connection to the DB in the scenario posted. I just undeploy and deploy the application via Eclipse. That *may* cause connections to be used. Do you load anything from the db on startup? I do think it may be related to the thread issue - you know better of course. Tomcat kills the thread and this thread is responsible for cleaning abandoned connections. Does it make sense ? The threads name is : [Abandoned connection cleanup thread] Connector/J shouldn't have any cleanup thread running under normal circumstances. I do know that there is a MySQL Cancellation Timer thread that runs when a query is run with a time limit associated with it. It used to be that the library created one thread and left it running, which could lead to a ClassLoader leak in a webapp. That has been fixed though I can't reproduce the fix myself. SEVERE: The web application [/ted2012] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. @Shultz ; what do yu mean by While it is possible, your connection pool should be complaining about that. I'm not sure I know what you mean: did I say that? When? Have you enabled removeAbandoned and logAbandoned for your connections see my first post : remove abandoned is true - I may add log abandoned Without logging them, you'll never know if you have any connection leaks. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlB9vLQACgkQ9CaO5/Lv0PAFSQCgqoDwAo6X/b3kDL/ND05u2TeE H8UAoLxucfbAv3kp/EBrS9fAeF95jh31 =GD+t -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Failed JAR-scanning in Tomcat 7.0.32
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I'm trying to get a webapp that has been running under TC 5.5 for quite a while running under Tomcat 7.0. Everything is the same except for my new server.xml: ?xml version='1.0' encoding='utf-8'? Server port=8066 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.core.ThreadLocalLeakPreventionListener / GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=25/ Connector port=8065 redirectPort=443 protocol=org.apache.coyote.ajp.AjpNioProtocol URIEncoding=UTF-8 executor=tomcatThreadPool / !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Catalina defaultHost=localhost jvmRoute=jvm1 -- Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true /Host /Engine /Service /Server I get this in my catalina.out when I try to start (apologies for the poor line-wrapping): Oct 16, 2012 3:55:26 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib Oct 16, 2012 3:55:26 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ajp-nio-8065] Oct 16, 2012 3:55:26 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Oct 16, 2012 3:55:26 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 539 ms Oct 16, 2012 3:55:27 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Oct 16, 2012 3:55:27 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.32 Oct 16, 2012 3:55:27 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /.../webapps/ROOT Oct 16, 2012 3:55:27 PM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2308) at java.lang.Class.getDeclaredFields(Class.java:1760) at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:87) at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:261) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:140) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
Re: Failed JAR-scanning in Tomcat 7.0.32
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16/10/2012 21:06, Christopher Schultz wrote: I'm wondering if Tomcat should tolerate ClassNotFoundExceptions while JAR-scanning... otherwise, a webapp that wants to use a library will have to make sure *all* dependencies are installed alongside and not just those that are actually required at runtime. It should. Not sure if this is a regression or a new code path. (Busy fixing my mail server right now). Mark -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQfcAeAAoJEBDAHFovYFnnvfMQAIZNEgJ3/ugp9mThNJdf4Bn6 PyIpMMj68pra8iFzTKVoQTnyv/F3QdhkPOkZo41N76kp83Ow+9Yv2QMFziG7hHtx Ef3vApCQEld40ZxhKd2mcSZfxfOnPiT21weP0EXiT73jpiSJTBzyPL0YI3fcpvL+ KMuJK6CIHOhk3VllLpVuE5f0KsxLdDEQzSl+3cz5xLrIZ0dgTIGp31/zAgKmtebQ MyRJ+HhCT22YumKj9ieBw/Nzk80HceW1Rq0cSkOfWln7WLXqHlNYnPOeE8F/Er9O ahc3aYc7wFZ0FmBFGn8GeXTAJZi9/vvgt1gqqzO0947vEYRufpMkDvV9tl5n6Vee X1XN2cqlH+mYCH30X3MaCESCQUreIkzzb8VKxEJaTtSF4KxNctfXXYjiwuBA1iKf xDUlmMb3Y7+TlSI1Eqs5s24oCAdJ5Gb7iFATQC+YLZq9695Q645dD8ACK9CPpQZy MP+iug8gp5b3hAqF9eEW9vh8Y5wZrmZsuroOMj5Sil0l1lzSnktkkcTK6X52U8QN w0BYOFKPI9RHlFGgNc7g3bOV2aPALhyPCKMPYiG66Li4FD1+Dk26HurldMGJVOac Kgs6OHSFii/90iblRONOJAtlIbF9MnppCYpQ6SEUz/n3PcPgF7AT2kho49TXvUyg 9DByXN/s5wWTVAGCy/Wz =tj40 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7.0.30 JAR Scanner ClassCastException
Greetings, On Thu, Oct 4, 2012 at 6:26 AM, Pid p...@pidster.com wrote: Please list the jars that are in your webapps WEB-INF/lib. Thank you for your response. I solved this, I had inadvertently allowed embedded Apache Tomcat libraries into my WEB-INF/lib directory. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7.0.30 JAR Scanner ClassCastException
Greetings, On Fri, Oct 5, 2012 at 9:15 AM, Shanti Suresh sha...@umich.edu wrote: I have a JSP which will tell which library loads which class. Cool. I prefer to use 'grep' as it is quite fast and I can use existing command line. Thank you for sharing, -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
PooledJNDIRealm
We are using the delivered JNDIRealm class for LDAP authN in Tomcat 7.0.29 but we're running into some problems when the back end LDAP is a little slow (another issue being addressed separately) and having threads stack up and timeout. A thread dump shows we end up with a lot of blocked threads, that timeout since we have Apache in front of Tomcat, that seem to be stuck on the synchronized authenticate method. We've rewritten a PooledJNDIRealm using this pooling: http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/pool.html the rewritten version is just the original JNDIRealm with minimal changes to make it work with the pooling and removing the synchronization. Proof of concept testing seems to work but it has yet to be subjected to a heavy load test. Are there any gotchas around this approach? I'm not seeing any unit tests for JNDIRealm, and we're only using part of it, are any regression tests available? Thanks, Kris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Restricting certain ports to certain contexts?
From: James Lampert [mailto:jam...@touchtonecorp.com] Subject: Restricting certain ports to certain contexts? A Tomcat server with a number of contexts. One of those contexts should be available unsecured on port 8080. The others should only be available secured, on port 443. Is there a way we can restrict 8080 to the one unsecured context? Read the servlet spec, chapter 13 (the 3.0 version is, unfortunately, harder to comprehend than the earlier versions). Put the following in the WEB-INF/web.xml of the webapps you wish to restrict to HTTPS: user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint It might be possible to add the above to just the global conf/web.xml file and then override the global setting for the one unsecured webapp by setting its transport-guarantee to NONE, but I haven't tried it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Restricting certain ports to certain contexts?
Caldarale, Charles R wrote: Read the servlet spec, chapter 13 (the 3.0 version is, unfortunately, harder to comprehend than the earlier versions). Put the following in the WEB-INF/web.xml of the webapps you wish to restrict to HTTPS: user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint It might be possible to add the above to just the global conf/web.xml file and then override the global setting for the one unsecured webapp by setting its transport-guarantee to NONE, but I haven't tried it. Thanks. -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat eclipse and too many connections
Thanks for the reply On Tue, Oct 16, 2012 at 10:59 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 g. rgar, On 10/15/12 5:16 PM, g. rgar wrote: No I am not leaking connections - definitely. I don't use a single connection to the DB in the scenario posted. I just undeploy and deploy the application via Eclipse. That *may* cause connections to be used. Do you load anything from the db on startup? The ds is lazy loaded - you can see my DB connector code in the first post.The constructor for the pool is called when first the db is needed (as it is called from a static nested class) - which is on loggin. I never loggin or indeed display the login page. I have to test more to be sure I do think it may be related to the thread issue - you know better of course. Tomcat kills the thread and this thread is responsible for cleaning abandoned connections. Does it make sense ? The threads name is : [Abandoned connection cleanup thread] Connector/J shouldn't have any cleanup thread running under normal circumstances. I do know that there is a MySQL Cancellation Timer thread that runs when a query is run with a time limit associated with it. It used to be that the library created one thread and left it running, which could lead to a ClassLoader leak in a webapp. That has been fixed though I can't reproduce the fix myself. [Abandoned connection cleanup thread] sounds like a thread which cleans up - they are working on it btw and having some problems with tomcat reporting it as a leak - see linked bug : http://bugs.mysql.com/65909 SEVERE: The web application [/ted2012] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. @Shultz ; what do yu mean by While it is possible, your connection pool should be complaining about that. I'm not sure I know what you mean: did I say that? When? In your first post in this thread Have you enabled removeAbandoned and logAbandoned for your connections see my first post : remove abandoned is true - I may add log abandoned Without logging them, you'll never know if you have any connection leaks. Will do ASAP Thanks for your time ! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlB9vLQACgkQ9CaO5/Lv0PAFSQCgqoDwAo6X/b3kDL/ND05u2TeE H8UAoLxucfbAv3kp/EBrS9fAeF95jh31 =GD+t -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Failed JAR-scanning in Tomcat 7.0.32
2012/10/17 Christopher Schultz ch...@christopherschultz.net: I'm trying to get a webapp that has been running under TC 5.5 for quite a while running under Tomcat 7.0. Everything is the same except for my new server.xml: Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log See: http://tomcat.apache.org/migration-6.html#commons-logging.jar I do not think that Log4j uses Apache Commons Logging, but some other libraries that your app uses may use it. 1. Add commons-logging to my webapp's WEB-INF/lib directory +1 2. Configure Tomcat not to scan log4j.jar It should already be excluded (as log4j*.jar mask is mentioned in tomcat.util.scan.DefaultJarScanner.jarsToSkip property in catalina.properties). Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org