SSL problem
Using Tomcat 6.0.14 on an amazon EC2 server instance, trying to get SSL working. 1) succeeded when following Tomcat doc for installing a self-signed certificate so I know server works and can do SSL 2) tomcat gives errors on startup using a .keystore made with java keytool by adding cert chain from go-daddy. Here's server.xml connector being used: I proved that it is finding the tomcat.keystore by renaming and getting a not-found error. Running keytool -list on it reveals 3 entries: Keystore type: JKS Keystore provider: SUN Your keystore contains 3 entries intermediate, Jul 8, 2010, trustedCertEntry, Certificate fingerprint (MD5): D5:DF:85:B7:9A:52:87:D1:8C:D5:0F:90:23:2D:B5:34 tomcat, Jul 8, 2010, trustedCertEntry, Certificate fingerprint (MD5): 73:B5:1A:91:E5:F5:56:A1:10:8A:95:E1:A5:7A:0D:AF cross, Jul 8, 2010, trustedCertEntry, Certificate fingerprint (MD5): 82:BD:9A:0B:82:6A:0E:3E:91:AD:3E:27:04:2B:3F:45 After startup.sh, my catalina.out says: javax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled. Anything obvious I'm missing?? Allen Razdow founder & president True Engineering Technology, LLC One Broadway, Cambridge, MA 02142 USA T: +1.617.674.2460 x101 E-mail: araz...@truenum.com
RE: Webapp reloading issue and intermittent 404 errors
> From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] > Subject: Re: Webapp reloading issue and intermittent 404 errors > > Oh. It matches this case. All three seem to. > The issue names mention "SSE 4.2", so it supposedly happens only on > certain families of Intel CPUs. Right - just Nehalem chips (i7). The OP didn't say what the hardware was; even if it's not an i7, the fixes might address the problem, since Sun often doesn't give complete descriptions of fixes. - 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: Webapp reloading issue and intermittent 404 errors
2010/7/8 Caldarale, Charles R : >> From: Caldarale, Charles R >> Subject: RE: Webapp reloading issue and intermittent 404 errors >> >> Given the test on lines 129-130, it is impossible to have a -1 at line >> 131 - unless there's a JVM bug. > > 6u21 was just released tonight, so you might give that a shot and see if the > problem has been addressed. > > Included in 6u21 are fixes for the problems described here: > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6875866 > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6935535 > > Both seem to have a lot in common with the issue under discussion. > > There's another String-related fix in the bug list, but the details are not > retrievable at the moment: > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6948602 > Oh. It matches this case. The issue names mention "SSE 4.2", so it supposedly happens only on certain families of Intel CPUs. http://en.wikipedia.org/wiki/SSE4 Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Webapp reloading issue and intermittent 404 errors
> From: Caldarale, Charles R > Subject: RE: Webapp reloading issue and intermittent 404 errors > > Given the test on lines 129-130, it is impossible to have a -1 at line > 131 - unless there's a JVM bug. 6u21 was just released tonight, so you might give that a shot and see if the problem has been addressed. Included in 6u21 are fixes for the problems described here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6875866 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6935535 Both seem to have a lot in common with the issue under discussion. There's another String-related fix in the bug list, but the details are not retrievable at the moment: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6948602 - 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: How to call an external class from a webapp (i.e. - implement a plugin)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 7/7/2010 3:48 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: How to call an external class from a webapp (i.e. - >> implement a plugin) >> >> Another option is to implement your own ClassLoader that scans a >> directory (such as /my/great/plugins) for JAR files and will load >> them alongside your webapp's classes. > > Tomcat already has a form of this capability: > org.apache.catalina.loader.VirtualWebappLoader > > If you declare this in the className attribute of a element > nested inside the of interest, you can specify additional > directories to search for class references. It exists in all > supported Tomcat levels, but is only documented in Tomcat 7: > > http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html#VirtualWebappLoader_Implementation Good to know. I didn't know it was available before TC 7.0 or without compiling it yourself... I did know that it existed, at least somewhere. I would tend to favor a ClassLoader that was explicitly used for only plug-in class loading. I thought you could set a SecurityManager on a ClassLoader, but my mind must be remembering something else, 'cause it certainly not in the documentation. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw04rEACgkQ9CaO5/Lv0PA39QCfVO+whzxqUmTyhJ0/z8dU8IEw 0/UAn3G3FA4sNIkX7m7Jd+A39ZB97+Qa =aS5e -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 call an external class from a webapp (i.e. - implement a plugin)
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: How to call an external class from a webapp (i.e. - > implement a plugin) > > Another option is to implement your own ClassLoader that > scans a directory (such as /my/great/plugins) for JAR files > and will load them alongside your webapp's classes. Tomcat already has a form of this capability: org.apache.catalina.loader.VirtualWebappLoader If you declare this in the className attribute of a element nested inside the of interest, you can specify additional directories to search for class references. It exists in all supported Tomcat levels, but is only documented in Tomcat 7: http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html#VirtualWebappLoader_Implementation - 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.
Re: favicon when serving non-html
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dola, On 7/6/2010 2:34 PM, Dola Woolfe wrote: > Thanks for the responses. > > When I serve up a pdf file with the code below, it shows it in an embedded > acrobat, as desired. However, the icon in the browser (in the tab) is the > Tomcat logo. > > I'd like to change it to something else. You will only be able to change the favicon for the entire site. You can specify a favicon on a page-by-page basis, but only if it is an HTML or XHTML file. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw01+MACgkQ9CaO5/Lv0PAqRQCfY1u9t6WdBOQDCPfPwaItqq4v 9KUAoLo7tKvToFSyy5UsxJMyPHLLM4/i =oysl -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 call an external class from a webapp (i.e. - implement a plugin)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Goren, On 7/6/2010 10:51 AM, Goren Il wrote: > There are 2 issues (not in order of priority): > 1. The steps are not straight forward, and may cause the system to stop > working (the customer should change the WAR suffix to "zip", open it, > add the files and rename it back) There isn't really a reason why the above shouldn't work. > 2. When we provide a new version, we will replace the WAR and all the > changes are gone. Fair enough, but the customer can re-install their plug-ins. Another option is to implement your own ClassLoader that scans a directory (such as /my/great/plugins) for JAR files and will load them alongside your webapp's classes. You'll either have to chain that ClassLoader into the standard webapp ClassLoader provided by Tomcat for transparent class-loading by your webapp, or write a wrapper for plug-in loading and execution by explicitly managing and invoking that ClassLoader as necessary. You should seriously consider how to implement security mechanisms when loading classes that you do not provide yourself. > I would like my webapp to call an external class, which will be > provided (as a name) in an XML file at run time. How does your webapp load this XML file if it isn't packaged in the WAR file? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw011gACgkQ9CaO5/Lv0PAO9QCfRRfexlNsGjxh5pg2pHKlzbWC XVEAoKaBL2jk5i10EIY2DDQt6wcP4vc/ =VS3H -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat /manager not working
On 07/07/2010 17:21, André Warnier wrote: > As far as I know, I am not making any changes to the logic of the > manager application by doing this. All I am doing is making the > HTMLManager servlet be the default servlet. > So when a user requests any URL starting with "/manager" and not > specifically matching any of the specific other manager servlets, they > will get the HTML manager's starting page. > Is that bad ? Ahh. Light finally dawns. You added the mapping rather than replaced the existing one. My bad. Sorry. That is going to break all the static resources. So that looks like: - images - xml format for the status output Not complete breakage as I originally thought but enough that we wouldn't want to do it. Konstantin's idea of an index.jsp that redirects looks like the best solution and I can't see any reason not to back-port it either. Enough folks don't appear to read the docs and seem to expect something on /manager that would make this worth doing. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Very slow HttpServletRequest.getLocalName()
On 07/07/2010 17:36, André Warnier wrote: > Pid wrote: >> On 07/07/2010 15:08, mmg wrote: >>> Hello, >>> >>> I've recently deployed an application on our Linux staging server; a >>> Tomcat >>> 5.5.28 server on Java 1.5.0_09-b01. At some point, the application >>> makes a >>> call to request.getLocalName(). For some reason, this call takes a >>> very long >>> time (about 20 seconds!). I profiled the application, and I see that >>> tomcat >>> calls InetAddress.getHostName() in turn. This performs a reverse DNS >>> lookup. >>> It's this reverse DNS lookup that takes so long (since our host >>> doesn't have >>> a DNS address the resolve fails). >>> >>> Is there a way to disable this reverse DNS lookup in Tomcat or is there >>> anything else I can do to speed this up? >> >> It's nothing to do with Tomcat. >> >> There are JVM settings which apply to networking & DNS lookups. You >> might be affected by these, depending on your system configuration. >> >> http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html >> >> > That is an interesting page per se, but I don't see anything there that > seems related to the inverse DNS lookup which the application seems to > be triggering. Maybe it's trying a dud ip6 connection first. p > To complete my earlier suggestion of adding a corresponding line to > /etc/hosts, like > > 1.2.3.4 somename.localdomain > > (replacing the first part by the real IP address of the host) > > which will work if the system's resolver is configured (in > /etc/nsswitch.conf) to look at that file first. > But if it does not, there are more things you can do at the system level : > > 1) change nsswitch.conf to indeed do "files" first > OR > 2) make the above change to /etc/hosts AND > run a local dnsmasq daemon (with the configuration options to have it > read /etc/hosts) and set /etc/resolv.conf to have this line first > nameserver 127.0.0.1 > > This last is a gain anyway in terms of efficiency, because dnsmasq will > cache the resolved entries and avoid further lookups into /etc/hosts > (and other DNS lookups, such as if the application is also doing client > address lookups e.g.). > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
Re: Very slow HttpServletRequest.getLocalName()
Pid wrote: On 07/07/2010 15:08, mmg wrote: Hello, I've recently deployed an application on our Linux staging server; a Tomcat 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes a call to request.getLocalName(). For some reason, this call takes a very long time (about 20 seconds!). I profiled the application, and I see that tomcat calls InetAddress.getHostName() in turn. This performs a reverse DNS lookup. It's this reverse DNS lookup that takes so long (since our host doesn't have a DNS address the resolve fails). Is there a way to disable this reverse DNS lookup in Tomcat or is there anything else I can do to speed this up? It's nothing to do with Tomcat. There are JVM settings which apply to networking & DNS lookups. You might be affected by these, depending on your system configuration. http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html That is an interesting page per se, but I don't see anything there that seems related to the inverse DNS lookup which the application seems to be triggering. To complete my earlier suggestion of adding a corresponding line to /etc/hosts, like 1.2.3.4 somename.localdomain (replacing the first part by the real IP address of the host) which will work if the system's resolver is configured (in /etc/nsswitch.conf) to look at that file first. But if it does not, there are more things you can do at the system level : 1) change nsswitch.conf to indeed do "files" first OR 2) make the above change to /etc/hosts AND run a local dnsmasq daemon (with the configuration options to have it read /etc/hosts) and set /etc/resolv.conf to have this line first nameserver 127.0.0.1 This last is a gain anyway in terms of efficiency, because dnsmasq will cache the resolved entries and avoid further lookups into /etc/hosts (and other DNS lookups, such as if the application is also doing client address lookups e.g.). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat /manager not working
Konstantin Kolinko wrote: 2010/7/7 André Warnier : I have made the change in the Manager's web.xml, restarted Tomcat, and so far all the manager functions and links seem to be working fine. Namely, I have added this mapping at the end of the existing servlet-mappings of the manager webapp's web.xml : existing : ... HTMLManager /html/* added: HTMLManager /* In my understanding of the URL-mapping rules, - the "/manager" part determines which URLs get mapped to the Manager application - then, after this "/manager" is stripped, for the remainder, the longest matching mapping "wins". So the "/*" mapping above should win only if none of the others does, no ? Am I missing something ? 1) The HTMLManager servlet uses the part of URI after "/html" (aka request.getPathInfo()) as the command to be executed. Having it mapped to two different addresses creates an ambiguity, and well as may bypass security constraints specified in its web.xml 2) I think that adding /index.jsp that will respond to the client with a 301 redirect to contextPath + "/html" will work, but I am not sure that this feature is actually needed. I have now tested the above change also with this version : C:\apache-tomcat-6.0.24\bin>version Using CATALINA_BASE: C:\apache-tomcat-6.0.24 Using CATALINA_HOME: C:\apache-tomcat-6.0.24 Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.24\temp Using JRE_HOME:C:\Java6jdk Using CLASSPATH: C:\apache-tomcat-6.0.24\bin\bootstrap.jar Server version: Apache Tomcat/6.0.24 Server built: January 19 2010 1439 Server number: 6.0.0.0 OS Name:Windows XP OS Version: 5.1 Architecture: x86 JVM Version:1.6.0_06-b02 JVM Vendor: Sun Microsystems Inc. C:\apache-tomcat-6.0.24\bin> and I also see no doomsday effects. My earlier notes about how it behaves with a selection of URLs under Tomcat 5.5 seem also valid for this version 6.0 above. (Granted, apart from the /manager/images path. That one is broken. But that should easily be fixable, no ?). About remark 1) above : - as per my understanding, that should still work after the change. Any URL path beginning with "/manager/html" will still be mapped the same way, and getPathInfo() will still return the same answer, no ? - on the face of it, I see nothing in the manager's web.xml of the Windows distribution of Tomcat 5.5 or 6.0, that would create a security issue with this. The whole webapp is under the same security constraints, so even just "/manager" will ask for authentication. As far as I know, I am not making any changes to the logic of the manager application by doing this. All I am doing is making the HTMLManager servlet be the default servlet. So when a user requests any URL starting with "/manager" and not specifically matching any of the specific other manager servlets, they will get the HTML manager's starting page. Is that bad ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Very slow HttpServletRequest.getLocalName()
On 07.07.2010 18:03, mmg wrote: Hi Rainer, Thanks for that suggestion, but it's not my code that's calling the method: it's the icefaces framework so it's out of my control. If you don't find a good other solution, you can write a simple filter, that registers a ServletRequestWrapper, so all calls to getLocalName() go through your wrapper which can then do something more suited to your needs instead of simply calling super.getLocalName(). To add the filter you have to add the new classes to the webapp and add the filter configuration to web.xml of the webapp, but you don't have to change any existing code or similar of the webapp. Regards, Rainer Rainer Jung-3 wrote: On 07.07.2010 16:08, mmg wrote: Hello, I've recently deployed an application on our Linux staging server; a Tomcat 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes a call to request.getLocalName(). For some reason, this call takes a very long time (about 20 seconds!). I profiled the application, and I see that tomcat calls InetAddress.getHostName() in turn. This performs a reverse DNS lookup. It's this reverse DNS lookup that takes so long (since our host doesn't have a DNS address the resolve fails). Is there a way to disable this reverse DNS lookup in Tomcat or is there anything else I can do to speed this up? You might want to try getLocalAddr (if IP is enough) or getServerName() (if a host header is set by the client and that header is fine). Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- kippdata informationstechnologie GmbH Tel: 0228 98549 -0 Bornheimer Str. 33aFax: 0228 98549 -50 53111 Bonn www.kippdata.de HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417 Geschäftsführer: Dr. Thomas Höfer, Rainer Jung, Sven Maurmann === kippdata informationstechnologie GmbH Tel: +49 228 98549 -0 Bornheimer Str. 33aFax: +49 228 98549 -50 D-53111 Bonn www.kippdata.de HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417 Geschäftsführer: Dr. Thomas Höfer, Rainer Jung, Sven Maurmann - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Very slow HttpServletRequest.getLocalName()
Hi Rainer, Thanks for that suggestion, but it's not my code that's calling the method: it's the icefaces framework so it's out of my control. Mathias Rainer Jung-3 wrote: > > On 07.07.2010 16:08, mmg wrote: >> >> Hello, >> >> I've recently deployed an application on our Linux staging server; a >> Tomcat >> 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes >> a >> call to request.getLocalName(). For some reason, this call takes a very >> long >> time (about 20 seconds!). I profiled the application, and I see that >> tomcat >> calls InetAddress.getHostName() in turn. This performs a reverse DNS >> lookup. >> It's this reverse DNS lookup that takes so long (since our host doesn't >> have >> a DNS address the resolve fails). >> >> Is there a way to disable this reverse DNS lookup in Tomcat or is there >> anything else I can do to speed this up? > > You might want to try getLocalAddr (if IP is enough) or getServerName() > (if a host header is set by the client and that header is fine). > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Very-slow-HttpServletRequest.getLocalName%28%29-tp29096652p29098130.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Very slow HttpServletRequest.getLocalName()
On 07.07.2010 16:08, mmg wrote: Hello, I've recently deployed an application on our Linux staging server; a Tomcat 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes a call to request.getLocalName(). For some reason, this call takes a very long time (about 20 seconds!). I profiled the application, and I see that tomcat calls InetAddress.getHostName() in turn. This performs a reverse DNS lookup. It's this reverse DNS lookup that takes so long (since our host doesn't have a DNS address the resolve fails). Is there a way to disable this reverse DNS lookup in Tomcat or is there anything else I can do to speed this up? You might want to try getLocalAddr (if IP is enough) or getServerName() (if a host header is set by the client and that header is fine). Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Very slow HttpServletRequest.getLocalName()
On 07/07/2010 15:08, mmg wrote: > > Hello, > > I've recently deployed an application on our Linux staging server; a Tomcat > 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes a > call to request.getLocalName(). For some reason, this call takes a very long > time (about 20 seconds!). I profiled the application, and I see that tomcat > calls InetAddress.getHostName() in turn. This performs a reverse DNS lookup. > It's this reverse DNS lookup that takes so long (since our host doesn't have > a DNS address the resolve fails). > > Is there a way to disable this reverse DNS lookup in Tomcat or is there > anything else I can do to speed this up? It's nothing to do with Tomcat. There are JVM settings which apply to networking & DNS lookups. You might be affected by these, depending on your system configuration. http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html p signature.asc Description: OpenPGP digital signature
Re: tomcat /manager not working
2010/7/7 André Warnier : > I have made the change in the Manager's web.xml, restarted Tomcat, and so > far all the manager functions and links seem to be working fine. > Namely, I have added this mapping at the end of the existing > servlet-mappings of the manager webapp's web.xml : > > existing : > ... > > HTMLManager > /html/* > > > added: > > HTMLManager > /* > > > In my understanding of the URL-mapping rules, > - the "/manager" part determines which URLs get mapped to the Manager > application > - then, after this "/manager" is stripped, for the remainder, the longest > matching mapping "wins". > So the "/*" mapping above should win only if none of the others does, no ? > > Am I missing something ? > 1) The HTMLManager servlet uses the part of URI after "/html" (aka request.getPathInfo()) as the command to be executed. Having it mapped to two different addresses creates an ambiguity, and well as may bypass security constraints specified in its web.xml 2) I think that adding /index.jsp that will respond to the client with a 301 redirect to contextPath + "/html" will work, but I am not sure that this feature is actually needed. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to implement a webapp class loader
On 07/07/2010 16:05, Goren Il wrote: > > I would like to implement my on webapp class loader, that will look for > jars in specific places (to be defined in the configuration). > I would like to inherit the behavior of the default class loader of the > webapp, so I can not start use a regular ClassLoader. > I considered inheriting from WebappClassLoader. > Is there a simpler way? > Is there some documentation how to create such a class loader? Please post a new message, don't just reply to an existing message & edit the subject line or body <- this is called thread hijacking. p > Thanks > G. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
How to implement a webapp class loader
I would like to implement my on webapp class loader, that will look for jars in specific places (to be defined in the configuration). I would like to inherit the behavior of the default class loader of the webapp, so I can not start use a regular ClassLoader. I considered inheriting from WebappClassLoader. Is there a simpler way? Is there some documentation how to create such a class loader? Thanks G. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple Tomcat Instance Issues
Rob Gosling wrote: Hi Chuck, Thanks for that note about /manager/html - that is one thing I had missed - that does work - just using manager (as I was doing) didn't work (resource not available). ..which illustrates the point I was making in another thread, about /manager/html not being the most intuitive URL. ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat /manager not working
Mark Thomas wrote: On 07/07/2010 15:35, Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: tomcat /manager not working I am not going to play with /undeploy just to further verify my theory, but does that look like I broke something ? No, it looks like it's working. Things must have changed since the last time I tried playing with the mappings (several years ago). Were you testing with 7.0.x? So far (with 6.0.x from svn): /manager - Images broken - Clicking on list returns unknown command - Ditto start/stop etc - Status is ok (as expected) With 7.0.x you will have more success because we have changed the mappings. With 6.0.x the HTML interface will be totally broken. I suspect the same with 5.5.x With this : C:\Tomcat5.5\bin>version.bat Using CATALINA_BASE: C:\Tomcat5.5 Using CATALINA_HOME: C:\Tomcat5.5 Using CATALINA_TMPDIR: C:\Tomcat5.5\temp Using JRE_HOME:C:\Java6jdk Using CLASSPATH: C:\Tomcat5.5\bin\bootstrap.jar Server version: Apache Tomcat/5.5.26 Server built: Jan 28 2008 01:35:23 Server number: 5.5.26.0 OS Name:Windows XP OS Version: 5.1 Architecture: x86 JVM Version:1.6.0_06-b02 JVM Vendor: Sun Microsystems Inc. C:\Tomcat5.5\bin> .. which is the version that the OP was using, more or less. So, what did you break in 6.0 and 7.0 ? :-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Webapp reloading issue and intermittent 404 errors
2010/6/30 Tomislav Petrović : > Pid said on 30.6.2010 13:06: >> >> On 30/06/2010 11:59, Tomislav Petrović wrote: >>> >>> >> reloadable="true" crossContext="true"> >>> >> type="javax.sql.DataSource" /> >>> >> type="javax.sql.DataSource" /> >> >> If these are the actual values then it's a miracle it's working at all. > > Only app name/paths and jdbs names have been changed to dummy values. > >> >> Instead of defining it there, remove the debug, path and docBase >> attributes and put it in >> >> some_webapp/META-INF/context.xml >> >> >> Tomcat will work out the rest automatically. > (...) > > And do you really think this would solve my initial problem, or? > As I mentioned in https://issues.apache.org/bugzilla/show_bug.cgi?id=49488#c2 having double slash in a path is unusual. >>>
Re: Multiple Tomcat Instance Issues
Hi Konstantin, Thanks for that - that resolved the logging immediately. The guides/documentation I had been following did not mention those files, so I assumed they would be resolved to the ones in $CATALINA_HOME, which was not happening. I was led to believe the docbase had to be an absolute path, thus why I changed it. I wasn't sure why I needed to change it either - I have changed it back and tested and it still works. Thanks for your help, Rob From: Konstantin Kolinko To: Tomcat Users List Sent: Wed, July 7, 2010 3:36:15 PM Subject: Re: Multiple Tomcat Instance Issues 2010/7/7 Rob Gosling : > 1) created a new CATALINA_BASE directory with the following structure: > bin > setenv.bat > conf > |- Catalina > ||- localhost > ||-admin.xml > ||-manager.xml > |-server.xml > |-tomcat-users.xml > |-web.xml context.xml catalina.properties logging.properties are missing (catalina.policy is also missing, but is not used as you are running without a security manager) Missing logging.properties means no logging is configured. > logs > temp > webapps > work > > 3) modified admin.xml and manager.xml to point docbase back to the > $CATALINA_HOME webapp location under server/webapps/ \conf\Catalina\localhost\manager.xml contains the following line:
Re: Multiple Tomcat Instance Issues
Hi Chuck, Thanks for that note about /manager/html - that is one thing I had missed - that does work - just using manager (as I was doing) didn't work (resource not available). Yes, there is a logs directory in each $CATALINA_BASE From: "Caldarale, Charles R" To: Tomcat Users List Sent: Wed, July 7, 2010 3:32:52 PM Subject: RE: Multiple Tomcat Instance Issues > From: Rob Gosling [mailto:rob.p...@yahoo.com] > Subject: Multiple Tomcat Instance Issues > > 2) created a bin/setenv.bat setting some JAVA_OPTS and > CATALINA_OPTS as follows: > > set JAVA_OPTS= -XX:MaxPermSize=256M > set CATALINA_OPTS= -Xms512m -Xmx1024m You might want to take out the spaces after the "=" characters. Some platforms do not handle that well. > 1) /admin works fine on each instance, but /manager does not In what way does the manager webapp not work? Note that the URL "/manager" never works; use "/manager/html" if you want to access the GUI version. > 2) why no log files are being output anywhere that I've been able to > determine Did you create a logs directory under each CATALINA_BASE before starting each instance? - 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: tomcat /manager not working
On 07/07/2010 15:35, Caldarale, Charles R wrote: >> From: André Warnier [mailto:a...@ice-sa.com] >> Subject: Re: tomcat /manager not working >> >> I am not going to play with /undeploy just to further verify >> my theory, but does that look like I broke something ? > > No, it looks like it's working. Things must have changed since the last time > I tried playing with the mappings (several years ago). Were you testing with 7.0.x? So far (with 6.0.x from svn): /manager - Images broken - Clicking on list returns unknown command - Ditto start/stop etc - Status is ok (as expected) With 7.0.x you will have more success because we have changed the mappings. With 6.0.x the HTML interface will be totally broken. I suspect the same with 5.5.x Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple Tomcat Instance Issues
2010/7/7 Rob Gosling : > 1) created a new CATALINA_BASE directory with the following structure: > bin > setenv.bat > conf > |- Catalina > | |- localhost > | |-admin.xml > | |-manager.xml > |-server.xml > |-tomcat-users.xml > |-web.xml context.xml catalina.properties logging.properties are missing (catalina.policy is also missing, but is not used as you are running without a security manager) Missing logging.properties means no logging is configured. > logs > temp > webapps > work > > 3) modified admin.xml and manager.xml to point docbase back to the > $CATALINA_HOME webapp location under server/webapps/ \conf\Catalina\localhost\manager.xml contains the following line:
RE: tomcat /manager not working
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: tomcat /manager not working > > I am not going to play with /undeploy just to further verify > my theory, but does that look like I broke something ? No, it looks like it's working. Things must have changed since the last time I tried playing with the mappings (several years ago). - 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: Multiple Tomcat Instance Issues
> From: Rob Gosling [mailto:rob.p...@yahoo.com] > Subject: Multiple Tomcat Instance Issues > > 2) created a bin/setenv.bat setting some JAVA_OPTS and > CATALINA_OPTS as follows: > > set JAVA_OPTS= -XX:MaxPermSize=256M > set CATALINA_OPTS= -Xms512m -Xmx1024m You might want to take out the spaces after the "=" characters. Some platforms do not handle that well. > 1) /admin works fine on each instance, but /manager does not In what way does the manager webapp not work? Note that the URL "/manager" never works; use "/manager/html" if you want to access the GUI version. > 2) why no log files are being output anywhere that I've been able to > determine Did you create a logs directory under each CATALINA_BASE before starting each instance? - 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: Very slow HttpServletRequest.getLocalName()
Thanks for your suggestion. I will ask the system admin to add this entry. The ip address is 69.90.208.57 awarnier wrote: > > mmg wrote: >> Hello, >> >> I've recently deployed an application on our Linux staging server; a >> Tomcat >> 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes >> a >> call to request.getLocalName(). For some reason, this call takes a very >> long >> time (about 20 seconds!). I profiled the application, and I see that >> tomcat >> calls InetAddress.getHostName() in turn. This performs a reverse DNS >> lookup. >> It's this reverse DNS lookup that takes so long (since our host doesn't >> have >> a DNS address the resolve fails). >> >> Is there a way to disable this reverse DNS lookup in Tomcat or is there >> anything else I can do to speed this up? >> > Have you tried putting a specific entry in your local /etc/hosts file, > which will match > what the lookup is looking for ? > (what is the IP address by the way ?) > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/Very-slow-HttpServletRequest.getLocalName%28%29-tp29096652p29096953.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Very slow HttpServletRequest.getLocalName()
mmg wrote: Hello, I've recently deployed an application on our Linux staging server; a Tomcat 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes a call to request.getLocalName(). For some reason, this call takes a very long time (about 20 seconds!). I profiled the application, and I see that tomcat calls InetAddress.getHostName() in turn. This performs a reverse DNS lookup. It's this reverse DNS lookup that takes so long (since our host doesn't have a DNS address the resolve fails). Is there a way to disable this reverse DNS lookup in Tomcat or is there anything else I can do to speed this up? Have you tried putting a specific entry in your local /etc/hosts file, which will match what the lookup is looking for ? (what is the IP address by the way ?) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Very slow HttpServletRequest.getLocalName()
Hello, I've recently deployed an application on our Linux staging server; a Tomcat 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes a call to request.getLocalName(). For some reason, this call takes a very long time (about 20 seconds!). I profiled the application, and I see that tomcat calls InetAddress.getHostName() in turn. This performs a reverse DNS lookup. It's this reverse DNS lookup that takes so long (since our host doesn't have a DNS address the resolve fails). Is there a way to disable this reverse DNS lookup in Tomcat or is there anything else I can do to speed this up? Thanks, Mathias -- View this message in context: http://old.nabble.com/Very-slow-HttpServletRequest.getLocalName%28%29-tp29096652p29096652.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Webapp reloading issue and intermittent 404 errors
> From: Tomislav Petrović [mailto:t.petro...@inet.hr] > Subject: Re: Webapp reloading issue and intermittent 404 errors > > Don't know have to check with customer, but actual index varies in each > occurrence of stack trace, sometimes it is even -1. Here's the code of interest: 127 while (true) { 128 int index = normalized.indexOf("//"); 129 if (index < 0) 130 break; 131 normalized = normalized.substring(0, index) + 132 normalized.substring(index + 1); 133 } Given the test on lines 129-130, it is impossible to have a -1 at line 131 - unless there's a JVM bug. You could try running with a -client option instead of -server (if it's available on your platform), or create a .hotspot_compiler file in the Tomcat current directory containing this line: exclude org.apache.catalina.util.RequestUtil normalize - 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
Multiple Tomcat Instance Issues
Hi, I have more or less successfully setup multiple instances of Tomcat using the same $CATALINA_HOME install, but am encountering a couple of issues I can't seem to resolve after searching for answers. I am running Tomcat 5.5.29 on Windows XP Pro SP3. For each new instance I have performed the following steps: 1) created a new CATALINA_BASE directory with the following structure: bin setenv.bat conf |- Catalina | |- localhost | |-admin.xml | |-manager.xml |-server.xml |-tomcat-users.xml |-web.xml logs temp webapps work 2) created a bin/setenv.bat setting some JAVA_OPTS and CATALINA_OPTS as follows: set JAVA_OPTS= -XX:MaxPermSize=256M set CATALINA_OPTS= -Xms512m -Xmx1024m 3) modified admin.xml and manager.xml to point docbase back to the $CATALINA_HOME webapp location under server/webapps/ 4) created a startup.bat file in each $CATALINA_BASE setting $CATALINA_BASE and calling startup.bat in $CATALINA_HOME/bin Each instance is starting up using the correct directories as shown from the startup extract of one of the starts: Using CATALINA_BASE: C:\tomcat\apache-tomcat-5.5.29-mpm Using CATALINA_HOME: C:\tomcat\apache-tomcat-5.5.29 Using CATALINA_TMPDIR: C:\tomcat\apache-tomcat-5.5.29-mpm\temp Using JRE_HOME: C:\Java\jdk1.6.0_20 Using CLASSPATH: C:\tomcat\apache-tomcat-5.5.29\bin\bootstrap.jar So my questions are as follows: 1) /admin works fine on each instance, but /manager does not and I can't see why not as pathing is correct 2) why no log files are being output anywhere that I've been able to determine - not in $CATALINA_BASE nor in $CATALINA_HOME - so I'm not sure what happened to the Tomcat log files - the Tomcat docs say this will be automatically determined based on $CATALINA_BASE, but I have no log files being output anywhere anymore. Thanks Rob
Re: tomcat /manager not working
Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: tomcat /manager not working So the "/*" mapping above should win only if none of the others does, no ? Am I missing something ? Yup - you've broken the non-HTML usage of the manager, which is what all the scripts use to access the capability. Don't do that. Guys, I must be thick, because I still don't see that. The other "usages" are specifically mapped, like : Manager /roles Manager /resources Status /status/* JMXProxy /jmxproxy/* On my system, after the change I mentioned, if request the URL : http://localhost:8180/manager/resources I get the response : OK - Listed global resources of all types simpleValue:java.lang.Integer UserDatabase:org.apache.catalina.users.MemoryUserDatabase If I request the URL http://localhost:8180/manager/status/x I get a nice status page. If I request the URL : http://localhost:8180/manager/deploy?config=file:C:/tomcat5.5/webapps/jsp-examples/context.xml (which is wrong, but just for the example) I get : FAIL - Invalid context path null was specified etc.. I am not going to play with /undeploy just to further verify my theory, but does that look like I broke something ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listener initialized twice
Thanks, I will give it a shot, although we don't have UI and no JSP files. This application serves as sort of background mail server I can't send you the relevant code, but here is the relevant piece of code *listener class:* public class ComServerConfigListener implements ServletContextListener { public void contextInitialized(ServletContextEvent arg0) { String path = "..." initLog4j(path); initNetworkLayer(path); // eventually calling the getFileList method } } *HandleFiles class* public static File[] getFileList(File dir, final String extension) { if(!dir.isDirectory()) return new File[] { }; return dir.listFiles(new FileFilter() { public boolean accept(File arg0) { return arg0.getName().endsWith(extension); } }); } *web.xml* * http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://java.sun.com/xml/ns/javaee"; xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID" version="2.5"> CommunicationServer com.nextnine.web.ComServerConfigListener cs-root Q:/CommunicationServer index.html index.htm index.jsp default.html default.htm default.jsp * On Wed, Jul 7, 2010 at 3:51 PM, Mark Thomas wrote: > On 07/07/2010 13:22, daniel polonsky wrote: > > The same deployment runs OK on other machines and in development, while > on > > server 2008 i am getting this error. > > java.lang.NoClassDefFoundError is thrown when creating a > java.io.FileFilter > > instance which is part of JDK and we do have a JDK 1.5 installed > > > > On Wed, Jul 7, 2010 at 1:59 PM, Mark Thomas wrote: > > > >> On 07/07/2010 10:44, daniel polonsky wrote: > >>> and here is the localhost log > >>> > >>> Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext > >>> listenerStart > >>> SEVERE: Exception sending context initialized event to listener > instance > >> of > >>> class com.nextnine.web.ComServerConfigListener > >>> java.lang.NoClassDefFoundError: tool/HandleFiles$2 > > I sometimes seen root causes get swallowed in this type of situation > (although usually with a security manager). > > I'd suggest disabling the listener and then placing the failing code in > a JSP (so you can edit the code and re-test easily) and see if you can > track down the real root cause. Also, if you can provide the source for > a JSP that fails (and probably HandleFile.java as well) someone here may > be able to spot the issues. > > Mark > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
RE: tomcat /manager not working
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: tomcat /manager not working > > So the "/*" mapping above should win only if none of the > others does, no ? > > Am I missing something ? Yup - you've broken the non-HTML usage of the manager, which is what all the scripts use to access the capability. Don't do that. - 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: listener initialized twice
> From: daniel polonsky [mailto:danpolon...@gmail.com] > Subject: Re: listener initialized twice > > The same deployment runs OK on other machines and in > development, while on server 2008 i am getting this error. Does WEB-INF/classes/tool/HandleFiles$2.class actually exist on your Win2K8 installation? (It could also be packaged inside a .jar file in WEB-INF/lib.) Does it exist in more than one location? (It must not.) - 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: tomcat /manager not working
Mark Thomas wrote: On 07/07/2010 13:20, André Warnier wrote: Mark Thomas wrote: On 07/07/2010 11:50, André Warnier wrote: I have no idea if this triggers secondary unwanted effects. Oddles of them. It breaks large sections of the manager app. If it does not however, then I would respectively suggest to the Tomcat developers to incorporate this as a standard servlet-mapping for the Manager, since the other one is a bit un-intuitive. RTFM. Specifically http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html Respectfully thus, (re-)reading the above page from top to bottom did not immediately point out to me why it would break oodles of things. I accept you saying so, but could point me to a specific item or give a small example ? The entire HTML manager interface. If you want to understand why, consider the manager app's web.xml with the proposed modification, look at the servlet mappings and using the rules for mapping requests to servlets defined in the servlet spec see if you can find any URLs that will be served by the HTMLManager servlet. (Hint: Most (all?) will be served by the Manager servlet) I must be missing something, but that is not what happens on my local system. I have made the change in the Manager's web.xml, restarted Tomcat, and so far all the manager functions and links seem to be working fine. Namely, I have added this mapping at the end of the existing servlet-mappings of the manager webapp's web.xml : existing : ... HTMLManager /html/* added: HTMLManager /* In my understanding of the URL-mapping rules, - the "/manager" part determines which URLs get mapped to the Manager application - then, after this "/manager" is stripped, for the remainder, the longest matching mapping "wins". So the "/*" mapping above should win only if none of the others does, no ? Am I missing something ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listener initialized twice
On 07/07/2010 13:22, daniel polonsky wrote: > The same deployment runs OK on other machines and in development, while on > server 2008 i am getting this error. > java.lang.NoClassDefFoundError is thrown when creating a java.io.FileFilter > instance which is part of JDK and we do have a JDK 1.5 installed > > On Wed, Jul 7, 2010 at 1:59 PM, Mark Thomas wrote: > >> On 07/07/2010 10:44, daniel polonsky wrote: >>> and here is the localhost log >>> >>> Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext >>> listenerStart >>> SEVERE: Exception sending context initialized event to listener instance >> of >>> class com.nextnine.web.ComServerConfigListener >>> java.lang.NoClassDefFoundError: tool/HandleFiles$2 I sometimes seen root causes get swallowed in this type of situation (although usually with a security manager). I'd suggest disabling the listener and then placing the failing code in a JSP (so you can edit the code and re-test easily) and see if you can track down the real root cause. Also, if you can provide the source for a JSP that fails (and probably HandleFile.java as well) someone here may be able to spot the issues. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat /manager not working
On 07/07/2010 13:20, André Warnier wrote: > Mark Thomas wrote: >> On 07/07/2010 11:50, André Warnier wrote: >>> I have no idea if this triggers secondary unwanted effects. >> >> Oddles of them. It breaks large sections of the manager app. >> >>> If it does not however, then I would respectively suggest to the Tomcat >>> developers to incorporate this as a standard servlet-mapping for the >>> Manager, since the other one is a bit un-intuitive. >> >> RTFM. Specifically >> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html >> > Respectfully thus, (re-)reading the above page from top to bottom did > not immediately point out to me why it would break oodles of things. I > accept you saying so, but could point me to a specific item or give a > small example ? The entire HTML manager interface. If you want to understand why, consider the manager app's web.xml with the proposed modification, look at the servlet mappings and using the rules for mapping requests to servlets defined in the servlet spec see if you can find any URLs that will be served by the HTMLManager servlet. (Hint: Most (all?) will be served by the Manager servlet) Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Webapp reloading issue and intermittent 404 errors
Pid wrote: .. I wondered if it doesn't like spaces in File paths. I did not want to ask that question. Good that someone did. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listener initialized twice
The same deployment runs OK on other machines and in development, while on server 2008 i am getting this error. java.lang.NoClassDefFoundError is thrown when creating a java.io.FileFilter instance which is part of JDK and we do have a JDK 1.5 installed On Wed, Jul 7, 2010 at 1:59 PM, Mark Thomas wrote: > On 07/07/2010 10:44, daniel polonsky wrote: > > and here is the localhost log > > > > Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext > > listenerStart > > SEVERE: Exception sending context initialized event to listener instance > of > > class com.nextnine.web.ComServerConfigListener > > java.lang.NoClassDefFoundError: tool/HandleFiles$2 > > So what isn't clear here? > > Mark > > > at tool.HandleFiles.getFileList(HandleFiles.java:717) > > at tool.HandleFiles.getFileList(HandleFiles.java:710) > > at > > tool.HandleFiles.getFileListSortedByLastModified(HandleFiles.java:670) > > at > > > com.nextnine.comsrv.dblayer.MailBoxManager.resetAllMessages(MailBoxManager.java:73) > > at > > com.nextnine.comsrv.dblayer.MailBoxManager.(MailBoxManager.java:50) > > at > com.nextnine.comsrv.servlets.NetworkLayer.init(NetworkLayer.java:425) > > at > > com.nextnine.comsrv.servlets.NetworkLayer.(NetworkLayer.java:70) > > at > > > com.nextnine.comsrv.servlets.NetworkLayerFactory.createNetworkLayer(NetworkLayerFactory.java:45) > > at > > > com.nextnine.web.ComServerConfigListener.initNetworkLayer(ComServerConfigListener.java:54) > > at > > > com.nextnine.web.ComServerConfigListener.contextInitialized(ComServerConfigListener.java:43) > > at > > > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) > > at > > org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) > > at > > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) > > at > > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) > > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) > > at > > > org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) > > at > > > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) > > at > > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) > > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) > > at > > > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) > > at > > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) > > at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) > > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) > > at > > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) > > at > > org.apache.catalina.core.StandardService.start(StandardService.java:519) > > at > > org.apache.catalina.core.StandardServer.start(StandardServer.java:710) > > at org.apache.catalina.startup.Catalina.start(Catalina.java:581) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) > > Caused by: java.lang.ClassNotFoundException: tool.HandleFiles$2 > > at > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516) > > at > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) > > ... 34 more > > > > > > On Wed, Jul 7, 2010 at 12:01 PM, daniel polonsky >wrote: > > > >> Hi > >> Sorry for not being clear, but i still have an issue with the latest > >> version of 6.0.26 tomcat, deployed on Windows 2008 > >> > >> *tomcat log* > >> Jul 7, 2010 11:57:31 AM 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: C:\Program > >> > Files\Java\jdk1.6.0_20\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem > >> Jul 7, 2010 11:57:32 AM org.apache.coyote.http11.Http11Protocol init > >> INFO: Initializing Coyote HTTP/1.1 on http-8080 > >> Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.Catalina load > >> INFO: Initialization processed in 648 ms > >> Jul 7, 2010 11:57:32 AM org.apache.catalina.core.StandardService start > >> INFO: Starting service Catalina > >> Jul 7, 2010 11:57:32 AM org.apache.catalina.core.St
Re: tomcat /manager not working
Mark Thomas wrote: On 07/07/2010 11:50, André Warnier wrote: I have no idea if this triggers secondary unwanted effects. Oddles of them. It breaks large sections of the manager app. If it does not however, then I would respectively suggest to the Tomcat developers to incorporate this as a standard servlet-mapping for the Manager, since the other one is a bit un-intuitive. RTFM. Specifically http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html Hi. (NB: in my previous message, I meant "respectfully" instead of "respectively"..) Respectfully thus, (re-)reading the above page from top to bottom did not immediately point out to me why it would break oodles of things. I accept you saying so, but could point me to a specific item or give a small example ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Updating webapps classes
I get back to this discussion beacuse I was brainstorming again on it, and found that the already present class loader may actually be able to do this alone. My thought was: if Tomcat is capable of managing different application contexts under its "work" folder, and have them run different applications with different class versions inside their classes/lib, probably it may implement automatic application updates by createing different application contexts behind the scene. I see this scenario: - Tomcat is running my webapp - People have sessions on it, and Tomcat has its application context on my webapp - I place new jar files/classes - Tomcat detects, and instead of reloading and invalidating current sessions, it will keep current sessions on the old application context, until they reach 0 sessions - Meanwhile it may create a new application context to run new sessions How hard would it be to make this true in Tomcat? Is there any other Java WebApp Container capable of doing this? Gabriele. Gabriele Bulfon - Sonicle S.r.l. Tel +39 028246016 Int. 30 - Fax +39 028243880 Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY http://www.sonicle.com -- Da: Christopher Schultz A: Tomcat Users List Data: 3 maggio 2010 15.57.57 CEST Oggetto: Re: Updating webapps classes -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, On 4/30/2010 10:33 AM, Peter Crowther wrote: In normal use, Tomcat1 is running. The load balancer directs all users to Tomcat1. Tomcat2 could even be stopped. I would say that "normal use" would include both (or however many) instances running in parallel. When it's time to upgrade, you mark one or more nodes in the cluster as "don't send any new users to this node" and wait for all the users on those nodes to complete their work. After that, Peter's scenario is exactly the same. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkve1mUACgkQ9CaO5/Lv0PAOhgCfRCZLdT0flr3es5Oc5IpCCNNl bokAn1F22eum4C6vhHoEv2LjQXee/9uk =IpQb -END PGP SIGNATURE- - 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: WebappClassLoader clearReferencesThreads
2010/7/6 Leo Donahue - PLANDEVX : > Part 2: > What is the correct way to make connections to things that are not data > sources in Tomcat? Can Tomcat manage the connection information (machine > name, domain, user, password)? How? > There is JNDI support available, so that you can declare if you provide an appropriate factory="" for it. http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html The factories are provided for some standard resource types (like java.sql.DataSource). Actually, Tomcat does not implement that factory by itself, but uses Apache Commons DBCP library from http://commons.apache.org/ which itself is based on Apache Commons Pool library. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: EL expressions do not work in tag file (tomcat 6.26)
2010/7/6 赵顺 : > there must be a default isELIgnored flag for tag files > once I used > <%@ tag > import="org.apache.commons.beanutils.BeanUtils" > pageEncoding="UTF-8" > description="" isELIgnored="false" %> > in my tag files > and tomcat 6.0.26 says > > org.apache.jasper.JasperException: /WEB-INF/tags/jet/grid.tag(26,1) > Tag directive: illegal to have multiple occurrences of isELIgnored > with different values (old: true, new: false) > I cannot reproduce this in 6.0.28, unless I explicitly add two conflicting <%...@tag %> directives in the same tag file. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Webapp reloading issue and intermittent 404 errors
On 07/07/2010 11:35, Tomislav Petrović wrote: > Pid said on 7.7.2010 12:26: >> On 07/07/2010 11:07, Tomislav Petrović wrote: >>> Tomislav Petrović said on 30.6.2010 16:27: >> Forgot to say: >> Tomcat service is started with following parameters: >> >> JVM: have to check whether server or client, not sure at the moment. > > Server, one would hope. Did you find out the exact version? > Yup JVM path for tomcat is ..\jdk1.6.0_18\jre\bin\server\jvm.dll, so Java 6 update 18 server. >>> >>> Although initial excpetion and stacktrace (related to webapp reloading, >>> actually checking that it should or should not be reloaded) went away with >>> reloadable="false" workaround I now have similar problem. >>> >>> Please help since now machine is in (or near) production :(. >>> >>> New stacktrace in catalina logs looks like (and produces 404 errors): >>> >>> Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service >>> SEVERE: An exception or error occurred in the container during the request >>> processing >>> java.lang.StringIndexOutOfBoundsException: String index out of range: 115 >>> at java.lang.String.substring(String.java:1934) >>> at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131) >>> at >>> org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771) >>> at >>> org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811) >>> at >>> org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429) >>> at >>> org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747) >>> at >>> org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501) >>> at >>> org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457) >>> at >>> org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288) >>> at >>> org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823) >>> at >>> org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667) >>> at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557) >>> at >>> org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462) >>> at >>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296) >>> at >>> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) >>> at >>> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) >>> at >>> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) >>> at java.lang.Thread.run(Thread.java:619) >>> >>> Everything else is same as I posted before (config file, JVM versions, >>> etc) >>> Any advice is appreciated >> >> I think the general feeling is that it's a JVM bug - but no-one can work >> out what it is. I can't even work out how to get 115 characters out of >> a normal file path. >> >> Can you move the installation from: >> D:\Program Files\Apache Software Foundation\Tomcat 6.0 >> >> To: >> D:\Tomcat60 >> >> > > Don't know have to check with customer, but actual index varies in each > occurrence of stack trace, sometimes it is even -1. In two days we had: > 2x java.lang.StringIndexOutOfBoundsException: String index out of range: 131 > 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 118 > 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 106 > 4x java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > 3x java.lang.StringIndexOutOfBoundsException: String index out of range: 127 > 2x java.lang.StringIndexOutOfBoundsException: String index out of range: 126 > 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 123 > Rest of stacktrace is identical in all occurences. I wondered if it doesn't like spaces in File paths. p > In addition > -- > Tomy > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
Re: SignatureMethodAlgorithm
On 07/07/2010 12:00, Mark Thomas wrote: > On 07/07/2010 10:46, Pid wrote: > > Wrong list me thinks. Doh. Email address auto-complete FAIL. p > Mark signature.asc Description: OpenPGP digital signature
Re: tomcat /manager not working
On 07/07/2010 11:50, André Warnier wrote: > I have no idea if this triggers secondary unwanted effects. Oddles of them. It breaks large sections of the manager app. > If it does not however, then I would respectively suggest to the Tomcat > developers to incorporate this as a standard servlet-mapping for the > Manager, since the other one is a bit un-intuitive. RTFM. Specifically http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SignatureMethodAlgorithm
On 07/07/2010 10:46, Pid wrote: Wrong list me thinks. Mark > On 07/07/2010 09:39, Simone Tripodi wrote: >> Hola Pid >> >> On Tue, Jul 6, 2010 at 10:38 PM, Pid wrote: >>> >>> I'm working on a prototype integrating the signature-api with the config >>> stuff & the spec api. Couple of things: >>> >>> #1 >>> >> >> no problems/objections, feel free to commit it ;) >> >>> #2 >>> >>> I'm trying to understand whether it would be possible for the >>> SignatureMethodAlgorithm interface to be refactored to just use the Key >>> interface, or (SigningKey, VerifyingKey) directly. >>> >> >> Unfortunately, nope. That would be easier if we could take in >> consideration only algorithms such PLAINTEXT and HMAC_SHA1, where the >> same key is used to both sign/verify the signature, but with RSA >> things are quite more complicated. >> Using RSA involves users have to use a private key to sign, and a >> public certificate to validate. Sounds reasonable - at least to me - >> that keys have to be typed, since, potentially, trying to verify an >> HMAC signature with an RSA public key is wrong. > > I thought as much. Hmm. > >>> I assume it's defined like this so an implementation can require it's >>> own key classes to be used? >>> >>> >>> The problem is that I don't think we will be able to use the >>> ServiceLoader mechanism to discover and use signature implementations. >>> >> >> I think your idea is still valid, adding just minor modifications, >> something similar that I already did in the past[1]: >> - with the service loader mechanism, you discover all SignatureMethod >> implementations and optionally store them in a Registry; >> - when a client try to generate/verify a signature, by the key it >> could access to the registry and take the relative algorithm. > > Yep. That's the idea. > > >> Quite clean and easy, thoughts? > > In principal, yes, in practice there's some problems that I can't quite > work out. Whether we use ServiceLoader or an equivalent duplicate, the > problem is as as follows... > > Very simply: > > Map registry = ...; > ClassLoader loader = ...; > > ServiceLoader services = >ServiceLoader.load(SignatureMethod.class, loader); > > for (SignatureMethod sm : services) { > registry.put(sm.getAlgorithm(), sm); > } > > > Without doing massive quantities of reflection - and I don't know if > even that will do it - the SignatureMethod can only be loaded if it is > not enhanced with generic types. > > Even if it was possible to store it efficiently, I can't see a way to > then use it. > > String algorithm = oAuthRequest.getAlgorithm(); > SignatureMethod method = registry.get(algorithm); > > If method was extracted: > > SignatureMethod method = registry.get(algorithm); > > We then need *another* mechanism which helps us create the proper, > matching keys K and V so we can create a concrete object. > > K key = createTheKey(oAuthRequest.getSigBase()); >// how do we do this? > > String signature = calculate(key, oAuthRequest); > > > I'm a bit stumped. How were you handling this? > > > p > > > > > >> Simo >> >> [1] >> http://code.google.com/p/asmx-oauth/source/browse/trunk/core/commons/src/main/java/com/asemantics/oauth/core/signers/RequestSignerRegistry.java > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listener initialized twice
On 07/07/2010 10:44, daniel polonsky wrote: > and here is the localhost log > > Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext > listenerStart > SEVERE: Exception sending context initialized event to listener instance of > class com.nextnine.web.ComServerConfigListener > java.lang.NoClassDefFoundError: tool/HandleFiles$2 So what isn't clear here? Mark > at tool.HandleFiles.getFileList(HandleFiles.java:717) > at tool.HandleFiles.getFileList(HandleFiles.java:710) > at > tool.HandleFiles.getFileListSortedByLastModified(HandleFiles.java:670) > at > com.nextnine.comsrv.dblayer.MailBoxManager.resetAllMessages(MailBoxManager.java:73) > at > com.nextnine.comsrv.dblayer.MailBoxManager.(MailBoxManager.java:50) > at com.nextnine.comsrv.servlets.NetworkLayer.init(NetworkLayer.java:425) > at > com.nextnine.comsrv.servlets.NetworkLayer.(NetworkLayer.java:70) > at > com.nextnine.comsrv.servlets.NetworkLayerFactory.createNetworkLayer(NetworkLayerFactory.java:45) > at > com.nextnine.web.ComServerConfigListener.initNetworkLayer(ComServerConfigListener.java:54) > at > com.nextnine.web.ComServerConfigListener.contextInitialized(ComServerConfigListener.java:43) > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) > at > org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) > at > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) > at > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) > at > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) > at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) > at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) > at > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) > at > org.apache.catalina.core.StandardService.start(StandardService.java:519) > at > org.apache.catalina.core.StandardServer.start(StandardServer.java:710) > at org.apache.catalina.startup.Catalina.start(Catalina.java:581) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) > Caused by: java.lang.ClassNotFoundException: tool.HandleFiles$2 > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) > ... 34 more > > > On Wed, Jul 7, 2010 at 12:01 PM, daniel polonsky wrote: > >> Hi >> Sorry for not being clear, but i still have an issue with the latest >> version of 6.0.26 tomcat, deployed on Windows 2008 >> >> *tomcat log* >> Jul 7, 2010 11:57:31 AM 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: C:\Program >> Files\Java\jdk1.6.0_20\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem >> Jul 7, 2010 11:57:32 AM org.apache.coyote.http11.Http11Protocol init >> INFO: Initializing Coyote HTTP/1.1 on http-8080 >> Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.Catalina load >> INFO: Initialization processed in 648 ms >> Jul 7, 2010 11:57:32 AM org.apache.catalina.core.StandardService start >> INFO: Starting service Catalina >> Jul 7, 2010 11:57:32 AM org.apache.catalina.core.StandardEngine start >> INFO: Starting Servlet Engine: Apache Tomcat/6.0.26 >> Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig >> deployDescriptor >> INFO: Deploying configuration descriptor host-manager.xml >> Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig >> deployDescriptor >> INFO: Deploying configuration descriptor manager.xml >> Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig >> deployDirectory >> INFO: Deploying web application directory docs >> Jul 7, 2010 11:57:32 AM org.apache
Re: Strange difference in behavior ELSupport in Tomcat 6.0.20 and Tomcat 6.0.26
2010/7/6 Roxana : > > What i don't understand is why, with the same code , Tomcat 6.0.20 didn't > complain. Is the type check in ELSupport stronger now? Yes, it is stronger. > In my case i try to compare two different enums: DocboxListColumn and > GenericListColumn, but they both implement interface ListColumn. > The chapter 1.8.2 of the EL spec (jsp-2_1-fr-spec-el.pdf) says that equals operator is applied as follows: If A or B is an enum, coerce both A and B to enum, apply operatorr BTW, if you really need to compare apples with oranges, you can convert one of them or both to strings. There is no string "concat" operator in EL, but there is support for "Composite expressions", such as “${firstName} ${lastName}” Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat /manager not working
Tapas Mishra wrote: I downloaded tomcat 5.5.29 and tried to access an application http://:8080/manager which the doc says http://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html that it is included and deployed by default it did not showed me any thing did I miss any thing. When you access http://yourhost:8080 you should get the standard Tomcat homepage. On the left, there is a link to the Manager application. It should show that the correct URI for the "manager homepage" is "/manager/html" That is because : - navigate to tomcat_dir/server/webapps/manager/WEB-INF - edit the file web.xml - in the servlet-mapping paragraphs, you will see one like this : HTMLManager /html/* If you want to be able to call the Manager homepage with the URL "/manager", then you should add one section like this : HTMLManager /* and restart Tomcat. This change, in effect, makes HTMLManager be the "default servlet" for the Manager application. I have no idea if this triggers secondary unwanted effects. If it does not however, then I would respectively suggest to the Tomcat developers to incorporate this as a standard servlet-mapping for the Manager, since the other one is a bit un-intuitive. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Webapp reloading issue and intermittent 404 errors
Pid said on 7.7.2010 12:26: > On 07/07/2010 11:07, Tomislav Petrović wrote: >> Tomislav Petrović said on 30.6.2010 16:27: > Forgot to say: > Tomcat service is started with following parameters: > > JVM: have to check whether server or client, not sure at the moment. Server, one would hope. Did you find out the exact version? >>> >>> Yup JVM path for tomcat is ..\jdk1.6.0_18\jre\bin\server\jvm.dll, so >>> Java 6 update 18 server. >> >> Although initial excpetion and stacktrace (related to webapp reloading, >> actually checking that it should or should not be reloaded) went away with >> reloadable="false" workaround I now have similar problem. >> >> Please help since now machine is in (or near) production :(. >> >> New stacktrace in catalina logs looks like (and produces 404 errors): >> >> Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service >> SEVERE: An exception or error occurred in the container during the request >> processing >> java.lang.StringIndexOutOfBoundsException: String index out of range: 115 >> at java.lang.String.substring(String.java:1934) >> at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131) >> at >> org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771) >> at >> org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811) >> at >> org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429) >> at >> org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747) >> at >> org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501) >> at >> org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457) >> at >> org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288) >> at >> org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823) >> at >> org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667) >> at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557) >> at >> org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296) >> at >> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) >> at >> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) >> at >> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) >> at java.lang.Thread.run(Thread.java:619) >> >> Everything else is same as I posted before (config file, JVM versions, >> etc) >> Any advice is appreciated > > I think the general feeling is that it's a JVM bug - but no-one can work > out what it is. I can't even work out how to get 115 characters out of > a normal file path. > > Can you move the installation from: > D:\Program Files\Apache Software Foundation\Tomcat 6.0 > > To: > D:\Tomcat60 > > Don't know have to check with customer, but actual index varies in each occurrence of stack trace, sometimes it is even -1. In two days we had: 2x java.lang.StringIndexOutOfBoundsException: String index out of range: 131 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 118 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 106 4x java.lang.StringIndexOutOfBoundsException: String index out of range: -1 3x java.lang.StringIndexOutOfBoundsException: String index out of range: 127 2x java.lang.StringIndexOutOfBoundsException: String index out of range: 126 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 123 Rest of stacktrace is identical in all occurences. In addition -- Tomy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: the welcome file "index.jsp" returns an 302 redirection
On 07/07/2010 11:25, André Warnier wrote: > lei jiang wrote: >> Hi, guys: >> >> I am using the Tomcat 5.0.28.0, and I put the my website into webapps >> directory. >> >> The welcome-file-list section likes this: >> >> >> index.jsp >> >> >> In the index.jsp, I use the jsp:forward tag to forward the request to >> a struts action: >> >> >> When I input "http://localhost:8080/mysite"; into the address bar of >> firefox and hit go button, the browser shows the correct page but the >> url in address bar changed to >> "http://localhost:8080/mysite/welcome.do"; >> >> I find that the tomcat returns a 302 redirection and then the tomcat >> returns the page generated by "welcome.do" action >> >> So what can we do to aviod the 302 redirection and let the address bar >> just show "http://localhost:8080/mysite";. >> > Naive suggestions : > > 1) > > welcome.do > > > 2) delete index.jsp and rename welcome.do to index.jsp 3) Upgrade your Tomcat, 5.0.x isn't supported anymore and it's REALLY OLD. p > ? > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
Re: Webapp reloading issue and intermittent 404 errors
On 07/07/2010 11:07, Tomislav Petrović wrote: > Tomislav Petrović said on 30.6.2010 16:27: Forgot to say: Tomcat service is started with following parameters: JVM: have to check whether server or client, not sure at the moment. >>> >>> Server, one would hope. Did you find out the exact version? >>> >> >> Yup JVM path for tomcat is ..\jdk1.6.0_18\jre\bin\server\jvm.dll, so >> Java 6 update 18 server. > > Although initial excpetion and stacktrace (related to webapp reloading, > actually checking that it should or should not be reloaded) went away with > reloadable="false" workaround I now have similar problem. > > Please help since now machine is in (or near) production :(. > > New stacktrace in catalina logs looks like (and produces 404 errors): > > Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service > SEVERE: An exception or error occurred in the container during the request > processing > java.lang.StringIndexOutOfBoundsException: String index out of range: 115 > at java.lang.String.substring(String.java:1934) > at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131) > at > org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771) > at > org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811) > at > org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429) > at > org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747) > at > org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501) > at > org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457) > at > org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288) > at > org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823) > at > org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667) > at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557) > at > org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296) > at > org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) > at > org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) > at > org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) > at java.lang.Thread.run(Thread.java:619) > > Everything else is same as I posted before (config file, JVM versions, > etc) > Any advice is appreciated I think the general feeling is that it's a JVM bug - but no-one can work out what it is. I can't even work out how to get 115 characters out of a normal file path. Can you move the installation from: D:\Program Files\Apache Software Foundation\Tomcat 6.0 To: D:\Tomcat60 ? p > -- > Tomy > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
Re: the welcome file "index.jsp" returns an 302 redirection
lei jiang wrote: Hi, guys: I am using the Tomcat 5.0.28.0, and I put the my website into webapps directory. The welcome-file-list section likes this: index.jsp In the index.jsp, I use the jsp:forward tag to forward the request to a struts action: When I input "http://localhost:8080/mysite"; into the address bar of firefox and hit go button, the browser shows the correct page but the url in address bar changed to "http://localhost:8080/mysite/welcome.do"; I find that the tomcat returns a 302 redirection and then the tomcat returns the page generated by "welcome.do" action So what can we do to aviod the 302 redirection and let the address bar just show "http://localhost:8080/mysite";. Naive suggestions : 1) welcome.do 2) delete index.jsp and rename welcome.do to index.jsp ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
the welcome file "index.jsp" returns an 302 redirection
Hi, guys: I am using the Tomcat 5.0.28.0, and I put the my website into webapps directory. The welcome-file-list section likes this: index.jsp In the index.jsp, I use the jsp:forward tag to forward the request to a struts action: When I input "http://localhost:8080/mysite"; into the address bar of firefox and hit go button, the browser shows the correct page but the url in address bar changed to "http://localhost:8080/mysite/welcome.do"; I find that the tomcat returns a 302 redirection and then the tomcat returns the page generated by "welcome.do" action So what can we do to aviod the 302 redirection and let the address bar just show "http://localhost:8080/mysite";. Thanks Regards -- Lei Jiang Member of SeedClass in the Department of Electronics and Information Engineering Member of Overseas group in Dian team Room 507, Building D7,1037 Luoyu Road, Wuhan 430074,P.R.China Mobile:+86-15926351274 Email: - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Webapp reloading issue and intermittent 404 errors
Tomislav Petrović said on 30.6.2010 16:27: >>> Forgot to say: >>> Tomcat service is started with following parameters: >>> >>> JVM: have to check whether server or client, not sure at the moment. >> >> Server, one would hope. Did you find out the exact version? >> > > Yup JVM path for tomcat is ..\jdk1.6.0_18\jre\bin\server\jvm.dll, so > Java 6 update 18 server. Although initial excpetion and stacktrace (related to webapp reloading, actually checking that it should or should not be reloaded) went away with reloadable="false" workaround I now have similar problem. Please help since now machine is in (or near) production :(. New stacktrace in catalina logs looks like (and produces 404 errors): Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.StringIndexOutOfBoundsException: String index out of range: 115 at java.lang.String.substring(String.java:1934) at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131) at org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771) at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811) at org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429) at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747) at org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501) at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457) at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288) at org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823) at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667) at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557) at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) at java.lang.Thread.run(Thread.java:619) Everything else is same as I posted before (config file, JVM versions, etc) Any advice is appreciated -- Tomy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SignatureMethodAlgorithm
On 07/07/2010 09:39, Simone Tripodi wrote: > Hola Pid > > On Tue, Jul 6, 2010 at 10:38 PM, Pid wrote: >> >> I'm working on a prototype integrating the signature-api with the config >> stuff & the spec api. Couple of things: >> >> #1 >> > > no problems/objections, feel free to commit it ;) > >> #2 >> >> I'm trying to understand whether it would be possible for the >> SignatureMethodAlgorithm interface to be refactored to just use the Key >> interface, or (SigningKey, VerifyingKey) directly. >> > > Unfortunately, nope. That would be easier if we could take in > consideration only algorithms such PLAINTEXT and HMAC_SHA1, where the > same key is used to both sign/verify the signature, but with RSA > things are quite more complicated. > Using RSA involves users have to use a private key to sign, and a > public certificate to validate. Sounds reasonable - at least to me - > that keys have to be typed, since, potentially, trying to verify an > HMAC signature with an RSA public key is wrong. I thought as much. Hmm. >> I assume it's defined like this so an implementation can require it's >> own key classes to be used? >> >> >> The problem is that I don't think we will be able to use the >> ServiceLoader mechanism to discover and use signature implementations. >> > > I think your idea is still valid, adding just minor modifications, > something similar that I already did in the past[1]: > - with the service loader mechanism, you discover all SignatureMethod > implementations and optionally store them in a Registry; > - when a client try to generate/verify a signature, by the key it > could access to the registry and take the relative algorithm. Yep. That's the idea. > Quite clean and easy, thoughts? In principal, yes, in practice there's some problems that I can't quite work out. Whether we use ServiceLoader or an equivalent duplicate, the problem is as as follows... Very simply: Map registry = ...; ClassLoader loader = ...; ServiceLoader services = ServiceLoader.load(SignatureMethod.class, loader); for (SignatureMethod sm : services) { registry.put(sm.getAlgorithm(), sm); } Without doing massive quantities of reflection - and I don't know if even that will do it - the SignatureMethod can only be loaded if it is not enhanced with generic types. Even if it was possible to store it efficiently, I can't see a way to then use it. String algorithm = oAuthRequest.getAlgorithm(); SignatureMethod method = registry.get(algorithm); If method was extracted: SignatureMethod method = registry.get(algorithm); We then need *another* mechanism which helps us create the proper, matching keys K and V so we can create a concrete object. K key = createTheKey(oAuthRequest.getSigBase()); // how do we do this? String signature = calculate(key, oAuthRequest); I'm a bit stumped. How were you handling this? p > Simo > > [1] > http://code.google.com/p/asmx-oauth/source/browse/trunk/core/commons/src/main/java/com/asemantics/oauth/core/signers/RequestSignerRegistry.java signature.asc Description: OpenPGP digital signature
Re: listener initialized twice
and here is the localhost log Jul 7, 2010 11:57:32 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Jul 7, 2010 11:57:32 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class com.nextnine.web.ComServerConfigListener java.lang.NoClassDefFoundError: tool/HandleFiles$2 at tool.HandleFiles.getFileList(HandleFiles.java:717) at tool.HandleFiles.getFileList(HandleFiles.java:710) at tool.HandleFiles.getFileListSortedByLastModified(HandleFiles.java:670) at com.nextnine.comsrv.dblayer.MailBoxManager.resetAllMessages(MailBoxManager.java:73) at com.nextnine.comsrv.dblayer.MailBoxManager.(MailBoxManager.java:50) at com.nextnine.comsrv.servlets.NetworkLayer.init(NetworkLayer.java:425) at com.nextnine.comsrv.servlets.NetworkLayer.(NetworkLayer.java:70) at com.nextnine.comsrv.servlets.NetworkLayerFactory.createNetworkLayer(NetworkLayerFactory.java:45) at com.nextnine.web.ComServerConfigListener.initNetworkLayer(ComServerConfigListener.java:54) at com.nextnine.web.ComServerConfigListener.contextInitialized(ComServerConfigListener.java:43) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.ClassNotFoundException: tool.HandleFiles$2 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) ... 34 more On Wed, Jul 7, 2010 at 12:01 PM, daniel polonsky wrote: > Hi > Sorry for not being clear, but i still have an issue with the latest > version of 6.0.26 tomcat, deployed on Windows 2008 > > *tomcat log* > Jul 7, 2010 11:57:31 AM 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: C:\Program > Files\Java\jdk1.6.0_20\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem > Jul 7, 2010 11:57:32 AM org.apache.coyote.http11.Http11Protocol init > INFO: Initializing Coyote HTTP/1.1 on http-8080 > Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.Catalina load > INFO: Initialization processed in 648 ms > Jul 7, 2010 11:57:32 AM org.apache.catalina.core.StandardService start > INFO: Starting service Catalina > Jul 7, 2010 11:57:32 AM org.apache.catalina.core.StandardEngine start > INFO: Starting Servlet Engine: Apache Tomcat/6.0.26 > Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig > deployDescriptor > INFO: Deploying configuration descriptor host-manager.xml > Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig > deployDescriptor > INFO: Deploying configuration descriptor manager.xml > Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig > deployDirectory > INFO: Deploying web application directory docs > Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.
tomcat /manager not working
I downloaded tomcat 5.5.29 and tried to access an application http://:8080/manager which the doc says http://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html that it is included and deployed by default it did not showed me any thing did I miss any thing. -- Tapas http://mightydreams.blogspot.com http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listener initialized twice
On 07/07/2010 11:01, daniel polonsky wrote: Hi Sorry for not being clear, but i still have an issue with the latest version of 6.0.26 tomcat, deployed on Windows 2008 Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors And the stacktrace for the listener failure is? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listener initialized twice
Hi Sorry for not being clear, but i still have an issue with the latest version of 6.0.26 tomcat, deployed on Windows 2008 *tomcat log* Jul 7, 2010 11:57:31 AM 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: C:\Program Files\Java\jdk1.6.0_20\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem Jul 7, 2010 11:57:32 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 648 ms Jul 7, 2010 11:57:32 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jul 7, 2010 11:57:32 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.26 Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory examples Jul 7, 2010 11:57:32 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Jul 7, 2010 11:57:33 AM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jul 7, 2010 11:57:33 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jul 7, 2010 11:57:33 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jul 7, 2010 11:57:33 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/31 config=null Jul 7, 2010 11:57:33 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 1309 ms On Wed, Jul 7, 2010 at 11:53 AM, Mark Thomas wrote: > On 07/07/2010 10:26, daniel polonsky wrote: > >> *in development * >> >> on server 2003 when running under tomcat 6.0.16, i am getting the >> following >> info >> INFO: The listener "com.nextnine.web.ComServerConfigListener" is already >> configured for this context. The duplicate definition has been ignored. >> >> while when running on same machine under tomcat 6.0.26 the console is >> clean >> > > So you have hit a bug in 6.0.16 that is fixed by upgrading to 6.0.26. What > exactly is the problem here? > > Mark > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: listener initialized twice
On 07/07/2010 10:26, daniel polonsky wrote: *in development * on server 2003 when running under tomcat 6.0.16, i am getting the following info INFO: The listener "com.nextnine.web.ComServerConfigListener" is already configured for this context. The duplicate definition has been ignored. while when running on same machine under tomcat 6.0.26 the console is clean So you have hit a bug in 6.0.16 that is fixed by upgrading to 6.0.26. What exactly is the problem here? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: favicon when serving non-html
Why would you? FavIcon is meant as attributes of pages, more specifically pages of whole sites. You can potentially have different FavIcons for different parts of your web site, but that is not common. Resources, which PDF is, have no reason for "having a favourite icon". It would be the same as asking "can my GIFs have favicon". No, they cannot. Nor should they. Nix. From: Dola Woolfe To: Tom Cat Sent: Tue, July 6, 2010 4:10:43 PM Subject: favicon when serving non-html Hi, When I serve up, say, a PDF file, how do I control the favicon? Here's my code: response.reset(); response.setContentType(IOUtilities.gMIMEType(fn)); response.setHeader("Content-disposition", "inline; filename=" + file.getName()); OutputStream outStream = response.getOutputStream(); synchronized(response.getOutputStream()){ outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath())); } response.flushBuffer(); Thanks in advance - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Strange difference in behavior ELSupport in Tomcat 6.0.20 and Tomcat 6.0.26
On 06/07/2010 22:20, Pid wrote: On 06/07/2010 18:20, Roxana wrote: What i don't understand is why, with the same code , Tomcat 6.0.20 didn't complain. Is the type check in ELSupport stronger now? Have you read to EL specification to see what the correct behaviour should be? Have you looked at the changelog to see if there are any changes between 6.0.20 and 6.0.26 that might apply (Hint: EL related changes will be in the Jasper sections)? This is *open* source. Have you looked at the svn commit messages to see if there are any relevant changes? (Hint: tomcat.markmail.org ha a nice UI that makes this fairly easy. The EL implementation is in the org.apache.el package) In my case i try to compare two different enums: DocboxListColumn and GenericListColumn, but they both implement interface ListColumn. I hope you can help me with an answer See above and you should be able to find the answer yourself. Bit of a mystery without seeing the JSP content. I'm fairly sure this is an application bug but without a concrete example, it is hard to be certain. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
listener initialized twice
Hi We have a web application running on Tomcat as a service and because of historical reasons this web app is using ROOT folder (it is ugly but i can't change it). Recently we have added and initializing listener that (implements ServletContextListener) here its definition in web.xml com.nextnine.web.ComServerConfigListener cs-root Q:/CommunicationServer This web app runs fine on 2003 server, but when i try to run it on server 2008 it fails to initialize listener (see the log below). *tomcat log* Jul 7, 2010 10:43:39 AM org.apache.coyote.http11.Http11NioProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-192.168.201.50-8080 Jul 7, 2010 10:43:39 AM org.apache.coyote.http11.Http11NioProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-192.168.201.50-443 Jul 7, 2010 10:43:40 AM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Jul 7, 2010 10:43:40 AM org.apache.coyote.http11.Http11NioProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-192.168.201.50-8080 Jul 7, 2010 10:43:41 AM org.apache.coyote.http11.Http11NioProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-192.168.201.50-443 Jul 7, 2010 10:43:43 AM 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: C:\Program Files\NextNine\CommunicationServer\apache-tomcat-6.0.20\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem Jul 7, 2010 10:43:43 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Jul 7, 2010 10:43:43 AM org.apache.coyote.http11.Http11NioProtocol init INFO: Initializing Coyote HTTP/1.1 on http-192.168.201.50-8080 Jul 7, 2010 10:43:43 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Jul 7, 2010 10:43:43 AM org.apache.coyote.http11.Http11NioProtocol init INFO: Initializing Coyote HTTP/1.1 on http-192.168.201.50-443 Jul 7, 2010 10:43:43 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1589 ms Jul 7, 2010 10:43:43 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jul 7, 2010 10:43:44 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.20 Jul 7, 2010 10:43:45 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Jul 7, 2010 10:43:45 AM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Jul 7, 2010 10:43:45 AM org.apache.coyote.http11.Http11NioProtocol start INFO: Starting Coyote HTTP/1.1 on http-192.168.201.50-8080 Jul 7, 2010 10:43:45 AM org.apache.coyote.http11.Http11NioProtocol start INFO: Starting Coyote HTTP/1.1 on http-192.168.201.50-443 Jul 7, 2010 10:43:45 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jul 7, 2010 10:43:45 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/31 config=null Jul 7, 2010 10:43:45 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 1721 ms *in development * on server 2003 when running under tomcat 6.0.16, i am getting the following info INFO: The listener "com.nextnine.web.ComServerConfigListener" is already configured for this context. The duplicate definition has been ignored. while when running on same machine under tomcat 6.0.26 the console is clean if it may help i can send the whole project structure as a zip thx in advance Daniel
Re: [OT] How to call an external class from a webapp (i.e. - implement a plugin)
Goren Il wrote: so the basic idea is: 1. Define an interface (WSDL or named parameters for a "post" message) 2. Enable specifying the URL of the plugin in the context of the webapp 3. As part of the flow, call that URL with the defined format Did I follow your thought? It seems like an overhead in terms of performance, but if there is no other possibility - this is what we shall do. Thanks Basically, I believe that this is what Chuck meant. The "plugin" would be another separate webapp, and your webapp would make a HTTP request to it. In Apache httpd, there is a concept of an "internal sub-request". This allows one "context" (the concept is a bit different there), to momentarily suspend its own execution while it is itself making an internal request to the server for another URL/resource, then collecting the result of this "sub-request", and continue its own execution. Because this sub-request is purely internal to the webserver, it avoids a lot of the overhead that would result from a separate full HTTP request for instance (such as having to create its own HTTP loopback connection etc..). It would be interesting to learn from the experts here, if there would exist an efficient and servlet-spec compatible way to implement such a mechanism in Tomcat. On 06-Jul-10 18:15, Caldarale, Charles R wrote: From: Goren Il [mailto:gore...@hotmail.com] Subject: Re: How to call an external class from a webapp (i.e. - implement a plugin) Aren't there other webapps that have plugin capabilities? The philosophy of the servlet spec is to have self-contained webapps, so plugins aren't really catered for. (Might be something in the 3.0 spec, but I haven't really studied it yet.) As an alternative to direct class calls, can you package the add-on as a separate context and reference it via forwarding or as a web service? - 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 - 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