How to use Jasper class?
Hi, I'm trying to build a minimal JSP container, just like winstone http://winstone.sourceforge.net/#commandLine But with tc 7.0.55 it doesn't seem to work, so I had to find my own ways around the Jasper class: Error initializing web application: prefix [] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:68) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:374) at winstone.ServletConfiguration.ensureInitialization(ServletConfiguration.java:178) at winstone.WebAppConfiguration.init(WebAppConfiguration.java:918) at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131) at winstone.HostConfiguration.init(HostConfiguration.java:73) at winstone.HostGroup.initHost(HostGroup.java:85) at winstone.HostGroup.init(HostGroup.java:45) at winstone.Launcher.init(Launcher.java:196) at winstone.Launcher.main(Launcher.java:391) Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) So, is there any example code with Jasper class? -- Best Regards, Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Graceful Shutdown
Hi, Does Tomcat server support Graceful Shutdown (like all other App Servers: Weblogic, Websphere), where new requests are rejected, and the server finishes in-flight work on existing requests? Something like the apachectl -k graceful, but instead to restart to stop the server. Tomcat 8.0.9, Linux RHEL 6.4 Thanks, Ron Holckener Portfolio System Architects, PBG +972-9-7761288 (office) +972-9-7761504 (fax) Email: ro...@amdocs.commailto:ro...@amdocs.com AMDOCS | EMBRACE CHALLENGE EXPERIENCE SUCCESS www.amdocs.comhttp://www.amdocs.com/ Please consider the impact on the environment before printing this e-mail and/or the attachment(s). Did you know...? The Amdocs CES 8 portfolio enables service providers to do more in the connected world. CES 8 helps providers to expand quicker, drive personalized customer experiences and run leaner. Follow Amdocs on Facebookhttp://www.facebook.com/amdocsinc/, Twitterhttp://twitter.com/AmdocsInc, LinkedInhttp://www.linkedin.com/company/amdocs, YouTubehttp://www.youtube.com/amdocsinc and Google+https://plus.google.com/105657940751678445194(new!) - and read the latest on the Amdocs blog networkhttp://blogs.amdocs.com/. This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp
Re: How to use Jasper class?
On Wed, Jul 30, 2014 at 3:43 AM, Aaron Lewis the.warl0ck.1...@gmail.com wrote: Hi, I'm trying to build a minimal JSP container, just like winstone http://winstone.sourceforge.net/#commandLine But with tc 7.0.55 it doesn't seem to work, so I had to find my own ways around the Jasper class: Error initializing web application: prefix [] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory Not sure that I follow what you're trying to do here, but it seems like you're missing the JAR file for JULI, the logging library used by Tomcat. Maybe if you add that to your class path it'll help? It's in the bin directory of a normal Tomcat install (tomcat-juli.jar). Dan at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:68) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:374) at winstone.ServletConfiguration.ensureInitialization(ServletConfiguration.java:178) at winstone.WebAppConfiguration.init(WebAppConfiguration.java:918) at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131) at winstone.HostConfiguration.init(HostConfiguration.java:73) at winstone.HostGroup.initHost(HostGroup.java:85) at winstone.HostGroup.init(HostGroup.java:45) at winstone.Launcher.init(Launcher.java:196) at winstone.Launcher.main(Launcher.java:391) Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) So, is there any example code with Jasper class? -- Best Regards, Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Shutdown
On 30/07/2014 12:24, Ron Holckener wrote: Hi, Does Tomcat server support Graceful Shutdown (like all other App Servers: Weblogic, Websphere), where new requests are rejected, and the server finishes in-flight work on existing requests? Something like the apachectl -k graceful, but instead to restart to stop the server. Tomcat 8.0.9, Linux RHEL 6.4 What you describe is the default behaviour although Tomcat only waits a relatively short time (10s ?) for in-flight requests to complete. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Graceful Shutdown
This behavior exists using the regular shutdown.sh script? Is the timeout (10s) configurable? Thanks, Ron Holckener -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Wednesday, July 30, 2014 3:50 PM To: Tomcat Users List Subject: Re: Graceful Shutdown On 30/07/2014 12:24, Ron Holckener wrote: Hi, Does Tomcat server support Graceful Shutdown (like all other App Servers: Weblogic, Websphere), where new requests are rejected, and the server finishes in-flight work on existing requests? Something like the apachectl -k graceful, but instead to restart to stop the server. Tomcat 8.0.9, Linux RHEL 6.4 What you describe is the default behaviour although Tomcat only waits a relatively short time (10s ?) for in-flight requests to complete. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Shutdown
On 30/07/2014 14:19, Ron Holckener wrote: This behavior exists using the regular shutdown.sh script? Yes. Is the timeout (10s) configurable? Yes. Mark Thanks, Ron Holckener -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Wednesday, July 30, 2014 3:50 PM To: Tomcat Users List Subject: Re: Graceful Shutdown On 30/07/2014 12:24, Ron Holckener wrote: Hi, Does Tomcat server support Graceful Shutdown (like all other App Servers: Weblogic, Websphere), where new requests are rejected, and the server finishes in-flight work on existing requests? Something like the apachectl -k graceful, but instead to restart to stop the server. Tomcat 8.0.9, Linux RHEL 6.4 What you describe is the default behaviour although Tomcat only waits a relatively short time (10s ?) for in-flight requests to complete. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp - To unsubscribe, e-mail: users-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
Re: tomcat7.exe windows service crash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jan, On 7/29/14, 7:30 AM, Jan Vávra wrote: Hello, I'm facing a problem of tomcat7.exe crash (from win64 Tomcat 7.0.54 distribution) installed as a Windows service on Windows 2012 x64, x64 jdk 1.7.0.65. In the Widows event log is message (translated from Czech) :Windows service Apache Tomcat 7 was unexpectedly ended. Interresting is that in my webapp in registered context listener the contextDestroyed method was called and my log command in contextDestroyed (.) was succesfully written. So it seems that my app is gracefully going to shutdown. But why? In the tomcat log I do not see any error messages that leads tomcat to stop. The tomcat7.exe process exited. In my app we transfer through a windows pipe a 300 MB big file to newly created subprocess written in c for an analysis. jvm opts changed: Xmx=6116MB. Eg. in one case was the server started at 10:34:55 and crashed at 10:43:13 (according the Windows event log) --- tomcat7-stderr.log: --- VII 29, 2014 10:34:55 DOP. org.apache.catalina.startup.Catalina start INFO: Server startup in 6323 ms VII 29, 2014 10:43:07 DOP. org.apache.coyote.AbstractProtocol pause INFO: Pausing ProtocolHandler [http-apr-8080] Interesting: the server runs for 10 minutes and then stops, evidently gracefully. Is there anything in any other log file around that time? VII 29, 2014 10:43:07 DOP. org.apache.coyote.AbstractProtocol pause INFO: Pausing ProtocolHandler [ajp-apr-8009] VII 29, 2014 10:43:07 DOP. org.apache.catalina.core.StandardService stopInternal INFO: Stopping service Catalina VII 29, 2014 10:43:11 DOP. org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/jasw] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. VII 29, 2014 10:43:11 DOP. org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/jasw] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. VII 29, 2014 10:43:11 DOP. org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/jasw] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@6be8e70]) and a value of type [java.util.WeakHashMap] (value [{class cz.software602.sdar.tsl.CertTypeResponseItem=java.lang.ref.WeakReference@48795e85, class cz.software602.sdar.tsl.GetCertPathResponse=java.lang.ref.WeakReference@182c92ef, class cz.software602.sdar.tsl.CertPathResponse=java.lang.ref.WeakReference@1662954f, class cz.software602.sdar.tsl.Cert=java.lang.ref.WeakReference@22388104, class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@2b9e3f29, class cz.software602.sdar.pdf.TRevocations=java.lang.ref.WeakReference@2244b31e, class cz.software602.sdar.tsl.CertPath=java.lang.ref.WeakReference@4c4b8825, class cz.software602.sdar.pdf.TCmsInfo=java.lang.ref.WeakReference@72d75c44, class cz.software602.sdar.tsl.Crl=java.lang.ref.WeakReference@18eaaf43, class cz.software602.sdar.pdf.TPdfInfo=java.lang.ref.WeakReference@5798647c, class java.util.ArrayList=java.lang.ref.WeakReference@55ed35d1, class cz.software602.sdar.tsl.CertRevocation=java.lang.ref.WeakReference@48685869, class cz.software602.sdar.tsl.Status=java.lang.ref.WeakReference@3a847aa2, class cz.software602.sdar.pdf.TCertificates=java.lang.ref.WeakReference@4f8f3fb1, class cz.software602.sdar.tsl.GetCertTypeResponse=java.lang.ref.WeakReference@459ea645, class cz.software602.sdar.tsl.CertTypeResponseList=java.lang.ref.WeakReference@32b61fb8, class cz.software602.sdar.tsl.CertTypeResponse=java.lang.ref.WeakReference@52dc830a}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. VII 29, 2014 10:43:11 DOP. org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/jasw] created a ThreadLocal with key of type [com.sun.xml.ws.api.client.ServiceInterceptorFactory$1] (value [com.sun.xml.ws.api.client.ServiceInterceptorFactory$1@b1f3006]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. VII 29, 2014 10:43:11 DOP. org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: The web application [/jasw] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1]
Re: How to use Jasper class?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Daniel, On 7/30/14, 8:16 AM, Daniel Mikusa wrote: On Wed, Jul 30, 2014 at 3:43 AM, Aaron Lewis the.warl0ck.1...@gmail.com wrote: Hi, I'm trying to build a minimal JSP container, just like winstone http://winstone.sourceforge.net/#commandLine But with tc 7.0.55 it doesn't seem to work, so I had to find my own ways around the Jasper class: Error initializing web application: prefix [] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory Not sure that I follow what you're trying to do here, but it seems like you're missing the JAR file for JULI, the logging library used by Tomcat. Maybe if you add that to your class path it'll help? It's in the bin directory of a normal Tomcat install (tomcat-juli.jar). +1 Interesting that Jasper uses JULI directly instead of commons-logging. I think that should probably change, since Jasper is something of some usefulness outside of Tomcat, and JULI is really a Tomcat internal thing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2RfPAAoJEBzwKT+lPKRY6IIQAL2kayaRosDE71R0N8n9UTW2 p4Ht+/4ZF2YQEEaqfgoHPYvDNUhv1x1+ydr2QENjIui6ed/5phLtos4+Q5CmzU4I OCncnMgwiY/jQJ3lzO+C3yOputnYPzphmezKwMhu4nZD1MZ1JtCOv2k4cMChcNGg JacK9KXMjnoG+iareBEUVjLAG39mn20n26ZR/CU2m1I+TV34Ds2okhmK1xPMWst4 r1sSoxaQXBx4qmo83tGm/L+IF0k68BHvDWMln1N4Z5fD6UXe4LrU0vq+K77NpOwS MpauJOI3kYysDpHTlZ+i33gcEfi3Oev7WTtfMxdQtgNjn5GLEWE21aNg3rSjMvr9 dMKNvs79zk1O4CiT43g7hDRt4g90SO9R1xfwkKLyA789xCSibzVIeCQFpyohOxA1 KGMrloEF9KIRR/IgnBOD1k1DrBnLqgo5ihawzJut1HXpqvhn+UnfLCjBF/3BP/Iw 6bF6jFJxv4P4+eyZRaMLlLGzCh5kkTqWeLZyYwdjNc/KexWOwlD+3cl9Np8Smm9L rNSt52n+o0NVCkSZ4/ceTr/cYBY8DarTl+mWO2OXgWMiev4HJgdO8qDdpqHYSfTm 8FVFnSdI0wckMZ75E1oQCeVDgYhIfwbXz+1GjXF3R89sAci/4p4IAbY6e4KDobeY MeU6mx7xl3DzbmgnAQTV =tjm4 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
need to keep the connection alive
I want to make the connection alive from tomcat to the db server. As of now connection is getting closed / terminating might be due to network or idle connection. Following is my configuration. Resource name=jdbc/DB_NAME auth=Container type=javax.sql.DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql://IP:PORT/DB_NAME username= password= maxActive=100 maxIdle=20 maxWait=3 removeAbandoned=true removeAbandonedTimeout=120 logAbandoned=true / Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / I want to ensure that my connection should be alive and henceforth, I have added following parameter in above Resource configuration. validationQuery=SELECT 1 testOnBorrow=true However, after searching many forum says that you should add below parameters too. Please advise on it. testOnReturn= testWhileIdle= minEvictableIdleTimeMillis timeBetweenEvictionRunsMillis
making all pages to fo index.jsp
I want to make it so every page that does not have a actual .jsp file gets sent back index.jsp. I am doing it with error-page but that also sends a 404 I want zero clue they landed on a non-existent page -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
Re: Graceful Shutdown
30.07.2014 16:19, Ron Holckener пишет: This behavior exists using the regular shutdown.sh script? Is the timeout (10s) configurable? Thanks, Ron Holckener ./$CATALINA_HOME/bin/catalina.sh stop 30 (30 sec. wait) Don't remember same option inside shutdown.sh, but anyway - it call catalina.sh with stop option. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: need to keep the connection alive
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dhaval, On 7/30/14, 3:42 PM, Dhaval Jaiswal wrote: I want to make the connection alive from tomcat to the db server. As of now connection is getting closed / terminating might be due to network or idle connection. Following is my configuration. Resource name=jdbc/DB_NAME auth=Container type=javax.sql.DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql://IP:PORT/DB_NAME username= password= maxActive=100 maxIdle=20 maxWait=3 removeAbandoned=true removeAbandonedTimeout=120 logAbandoned=true / Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / I want to ensure that my connection should be alive and henceforth, I have added following parameter in above Resource configuration. validationQuery=SELECT 1 testOnBorrow=true That should work. However, after searching many forum says that you should add below parameters too. Please advise on it. testOnReturn= testWhileIdle= minEvictableIdleTimeMillis timeBetweenEvictionRunsMillis If your firewall is closing the connection, then it's your firewall you'll need to adjust. If you want the connection pool to /tolerate/ the connections being closed, then setting testOnBorrow=true with a suitable validation query should be sufficient. Note that testOnBorrow will test all connections each time they are checked-out of the pool. Depending upon the overhead that causes and the complexity of your database queries, you may observe noticeable slowdowns by testing on every checkout. You can look into other options to test connections only at intervals, which will likely improve performance, but you lose the robustness of testing every connection on check-out. If you set testWhileIdle=true, then the connections will be tested for connectivity even when they are not being used. You will have to set timeBetweenEvictionRuns to something other than the default which is -1 (eviction thread disabled). Depending upon the behavior of your validation query (or validatorClassName for tomcat-pool), checking for connectivity may or may not keep the connection open. If the firewall is closing the connections due to inactivity, then a simple SELECT 1 every so often should keep them open. What's best for you depends upon your environment and requirements. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2aOLAAoJEBzwKT+lPKRYVXgP/imga5bKjVt9/DgbRcBg3RIz BFdxjkPjOsmDR+om1VMyhWkrFxvVQTPs2qUMw8WJia2/YPrcL+EF3OF8Ts5zp3aZ xnrAJgec8h9wF8TU8+scAUTBZ+uivnU49khSdJoIQVEyIqLjdd40GDb4/3TDTkWQ NAviP4hP/YRo9oBNtMBH/NZzuflx0SchhGBObgnM5FjnLyWo1mQ9N/dNwbnHhnn4 uJDFrnd6gQmUvsrmmoDE8EG8Sk0/y3mv7gY9DBIutTv1L0OGG+gL+Jsr3C4Dmukv 8GqxpRdw76Cn+0uehlXMNa34RhLWRMXrGrYjIpyOzVW7X5u36Cmk+rM1LKf798Md oKDHDSPSfUbnv69lR1x6z3XEjA5CVRpndtzNHohPabjrk7PZWdpr64yB6mbdyNAC KC9NsHT2eOK5TaSc1fLuPn/YirQz8lRd812fzaPXj3hyu9hmD9ume/ljUGc3ELlX hg3tbJKsjFFW/FY/ESyYLaaTotgJ13O+l3vmAaBRgsYl1kzJcc8GjTtvIuG0iF99 pvaq9ynUx/j4gsoJJIWSW7kWDjvJkMwWHZqRXQTEH1LOMLEuPhMqqxSkY3MLTTBO ttBYv/fQExcrk8/AoLHTOGYpoqz4mh9gdGyg1IAi71AdhYMy33TDJ40LJ1nz5O7r pYNskycU3exAqhg8PpY/ =0i0Q -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: making all pages to fo index.jsp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Aryeh, On 7/30/14, 4:12 PM, Aryeh Friedman wrote: I want to make it so every page that does not have a actual .jsp file gets sent back index.jsp. I am doing it with error-page but that also sends a 404 I want zero clue they landed on a non-existent page So, any URL that /does not/ end with .jsp needs to be sent to index.jsp? This sounds like you're doing it wrong. If you absolutely have to do it wrong, you could do this: 1. Write a Filter that sets a request attribute like request-okay 2. Map the Filter from #1 to *.jsp 3. Write another Filter that checks for the request-okay attribute and forwards to /index.jsp if it's not there. 4. Map the Filter from #3 to /* Make sure that Filter #1 runs before #3. I'm not sure why you'd bother with all this, though. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2aTRAAoJEBzwKT+lPKRYGnUP/i63RJXs5kMNqTZo2reBJ7Gt ShBTudJK6hAe7Hv7p+AUB4u4QImTsZT4zvVLUFIQ085K8eQ6REaXPw13+xvgdD8Z xlITa51UbvSkkGtzGH6Um/5BNjQEs4MFIzztez53yE5jRuRQ7L/v8AYwELbO6oqK ElNxBk+3cT7uFjLOInl33XqFDDuq5X2UR7X5hwiI5NfDBEvn4L6NCmBZ8yyCh/9Z GrEWAlzqYH+Dg4cvNowwsbjxqWVPnDgqd/+ZVisK9PGkxkopEIZ3vHLZlM56rFt0 9VebJ4xccWRC1s/2zNFjfQPQ3v2Krbv9WWNmgp/nO2NVJvSDrd3u6vFyBXZZ6e5A +0/hmIxRGVxaa5NV613ZdY2qOusUAfSXKbwDxj+f2/GkvnQVKwXR6KhP6m21HdJi QZX0wn8BtijUotUjThXWmlSgQrGFTp9TdggoGb46xalS2pAC3Uc2vcAlMR5myIkc gUiy+o8oRYyi+H3yB59z6Z23ZH1nBRQ5Scz1+cjDCI2ybZsnwIZoU1BakqgYo7aa 2CCszm/magTGiLhhe9WkBKVY1dg/hJDt08QQSoFDX0fxW7GAHr8/1SZDbvw1SHyE RAFnDsMB/AIvCrjIIOvHZD90OTG4vE8RF6YGWpgIbxuriOK9NMw1ggG5CzuwRQG5 tQQ37b1QMGNv/kLIULqJ =6jFH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to use Jasper class?
Thanks guys. I copied all jars from tomcat 7.0.55 binary, libs bin/*.jar to 'lib' folder, then I start winstone like this: % java -jar winstone-0.9.10.jar --useJasper --commonLibFolder=lib/ --webroot=webroot/ When I access any JSP file (that works in tomcat), I got an exception, perhaps I'm missing taglib jars? java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader; at org.apache.jasper.compiler.TagPluginManager.init(TagPluginManager.java:73) at org.apache.jasper.compiler.TagPluginManager.apply(TagPluginManager.java:57) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:240) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:249) at winstone.RequestDispatcher.forward(RequestDispatcher.java:335) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.lang.Thread.run(Thread.java:744) javax.servlet.ServletException: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader; at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:249) at winstone.RequestDispatcher.forward(RequestDispatcher.java:335) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.lang.Thread.run(Thread.java:744) On Thu, Jul 31, 2014 at 12:05 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Daniel, On 7/30/14, 8:16 AM, Daniel Mikusa wrote: On Wed, Jul 30, 2014 at 3:43 AM, Aaron Lewis the.warl0ck.1...@gmail.com wrote: Hi, I'm trying to build a minimal JSP container, just like winstone http://winstone.sourceforge.net/#commandLine But with tc 7.0.55 it doesn't seem to work, so I had to find my own ways around the Jasper class: Error initializing web application: prefix [] java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory Not sure that I follow what you're trying to do here, but it seems like you're missing the JAR file for JULI, the logging library used by Tomcat. Maybe if you add that to your class path it'll help? It's in the bin directory of a normal Tomcat install (tomcat-juli.jar). +1 Interesting that Jasper uses JULI directly instead of commons-logging. I think that should probably change, since Jasper is something of some usefulness outside of Tomcat, and JULI is really a Tomcat internal thing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2RfPAAoJEBzwKT+lPKRY6IIQAL2kayaRosDE71R0N8n9UTW2 p4Ht+/4ZF2YQEEaqfgoHPYvDNUhv1x1+ydr2QENjIui6ed/5phLtos4+Q5CmzU4I OCncnMgwiY/jQJ3lzO+C3yOputnYPzphmezKwMhu4nZD1MZ1JtCOv2k4cMChcNGg JacK9KXMjnoG+iareBEUVjLAG39mn20n26ZR/CU2m1I+TV34Ds2okhmK1xPMWst4 r1sSoxaQXBx4qmo83tGm/L+IF0k68BHvDWMln1N4Z5fD6UXe4LrU0vq+K77NpOwS MpauJOI3kYysDpHTlZ+i33gcEfi3Oev7WTtfMxdQtgNjn5GLEWE21aNg3rSjMvr9 dMKNvs79zk1O4CiT43g7hDRt4g90SO9R1xfwkKLyA789xCSibzVIeCQFpyohOxA1 KGMrloEF9KIRR/IgnBOD1k1DrBnLqgo5ihawzJut1HXpqvhn+UnfLCjBF/3BP/Iw 6bF6jFJxv4P4+eyZRaMLlLGzCh5kkTqWeLZyYwdjNc/KexWOwlD+3cl9Np8Smm9L rNSt52n+o0NVCkSZ4/ceTr/cYBY8DarTl+mWO2OXgWMiev4HJgdO8qDdpqHYSfTm 8FVFnSdI0wckMZ75E1oQCeVDgYhIfwbXz+1GjXF3R89sAci/4p4IAbY6e4KDobeY MeU6mx7xl3DzbmgnAQTV =tjm4 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards, Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Shutdown
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arseny, On 7/30/14, 4:13 PM, Arseny wrote: 30.07.2014 16:19, Ron Holckener пишет: This behavior exists using the regular shutdown.sh script? Is the timeout (10s) configurable? Thanks, Ron Holckener ./$CATALINA_HOME/bin/catalina.sh stop 30 (30 sec. wait) Don't remember same option inside shutdown.sh, but anyway - it call catalina.sh with stop option. catalina.sh stop 30 will only wait 30 seconds to check to see if the process stopped: it will not force a shutdown. Under default setup, Tomcat will only perform a graceful shutdown. That is, no explicit process termination will occur. A SHUTDOWN command is sent to the server which will pause the connectors (so they will not accept new connections) but any in-progress connections will complete, the thread pool(s) will drain, etc. If you use: $ CATALINA_PID=/tmp/tomcat.pid bin/catalina.sh stop 30 -force ... then catalina.sh will wait 30 seconds and then try to kill the JVM using kill -9 once per second for 5 seconds until the process is dead or the 5 tries don't work. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2bWsAAoJEBzwKT+lPKRYDiUQAL6MbPwQAsvKATU5Xquhy40k DHc3KKPG5Ro/i4cNJkT7MkyPzfJTeKCyfJpqk2YyNv2xcdY6RLHcVFEixBrtE1oK KEzZFZbQy1kMGcn1QJhzRW5nuWJYRk/XPI+YZ87BMnNl9MBmHRdyQxL2fEEtrXf5 srsPR3FY1OWtz59ZrQ49A2v4vnnx49p3+UmRhO6WxvYlD08W24PbE/MNwG75fdg8 TDQFRD+4UZ6seILGX+7/oVXDMw6SbyrRKo/8qfKWBZG7j9NkYzirvYE7pH9szI16 7nMi4to5YN3JLLTFCDgwPsxgbct0577UUzRAfMqbFwOdhY5F2drphVwoPqSZvPUw 7qwDi+u4AkQhXoxcWGsSGi+bKHxOHayZBLH+M7UDtc6cPFCYDCL11umyFnEuJFj7 vqMODzn+Y70pVHCTiXtkOyoLjEFbrQk/h+GPDAlsDUYDoQ8woDCY2aNZn5yrQ+Hr uyoeHQCYKamok6tEPScNUzLuVHdiS9PSdDA+NFsYkq0Vw3GmHV/a2SGSye+Esilj 8uhlxeIuN6OpFqtZ2qZADdETSGwXWOrK0o+bLMGm+7yQK5aVTlPxm0gxCMT3kOyH Uopy0vvZL0GmWznjVJLvmcb0DUqwmV0U0ZWk7vKL9SqF2BXC0ESnUsI2gZhos26r qzQcHnG8QuIroFsfRPQQ =MpLt -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Shutdown
will -force work even if the JVM has a running non-daemon thread? thanks, Igal On 7/30/2014 8:19 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arseny, On 7/30/14, 4:13 PM, Arseny wrote: 30.07.2014 16:19, Ron Holckener пишет: This behavior exists using the regular shutdown.sh script? Is the timeout (10s) configurable? Thanks, Ron Holckener ./$CATALINA_HOME/bin/catalina.sh stop 30 (30 sec. wait) Don't remember same option inside shutdown.sh, but anyway - it call catalina.sh with stop option. catalina.sh stop 30 will only wait 30 seconds to check to see if the process stopped: it will not force a shutdown. Under default setup, Tomcat will only perform a graceful shutdown. That is, no explicit process termination will occur. A SHUTDOWN command is sent to the server which will pause the connectors (so they will not accept new connections) but any in-progress connections will complete, the thread pool(s) will drain, etc. If you use: $ CATALINA_PID=/tmp/tomcat.pid bin/catalina.sh stop 30 -force ... then catalina.sh will wait 30 seconds and then try to kill the JVM using kill -9 once per second for 5 seconds until the process is dead or the 5 tries don't work. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2bWsAAoJEBzwKT+lPKRYDiUQAL6MbPwQAsvKATU5Xquhy40k DHc3KKPG5Ro/i4cNJkT7MkyPzfJTeKCyfJpqk2YyNv2xcdY6RLHcVFEixBrtE1oK KEzZFZbQy1kMGcn1QJhzRW5nuWJYRk/XPI+YZ87BMnNl9MBmHRdyQxL2fEEtrXf5 srsPR3FY1OWtz59ZrQ49A2v4vnnx49p3+UmRhO6WxvYlD08W24PbE/MNwG75fdg8 TDQFRD+4UZ6seILGX+7/oVXDMw6SbyrRKo/8qfKWBZG7j9NkYzirvYE7pH9szI16 7nMi4to5YN3JLLTFCDgwPsxgbct0577UUzRAfMqbFwOdhY5F2drphVwoPqSZvPUw 7qwDi+u4AkQhXoxcWGsSGi+bKHxOHayZBLH+M7UDtc6cPFCYDCL11umyFnEuJFj7 vqMODzn+Y70pVHCTiXtkOyoLjEFbrQk/h+GPDAlsDUYDoQ8woDCY2aNZn5yrQ+Hr uyoeHQCYKamok6tEPScNUzLuVHdiS9PSdDA+NFsYkq0Vw3GmHV/a2SGSye+Esilj 8uhlxeIuN6OpFqtZ2qZADdETSGwXWOrK0o+bLMGm+7yQK5aVTlPxm0gxCMT3kOyH Uopy0vvZL0GmWznjVJLvmcb0DUqwmV0U0ZWk7vKL9SqF2BXC0ESnUsI2gZhos26r qzQcHnG8QuIroFsfRPQQ =MpLt -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Igal Sapir Railo Core Developer http://getRailo.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Shutdown
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Igal, On 7/30/14, 11:22 PM, Igal @ getRailo.org wrote: will -force work even if the JVM has a running non-daemon thread? In my experience, kill -9 is fairly effective. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2cKfAAoJEBzwKT+lPKRYST0QAIbtlFMaK9LdhvjiwojosssW vDzdgdGr8s2IMIHHEVF8YdhT4Bi5/2M5MNKSDwsm8sYprnk0Wq8Dqg41dHpBZkwh K7Mn6/OxBfNzZNuFCwCm662c5PYb525f9cQRkN+1tB5MMubjMzgpg5wMQkOBt1pS k5JL4ztfoK4XSysCZzkUSAqoadOe7rDTQ2xes845ZgoRE3VnUKJv8tIvp3/xxI37 hJM8bb7Sx2Y169sWv5cd1W/V7entsnzVE92tWxlRw2Xsd/kevLYPUiyv9sN37bNo eG+omMVgphh/8A27nJgDJpZu8pkr19XyBphj9Qt0ueAIbjnSBu/1L6E9dxPJM4sC pVJqLpU4q9Qm1kc1+3+q4frBJ9I2TnjFgyYhrmHE2Ghy9njwtZ9VoHHFJRzUZRSO WT+sLrwPKaJFd4CGiOJSQvCoShEEHM2XQigGOISFyU4T+hHTpViDP4uLmWrB4Jaj P+9ObhmeKWN4H7qOUe21h04SMDwzFmyWXt3NutxboblHLgamGHNK93qMdUokGoWM REy2XgiZaW1J0IPvhA3I0mhgc1ihfj/8fMVLcEa4KwUvDzR8YbOdBUJEyDnPD2AZ nvFHfxzFRzpI/sMANCukVyLc0WWoA/lmXRW+RqxhMSyWn3z2kKyIedJE7jp7EXla aqf09vPdu1zjUONX5s/Z =cXPJ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Shutdown
31.07.2014 6:19, Christopher Schultz пишет: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arseny, On 7/30/14, 4:13 PM, Arseny wrote: 30.07.2014 16:19, Ron Holckener пишет: This behavior exists using the regular shutdown.sh script? Is the timeout (10s) configurable? Thanks, Ron Holckener ./$CATALINA_HOME/bin/catalina.sh stop 30 (30 sec. wait) Don't remember same option inside shutdown.sh, but anyway - it call catalina.sh with stop option. catalina.sh stop 30 will only wait 30 seconds to check to see if the process stopped: it will not force a shutdown. Hi, Chris. As question was Is the timeout (10s) configurable - so I just give tip about it. In my experience, kill -9 is fairly effective. But -force use same: if [ $FORCE -eq 1 ]; then if [ -z $CATALINA_PID ]; then echo Kill failed: \$CATALINA_PID not set else if [ -f $CATALINA_PID ]; then PID=`cat $CATALINA_PID` echo Killing Tomcat with the PID: $PID kill -9 $PID - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Graceful Shutdown
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arseny, On 7/31/14, 12:29 AM, Arseny wrote: 31.07.2014 6:19, Christopher Schultz пишет: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arseny, On 7/30/14, 4:13 PM, Arseny wrote: 30.07.2014 16:19, Ron Holckener пишет: This behavior exists using the regular shutdown.sh script? Is the timeout (10s) configurable? Thanks, Ron Holckener ./$CATALINA_HOME/bin/catalina.sh stop 30 (30 sec. wait) Don't remember same option inside shutdown.sh, but anyway - it call catalina.sh with stop option. catalina.sh stop 30 will only wait 30 seconds to check to see if the process stopped: it will not force a shutdown. Hi, Chris. As question was Is the timeout (10s) configurable - so I just give tip about it. In my experience, kill -9 is fairly effective. But -force use same: if [ $FORCE -eq 1 ]; then if [ -z $CATALINA_PID ]; then echo Kill failed: \$CATALINA_PID not set else if [ -f $CATALINA_PID ]; then PID=`cat $CATALINA_PID` echo Killing Tomcat with the PID: $PID kill -9 $PID The question was precisely about -force killing non-daemon threads. My experience with kill -9 is that it is fairly effective. Therefore, using -force is highly likely to kill non-daemon threads. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT2cybAAoJEBzwKT+lPKRYrRgP+waP0o6LeeE+oZmimw7piVws WhRnffWi+6qvEpQ6xs6KnYVq2OpwpcRQM6z6hUIAwlSOO2m+zlgHoUEpYYyFM2Re A6dc4tLGZEmmhLNZ20lzIus3k22Bybcca4rDzpwbvVxHM49wCWNPQRCwRKmS+G95 jf8VWqpMW2auhkTVscocCOFnNiAShNBRP5tnNHFEJBpUp5y67FYIAGwMb1C7tX9h htejy/x2bvlKa1W35x57LSSnXahOTjuSS/7USZ1D5xN38JeC3iFM4RwC9/DVESuz NryF9f9zsYSlO+cglpqTMTOB5dZCLL5/lQY/laYR5lfWJmxLCLtbc9iXMjRXdmzx Q8InE3K4pxztv9Yz5dDhLWSpeGCGdRc/ySZi5aNeKhAmyIwxWqquxmQFM5ZDpw2L YlUkk1q+C/dOmDv2mScLp2WnqOEV89GXl0flnEHM1y4LmCOAKsdxIhspXCyKEiqZ 3BeLfPAVSnxfmkmpjmjHYJlCZYrYJwzgZBcsoltRYO5wPdFVAjb2bSLMzYDBVOmF 4vGzCvgdgoH5pfuO2sGhZ05XCbjCvfDQvmm9MVlYln9gJa+uCNs8YQk9h01O3ukI x2Aq/ZhMe3r1GrW9Bx7W7a+AHfVz/1rwQ/eR1Yk/33s+PwnEqTPiyXPApxcdtcx2 LXEGpq8aVhcoCi5IhqlE =eO+A -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org