RE: ClassNotFoundException WSServlet with Tomcat 7.0.11 on Windows Server 2008 R2 using METRO 2.1
Thanks for the replies so far. Chuck; SEVERE: Allocate exception for servlet TempConvertWS java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.WSServlet Which usually means you have the requisite class located in more than one place. Given the way you've been scattering jars all over, that's not surprising. Each required .jar file must be in only one place, not multiple. I really only copied what the metro-on-tomcat.xml file does. There's a lot of blog posts about having to have the METRO jars in JAVA_HOME\jre\lib too due to JAVA 1.6 only shipping with JAX-WS 2.0 and METRO needs JAX-WS 2.1. I understand what you're saying and have stripped back the locations of the jar files to just CATALINA_HOME\lib and the problem still persists. I'm beginning to wonder if my Tomcat configuration is correct and there is a problem with the way that I created the JAX-WS artifacts using wsgen due to wsgen not using the correct version of JAX-WS... Chris; Howard: are you sure that you need to put your libraries into Tomcat's lib directories, etc. instead of just putting them all in your webapp's WEB-INF/lib directory? Thats just what the metro-on-tomcat.xml file does so I assumed that was the correct procedure. From the replies I've got that may not be the case. AFAIK, Tomcat does not provide any web services APIs so there shouldn't be any conflicts. Try removing all of the libraries you added to the CATALINA_HOME/lib and CATALINA_HOME/endorsed directories and removing the sever.loader property from catalina.properties (not sure why you'd need that, anyway). I actually got the adding METRO to the server.loader path from this blog post http://blogs.oracle.com/arungupta/entry/metro_on_tomcat_6_x, another blog I read suggested adding the METRO jars to the shared.loader property. And this one http://blog.theunical.com/webservers/tomcat/installation-and-configuration-of-jax-ws-metro-on-tomcat-6/ All of your libraries should be in your webapp's WEB-INF/lib directory only at that point. If you restart Tomcat in that configuration, what is the result? I get the same result, Tomcat starts ok, initializes the METRO libs and WSServlet context listeners, then I get a ClassNotFoundException when browsing to the service's WSDL. There must be something incorrect with the way that I have created the webservice, as from what you've said there doesn't seem to be an extra configuration step that I have missed. Felix; On http://metro.java.net/guide/Using_JAX_WS_2_1_with_JavaSE6.html the metro guys advise to put jaxws-api.jar and jaxb-api.jar - and only those - into the jre endorsed directory. That is necessary, since those api's are part of the jre 6, but in older versions. So the possible duplicate class definitions could come from the fact, that the older api comes with the jre. Regards Felix Those 2 jars, jaxws-api.jar and jaxb-api.jar, are an endless source of confusion. As far as I can make out the web-services.api jar that ships with METRO actually contains the same classes as jaxws-api.jar and jaxb-api.jar. You can download those from JAX-WS section of the METRO site but if you download METRO itself then those jars are included in the web-services.api jar. Although I've been unable to find which jar actually contains the WSServlet class itself. This is only post I've found which actually mentions that jaxws-api.jar and jaxb-api.jar = web-services.api jar http://weblogs.java.net/blog/325/2009/04/03/tip-using-jax-ws-22-metro-20-tomcat-6x-jdk-6 Thanks Howard
Re: How to dynamically create JNDI Context Resources
Resending this as it didn't arrive in my inbox... sorry if you received it already... 2011/5/20 John Fletcher In my application I'm using a library which uses JNDI to locate JMS topics and then operates with them. I successfully configured JNDI references to the JMS topics like this in Context.xml, and everything works nicely: Resource name=jms/flex/TopicConnectionFactory type=org.apache.activemq.ActiveMQConnectionFactory description=JMS Connection Factory factory=org.apache.activemq.jndi.JNDIReferenceFactory brokerURL=tcp://localhost:61616 brokerName=activeMQBroker / Resource name=jms/gds1 type=org.apache.activemq.command.ActiveMQTopic description=Discussion topic for GraniteDS factory=org.apache.activemq.jndi.JNDIReferenceFactory physicalName=test.gds1 / The challenge is that the JMS topics I want to make available to the library depend on some runtime information, i.e. I want my application to create the JMS topics dynamically. Is there a way that I can create these JNDI resources at runtime from my application instead of having to hard-code them into Context.xml? I'm able to upgrade to Tomcat 7 if necessary. I found this, not sure if it could solve my problem? http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#Adding_Custom_Resource_Factories . I'm no expert on JNDI so if there is an altogether better solution to my problem I'm open to it. John
SLL Certificate Chain
Hi, I am running Tomcat 6.0.18 64bit on Windows Server 2008 R2 Enterprise. I obtained a certificate for my server from StartCom, installed it and configured the Connector. The server, intermediate and root certificates are in a keystore file. So far all went fine, except for one problem: Tomcat sends only the server certificate, not the whole certificate chain. This means that Firefox (all newer versions) thinks the certificate is invalid. I tried to import the StartCom certificates into the default keystore cacerts, no difference. The problem is not that Tomcat cant validate the certificate, but that the intermediate certificate is not sent (verified with Wireshark). I tried to set all entries in logging.properties to ALL, but I dont get anything in my logs. Has anyone encountered the same behaviour? server.xml: Connector protocol=org.apache.coyote.http11.Http11Protocol port=443 SSLEnabled=true maxThreads=150 scheme=https secure=true keystoreFile=C:\Program Files\Apache Software Foundation\Tomcat 6.0\tomcat.keystore keystorePass=... keyAlias=intern clientAuth=false sslProtocol=TLS / keytool -list -keystore tomcat.keystore: Keystore-Typ: JKS Keystore-Provider: SUN Ihr Keystore enthält 3 Einträge. startcom.ca.sub, 23.05.2011, trustedCertEntry, Zertifikatsfingerabdruck (MD5): 4F:9B:88:B0:78:F3:16:9F:19:DC:F1:A3:8A:50:DD:82 startcom.ca, 23.05.2011, trustedCertEntry, Zertifikatsfingerabdruck (MD5): 22:4D:8F:8A:FC:F7:35:C2:BB:57:34:90:7B:8B:22:16 intern, 23.05.2011, PrivateKeyEntry, Zertifikatsfingerabdruck (MD5): 30:93:DB:AD:5A:DB:76:00:49:EC:EA:0F:4B:9E:C3:3C keytool -list -v -keystore tomcat.keystore: (output shortened) Keystore-Typ: JKS Keystore-Provider: SUN Ihr Keystore enthält 3 Einträge. Aliasname: startcom.ca.sub Erstellungsdatum: 23.05.2011 Eintragstyp: trustedCertEntry Eigner: CN=StartCom Class 2 Primary Intermediate Server CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Aussteller: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Seriennummer: b Gültig von: Wed Oct 24 22:57:08 CEST 2007 bis: Mon Oct 22 22:57:08 CEST 2012 Digitaler Fingerabdruck des Zertifikats: MD5: 4F:9B:88:B0:78:F3:16:9F:19:DC:F1:A3:8A:50:DD:82 SHA1: A9:C3:A1:41:78:DF:B2:B1:D1:94:1D:5E:3F:56:DA:FA:E2:E1:40:37 Unterschrift-Algorithmusname: SHA1withRSA Version: 3 ... *** *** Aliasname: startcom.ca Erstellungsdatum: 23.05.2011 Eintragstyp: trustedCertEntry Eigner: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Aussteller: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Seriennummer: 1 Gültig von: Sun Sep 17 21:46:36 CEST 2006 bis: Wed Sep 17 21:46:36 CEST 2036 Digitaler Fingerabdruck des Zertifikats: MD5: 22:4D:8F:8A:FC:F7:35:C2:BB:57:34:90:7B:8B:22:16 SHA1: 3E:2B:F7:F2:03:1B:96:F3:8C:E6:C4:D8:A8:5D:3E:2D:58:47:6A:0F Unterschrift-Algorithmusname: SHA1withRSA Version: 3 ... *** *** Aliasname: intern Erstellungsdatum: 23.05.2011 Eintragstyp: PrivateKeyEntry Zertifikatskettenlänge: 1 Zertifikat[1]: Eigner: EMAILADDRESS=postmas...@htl-klu.atmailto:EMAILADDRESS=postmas...@htl-klu.at, CN=intern.htl-klu.at, OU=StartCom Verified Certificate Member, O=Bernhard Hobiger, L=Klagenfurt, ST=Karnten, C=AT, OID.2.5.4.13=165616-YmmhPnif68b3zfKu Aussteller: CN=StartCom Class 2 Primary Intermediate Server CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Seriennummer: 1a3d Gültig von: Thu Mar 18 09:26:36 CET 2010 bis: Mon Mar 19 00:20:28 CET 2012 Digitaler Fingerabdruck des Zertifikats: MD5: 30:93:DB:AD:5A:DB:76:00:49:EC:EA:0F:4B:9E:C3:3C SHA1: AD:21:D5:1B:83:BB:DF:A7:61:BA:BD:E0:F9:7A:13:8B:F9:EF:8A:CC Unterschrift-Algorithmusname: SHA1withRSA Version: 3 ... *** ***
Re: Tomcat 5.5 doesn't support keep-alive?
Thanks for your suggestions, I have previously been through these options, the code I posted was a shortest path to reproducing my issue. I am ensuring I read the whole response, and any error response. Setting the keep-alive header appears to make no difference (compared with setting nothing) when connecting to either tomcat or httpd. Setting Connection: Close causes it to run out of addresses very quickly when connecting to both tomcat and httpd. The fact that connection close causes it to run out of addresses so much quicker than with keep alive suggests that there is _some_ keep-alive type behaviour going on, i.e. it is managing to re-use a certain number of connections, but not enough. Maybe I'm not really understanding what keep-alive is/does, or I'm overestimating what tomcat is capable of, but I would expect the java URLConnection to behave in a pretty similar way whether connected to tomcat or httpd. As its tomcat whose behaviour is unexpected, I'm hoping someone here can help me. Thanks again, Tim. On 17 May 2011 09:10, users-h...@tomcat.apache.org wrote: -- Forwarded message -- From: Tim Stibbs stripybad...@gmail.com To: users@tomcat.apache.org Date: Mon, 16 May 2011 09:06:36 +0100 Subject: Tomcat 5.5 doesn't support keep-alive? I have a java client that is making a large number of calls to a servlet running in a web app in tomcat 5.5.28. I have noticed that if the client process runs for too long, the client machine runs out of ports throwing a java.net.BindException: Address already in use: connect. I thought that java's URLConnection maintained an internal pool of connections, and that so long as keep alive was enabled it would re-use the connections. However, when the server is in tomcat, this does not seem to happen, and it never sends the keep alive header with the response. I tested it just making a get request to a single web page (using the code below), in case my servlet was doing something wrong, but I have the same issue. Note that putting the same web page in apache httpd 2.2 does not have the same problem - httpd sends the keep alive header in the response and java manages to pool the connections properly. The documentation seems to suggest that tomcat does support keep alive, I have tried with tomcat 6 which seems to have more keep alive related settings, but it seems to make no difference. Note that looking at netstat etc shows that all the old connections are in time_wait, but because I am making a lot of new connections very often the old ones haven't timed out and it runs out of local ports. Can anyone suggest what I might be doing wrong? Any suggestions greatly appreciated. while (true) { URLConnection servletConnection = url.openConnection(); BufferedReader is = new BufferedReader(new InputStreamReader(servletConnection.getInputStream())); String line; while ((line = is.readLine()) != null) { } is.close(); } -- Forwarded message -- From: Christopher Schultz ch...@christopherschultz.net To: Tomcat Users List users@tomcat.apache.org Date: Mon, 16 May 2011 12:16:46 -0400 Subject: Re: Tomcat 5.5 doesn't support keep-alive? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim, On 5/16/2011 4:06 AM, Tim Stibbs wrote: I have a java client that is making a large number of calls to a servlet running in a web app in tomcat 5.5.28. I have noticed that if the client process runs for too long, the client machine runs out of ports throwing a java.net.BindException: Address already in use: connect. I thought that java's URLConnection maintained an internal pool of connections, and that so long as keep alive was enabled it would re-use the connections. The Javadoc for java.net.URL has this to say about the openConnection method: A new connection is opened every time by calling the openConnection method of the protocol handler for this URL. That seems to be conflicting with this other documentation: http://download.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html ... which says that keep-alive is transparent. I don't see you setting a Connection: keep-alive header, which you probably should be doing. The example code in the above document does /not/ explicitly set this header, but it couldn't hurt. You should also check this out: http://forums.java.net/node/656951 Evidently, not properly reading the server's response could be a problem, too. Note that HttpURLConnection requires that you monitor two separate streams for responses: the output and error streams. You should drain one or the other stream based upon the response code you get from the server. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3RTe0ACgkQ9CaO5/Lv0PBvrQCcDwOPEO/GZtHAHSuUf1FO23M/ Vh4AoKvSDDZWe6hjtAlHnENWG1ixbdAf =QG3e -END PGP SIGNATURE-
Re: How to dynamically create JNDI Context Resources
On Mon, 23 May 2011 10:34:28 +0200, John Fletcher wrote: The challenge is that the JMS topics I want to make available to the library depend on some runtime information, i.e. I want my application to create the JMS topics dynamically. Is there a way that I can create these JNDI resources at runtime from my application instead of having to hard-code them into Context.xml? So why do you want to use JNDI still? You can call factory method yourself. Yes, this will tight you to specific JMS implementation. But do you plan to migrate to different JMS provider? With very little effort you can configure spring (is there anyone who does not use spring nowadays?) to hide direct factory calls. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to get early notification of the upcoming release
Hi, How do I get an early notification of the upcoming release (including Secur= ity fix) from Tomcat? Is there any program/subscription mechanism for this? Basically we have made some custom changes to Tomcat source and would like = to get the early notification so that we can merge those changes with Tomca= t ones and make it available as soon as the public release is made. Regards, Rupesh
Tomcat 6 Clustering vs. Tomcat 5.5 clustering
Hi, while moving an application from Tomcat 5.5 to Tomcat 6 I found some differences in clustering, that I could not resolve myself: e. G. What happened to replicationMode, ackTimeout waitForAck? In TC 5.5 I had: Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=fastasyncqueue ackTimeout=15000 waitForAck=true/ Are they still available with org.apache.catalina.tribes.transport.ReplicationTransmitter? Thanks Martin -- Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to get early notification of the upcoming release
On 23/05/2011 12:30, Rupesh Kumar wrote: Hi, How do I get an early notification of the upcoming release (including Security fix) from Tomcat? Is there any program/subscription mechanism for this? Proposed releases are discussed on the dev mailing list. As a minimum there will be an svn commit to create the release tag and a VOTE on the proposed release prior to any release. If you follow the dev list you will have as much notice as anyone else of a Tomcat release. As an aside, Tomcat 7 currently releases once a month with the process starting at the beginning of the month. No advance notification is made of security vulnerabilities fixed in any Tomcat release. Information regarding unpublished security vulnerabilities is limited to: - the person that reported the issue - the Tomcat security team - the Apache security team Membership of the Tomcat security team is limited to Tomcat committers. Membership of the Apache security team is limited (as far as I recall) to members of the foundation. Members of the Apache and/or Tomcat security teams may share information on Tomcat security vulnerabilities with domain experts (e.g. colleagues at their employer) providing that it is made clear that a) the information is not for public disclosure and b) that all discussion of the vulnerability is cc'd to the tomcat security mailing list. When a vulnerability is made public (usually shortly after the release in which it is fixed is available) then it is announced to: - Tomcat announce mailing list - Tomcat dev mailing list - Tomcat users mailing list - Apache announce mailing list - Bugtraq - Full disclosure Basically we have made some custom changes to Tomcat source and would like to get the early notification so that we can merge those changes with Tomcat ones and make it available as soon as the public release is made. That isn't possible. However, depending on what those custom changes are, one option is to propose the changes for inclusion in Tomcat so you no longer need to merge them in. Note that without knowing what the changes are, there is no guarantee that they will be excepted. Changes you would like to propose should be added as enhancement requests in Bugzilla. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 Clustering vs. Tomcat 5.5 clustering
Hi, while moving an application from Tomcat 5.5 to Tomcat 6 I found some differences in clustering, that I could not resolve myself: e. G. What happened to replicationMode, ackTimeout waitForAck? In TC 5.5 I had: Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=fastasyncqueue ackTimeout=15000 waitForAck=true/ Are they still available with org.apache.catalina.tribes.transport.ReplicationTransmitter? Also, can I assume the bindAddress from org.apache.catalina.cluster.mcast.McastService is the same as bind from org.apache.catalina.tribes.membership.McastService? Thanks Martin -- Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to get early notification of the upcoming release
Thanks Mark! That was very helpful. -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, May 23, 2011 5:58 PM To: Tomcat Users List Subject: Re: How to get early notification of the upcoming release On 23/05/2011 12:30, Rupesh Kumar wrote: Hi, How do I get an early notification of the upcoming release (including Security fix) from Tomcat? Is there any program/subscription mechanism for this? Proposed releases are discussed on the dev mailing list. As a minimum there will be an svn commit to create the release tag and a VOTE on the proposed release prior to any release. If you follow the dev list you will have as much notice as anyone else of a Tomcat release. As an aside, Tomcat 7 currently releases once a month with the process starting at the beginning of the month. No advance notification is made of security vulnerabilities fixed in any Tomcat release. Information regarding unpublished security vulnerabilities is limited to: - the person that reported the issue - the Tomcat security team - the Apache security team Membership of the Tomcat security team is limited to Tomcat committers. Membership of the Apache security team is limited (as far as I recall) to members of the foundation. Members of the Apache and/or Tomcat security teams may share information on Tomcat security vulnerabilities with domain experts (e.g. colleagues at their employer) providing that it is made clear that a) the information is not for public disclosure and b) that all discussion of the vulnerability is cc'd to the tomcat security mailing list. When a vulnerability is made public (usually shortly after the release in which it is fixed is available) then it is announced to: - Tomcat announce mailing list - Tomcat dev mailing list - Tomcat users mailing list - Apache announce mailing list - Bugtraq - Full disclosure Basically we have made some custom changes to Tomcat source and would like to get the early notification so that we can merge those changes with Tomcat ones and make it available as soon as the public release is made. That isn't possible. However, depending on what those custom changes are, one option is to propose the changes for inclusion in Tomcat so you no longer need to merge them in. Note that without knowing what the changes are, there is no guarantee that they will be excepted. Changes you would like to propose should be added as enhancement requests in Bugzilla. Mark - 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: java.lang.ClassNotFoundException - JSP pages
Hi all, Here is a quick update of my situation: I made two changes: I set the checkInterval flag for the JspServlet settings (20 seconds) I reduced my maxObjectInCache parameter (a proprietary application config) which basically reduces the amount of memory my app uses So far, I stopped getting the ClassNotFoundException. I'll continue checking during this week, and then try removing the checkInterval flag from one of my servers to see if this is the root cause. If anyone has any tips, I'll appreciate it. Thanks From: tw...@hotmail.com To: users@tomcat.apache.org Subject: java.lang.ClassNotFoundException - JSP pages Date: Sat, 21 May 2011 19:06:53 + Hi all, I'm running Tomcat 6.0.26 on a Win2008 machine. I'm running three web-apps on a single instance. After a few hours of running, I start getting java.lang.ClassNotFoundException when trying to access certain JSP files. Other JSP files are accessible. I get this exception for pages on all three web-apps. I checked with jconsole, and their are really no JSP compiled classes in memory for the pages I try to access. After restarting Tomcat, I manage to access these pages. Another thing to note is that one of my web-apps is writing a lot of logs to catalina - on purpose. Any ideas? is it a memory problem? I'm thinking of working with separate Tomcat instances per web-app. Thanks
Re: How to dynamically create JNDI Context Resources
Thanks... I thought the answer was along those lines but the library I'm using was constraining me to use JNDI. However I now looked into their source code and found a clean way around JNDI. Your answer got me motivated in the right direction, thankyou. John 2011/5/23 Mikolaj Rydzewski m...@ceti.pl On Mon, 23 May 2011 10:34:28 +0200, John Fletcher wrote: The challenge is that the JMS topics I want to make available to the library depend on some runtime information, i.e. I want my application to create the JMS topics dynamically. Is there a way that I can create these JNDI resources at runtime from my application instead of having to hard-code them into Context.xml? So why do you want to use JNDI still? You can call factory method yourself. Yes, this will tight you to specific JMS implementation. But do you plan to migrate to different JMS provider? With very little effort you can configure spring (is there anyone who does not use spring nowadays?) to hide direct factory calls. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
search list history
Hello, how can i search for older mails on the list, i need to read again about deploy same webapp on different contexts to test new versions. thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: search list history
From: alexis [mailto:alz...@gmail.com] Subject: search list history how can i search for older mails on the list As documented on the Tomcat mailing list page, MARC is searchable: http://marc.theaimsgroup.com/?l=tomcat-user - 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
difference in behaviour of tomcat 6 and tomcat 7 very imp
Hi, I have done analysis on static references and found a interesting point al;so i find a difference in behaviour in tomcat 6 andtomcat 7 I created a class (TestStatic) which has a static reference to VO(java bean) in my servlet i declared TestStatic as member variable and initialized it there and i deployed my app and hit my servlet and then undeployed it ... i used eclipse MAT and saw that both TestStatic and VO objects are not getting garbage collected then i changed the code in my servlet and removed TestStatic from member variable i used spring beanfactory to get TestStatic object in my service method and repeated step of deploying hitting my servlet and undeploying .. i used eclipse MAT and saw that only VO object are not getting garbage collected so what can be concluded static references are never garbage collected ? or even objects holding static references are not GC'ed. In tomcat static refrence are getting garbage collected but in weblogic it is not can any body help below is code for reference \ *package* com.leak; *public* *class* TestEnum { *private* BeanName name; *private* *static* VO vo = *new* VO(); *public* *void* printNames() { System.out.println(name.beanName); }} *package* com.leak; *import* org.springframework.beans.factory.BeanFactory;*import* org.springframework.context.support.ClassPathXmlApplicationContext; *public* *class* UtilsN1 { *public* *static* BeanFactory factory=*null*; *public* *static* *void* setContext(BeanFactory factory ){ UtilsN1.factory = factory; System.err.println( Utils.factory + factory ); } *public* *static* BeanFactory getFactory() { *return* factory; }} *package* com.leak; *import* java.io.IOException;*import* java.io.PrintWriter; *import* javax.security.auth.Destroyable;*import* javax.servlet.ServletConfig;*import* javax.servlet.ServletException;*import* javax.servlet.http.HttpServlet;*import* javax.servlet.http.HttpServletRequest;*import* javax.servlet.http.HttpServletResponse; *import* org.springframework.beans.factory.BeanFactory;*import* org.springframework.beans.factory.xml.XmlBeanFactory;*import* org.springframework.core.io.ClassPathResource;*import* org.springframework.core.io.Resource; *public* *class* Leak *extends* HttpServlet { *private* *static* *final* *long* serialVersionUID = 1L; TestEnum a = *new* TestEnum(); @Override *public* *void* init(ServletConfig config) *throws* ServletException { super.init(config); Resource res = *new* ClassPathResource(applicationContext.xml); BeanFactory factory = *new* XmlBeanFactory(res); System.out.println(factory::: + factory.getBean(test)); UtilsN1.setContext(factory); } *protected* *void* doGet(HttpServletRequest request, HttpServletResponse response) *throws* ServletException, IOException { response.setContentType(text/html;charset=UTF-8); PrintWriter out = response.getWriter(); out.println(htmlbodypre); Test t = (Test) UtilsN1.getFactory().getBean( BeanName.TEST.getBeanName()); System.out.println( test + t); //TestEnum a = (TestEnum) UtilsN1.getFactory().getBean(testEnum); a.printNames(); out.println(/pregg/body/html); out.close(); } *protected* *void* doPost(HttpServletRequest request, HttpServletResponse response) *throws* ServletException, IOException { } *public* *void* destroy() { UtilsN1.factory = *null*; } } *package* com.leak; *public* *class* VO { String name; *public* String getName() { *return* name;} *public* *void* setName(String name) { this.name = name;} } -- *Thanks Regards Vickyb *
GC algorithm
HI, How can i come to know the GC algorithm used in tomcat... and all GC configuarations.. -- *Thanks Regards Vickyb *
Re: search list history
Found it, thanks Sent via BlackBerry by ATT -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Mon, 23 May 2011 08:40:50 To: Tomcat Users Listusers@tomcat.apache.org Reply-To: Tomcat Users List users@tomcat.apache.org Subject: RE: search list history From: alexis [mailto:alz...@gmail.com] Subject: search list history how can i search for older mails on the list As documented on the Tomcat mailing list page, MARC is searchable: http://marc.theaimsgroup.com/?l=tomcat-user - 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: GC algorithm
From: vicky b [mailto:vickyb2...@gmail.com] Subject: GC algorithm How can i come to know the GC algorithm used in tomcat... That's easy: none. GC algorithms are the province of the JVM, not Tomcat. and all GC configuarations.. Read the JVM doc. - 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: GC algorithm
then why do i see a difference in behaviour for tomcat 6 and tomcat 7 when i undeploy my app the objects that are collected in tomcat6 are not collected in tomcat7? On Mon, May 23, 2011 at 7:19 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: vicky b [mailto:vickyb2...@gmail.com] Subject: GC algorithm How can i come to know the GC algorithm used in tomcat... That's easy: none. GC algorithms are the province of the JVM, not Tomcat. and all GC configuarations.. Read the JVM doc. - 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 -- *Thanks Regards Vickyb *
RE: GC algorithm
From: vicky b [mailto:vickyb2...@gmail.com] Subject: Re: GC algorithm then why do i see a difference in behaviour for tomcat 6 and tomcat 7 when i undeploy my app the objects that are collected in tomcat6 are not collected in tomcat7? Because the objects are no longer reachable in your Tomcat 6 environment but are in Tomcat 7. Nothing to do with the GC algorithm employed. Analyze the heap and find out what references to the objects of interest are still around. - 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
Pointers for Filter to Deny New Sessions
I'm currently running Tomcat on 2 Linux boxes (versions = 7.0) am looking to write a filter that will 1) intercept all requests to a specific context (say, /Catalog), 2) determine if request has an existing session 3) if there is no session, redirect request to another context I'm a novice with Tomcat filters, so am looking for some useful pointers for this. TIA. -- Jonathan Rosenberg Founder Executive Director Tabby's Place, a Cat Sanctuary - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GC algorithm
Both tomcat 6 and tomcat are running on the same machine using same JVM and as you said GC algorithms are the province of the JVM which according to my understanding means depends upon JVM then why the difference. On Mon, May 23, 2011 at 7:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: vicky b [mailto:vickyb2...@gmail.com] Subject: Re: GC algorithm then why do i see a difference in behaviour for tomcat 6 and tomcat 7 when i undeploy my app the objects that are collected in tomcat6 are not collected in tomcat7? Because the objects are no longer reachable in your Tomcat 6 environment but are in Tomcat 7. Nothing to do with the GC algorithm employed. Analyze the heap and find out what references to the objects of interest are still around. - 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 -- *Thanks Regards Vickyb *
RE: GC algorithm
From: vicky b [mailto:vickyb2...@gmail.com] Subject: Re: GC algorithm why the difference. To repeat myself: Because the objects are no longer reachable in your Tomcat 6 environment but are in Tomcat 7. Nothing to do with the GC algorithm employed. Analyze the heap and find out what references to the objects of interest are still around. Do the heap analysis. - 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: Pointers for Filter to Deny New Sessions
From: Jonathan Rosenberg [mailto:shmol...@gmail.com] Subject: Pointers for Filter to Deny New Sessions I'm a novice with Tomcat filters, so am looking for some useful pointers for this. Start here: http://www.tuckey.org/urlrewrite/ It may not do everything you need out of the box, but you can always modify it or add your own filter to run with this one. - 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: difference in behaviour of tomcat 6 and tomcat 7 very imp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vicky, On 5/23/2011 9:42 AM, vicky b wrote: I have done analysis on static references and found a interesting point al;so i find a difference in behaviour in tomcat 6 andtomcat 7 Um, okay. I created a class (TestStatic) which has a static reference to VO(java bean) in my servlet i declared TestStatic as member variable and initialized it there Let's see that mess of language above shown in code, shall we? public class VO { String name; public String getName() { return name;} public void setName(String name) { this.name = name;} } No code for a servlet called TestStatic was included. Assuming you aren't being very careful to document a problem that relies on very detailed information, let's move-on with the code you *did* post. Your servlet has a reference to TestEnum, not VO, but let's just keep rollin'. I've removed some of the code that doesn't affect usage of these classes, etc. *public* *class* TestEnum { *private* BeanName name; *private* *static* VO vo = *new* VO(); }} *public* *class* Leak *extends* HttpServlet { TestEnum a = *new* TestEnum(); } So, after undeploy, TestEnum.vo remains reachable? It's possible that you have another leak that is causing the WebappClassLoader to remain in memory, which will prevent your webapp's java.lang.Class objects from being collected by the GC. In that case, the static members will also remain in memory. As suggested in another thread, you might want to look at a memory profiler to see what is keeping your webapp's classes in memory. Yes, things have changed from Tomcat 6 to Tomcat 7, but none of them affect the JVM's GC algorithm(s). Recent Tomcat 6 and all Tomcat 7 releases include some speculative leak-prevention strategies that can help reduce ClassLoader-pinning leaks that are out of your webapp's control, so it's possible that's affecting your observations. so what can be concluded static references are never garbage collected ? or even objects holding static references are not GC'ed. Something tells me it's more complicated than that. In tomcat static refrence are getting garbage collected but in weblogic it is not can any body help If that's the case, I suspect Tomcat's leak-prevention code is helping you out. You're welcome to read the code: it's quite straightforward. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3azOEACgkQ9CaO5/Lv0PAxbgCeOrmCQlN/t1tgsTjHIeM1LtOQ Z0QAmwZzzfAPqzRbEqpp7R6DDW41XLKC =ZWjs -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SLL Certificate Chain
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To whom it may concern, On 5/23/2011 4:53 AM, Dipl.-Ing. Mag. Bernhard Hobiger wrote: I am running Tomcat 6.0.18 64bit on Windows Server 2008 R2 Enterprise. I obtained a certificate for my server from StartCom, installed it and configured the Connector. The server, intermediate and root certificates are in a keystore file. So far all went fine, except for one problem: Tomcat sends only the server certificate, not the whole certificate chain. This means that Firefox (all newer versions) thinks the certificate is invalid. I tried to import the StartCom certificates into the default keystore cacerts, no difference. The problem is not that Tomcat cant validate the certificate, but that the intermediate certificate is not sent (verified with Wireshark). I haven't done much work with SSL certs in Java, but I wonder what would happen if you imported all of the certs, together, into a single alias in your cert store. Have you tried that, or did you import each cert (yours, intermediate, etc.) into separate certs within the cert store? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3azXsACgkQ9CaO5/Lv0PAi/gCgrrgCcDCHueT7EMNRR0jlL4JM 6A4AmwRnCsI6TLCGAkvjxuIj0C0vQhZz =9NOA -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 get early notification of the upcoming release
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 5/23/2011 8:27 AM, Mark Thomas wrote: However, depending on what those custom changes are, one option is to propose the changes for inclusion in Tomcat so you no longer need to merge them in. +1 - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3azeEACgkQ9CaO5/Lv0PAvPACfaozzpZotAP/hbCX6C9UYnBW4 z9sAn2ga/oJuVhMm4kyLUDCVVK18yeGs =EvQ8 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.ClassNotFoundException - JSP pages
On 23/05/2011 14:10, Tom Wolf wrote: If anyone has any tips, I'll appreciate it. Precompile the JSPs and build a WAR file, deploy that instead. p signature.asc Description: OpenPGP digital signature
Tomcat latency
Hello: I have a problem where a simple wget call to docs/config/valve.html can sometimes take up to 15 seconds to process. I have a script that does a wget call to valve.html every 5 seconds. Most of the time it's fast. However, today in the past 6 hours I had 13 cases where it took over 3 seconds for wget to return valve.html. This is happening across 7 servers pretty consistently and I can't figure out why. Any suggestions to help me narrow down the problem? I'm going to modify the script to check disk i/o and load when the problem happens. Normally these numbers are sane with upwards of ~60% disk utilization load of ~2. Dual processor Intel(R) Xeon(R) CPU X5680 @ 3.33GHz. The stats right now. top - 22:42:34 up 26 days, 7:17, 1 user, load average: 1.64, 1.31, 1.03 Tasks: 115 total, 1 running, 114 sleeping, 0 stopped, 0 zombie Cpu(s): 11.7%us, 1.1%sy, 0.0%ni, 56.3%id, 30.7%wa, 0.0%hi, 0.2%si, 0.0%st Mem: 8197432k total, 8146536k used,50896k free, 3212k buffers Swap: 18723708k total, 397296k used, 18326412k free, 683448k cached iostat -xd Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sda 4.2229.23 77.111.75 1833.10 247.79 26.39 1.04 13.16 5.60 44.20 sdb 0.00 0.000.000.00 0.00 0.00 39.37 0.002.83 2.39 0.00 Ubuntu 9.10 /opt/tomcat6/bin/version.sh Using CATALINA_BASE: /opt/tomcat6 Using CATALINA_HOME: /opt/tomcat6 Using CATALINA_TMPDIR: /opt/tomcat6/temp Using JRE_HOME: /usr/lib/jvm/java-6-sun/jre Server version: Apache Tomcat/6.0.20 Server built: May 14 2009 01:13:50 Server number: 6.0.20.0 OS Name:Linux OS Version: 2.6.31-14-server Architecture: amd64 JVM Version:1.6.0_22-b04 JVM Vendor: Sun Microsystems Inc. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SLL Certificate Chain
On 05/23/2011 04:53 AM, Dipl.-Ing. Mag. Bernhard Hobiger wrote: Hi, I am running Tomcat 6.0.18 64bit on Windows Server 2008 R2 Enterprise. I obtained a certificate for my server from StartCom, installed it and configured the Connector. The server, intermediate and root certificates are in a keystore file. So far all went fine, except for one problem: Tomcat sends only the server certificate, not the whole certificate chain. This means that Firefox (all newer versions) thinks the certificate is invalid. I tried to import the StartCom certificates into the default keystore cacerts, no difference. The problem is not that Tomcat cant validate the certificate, but that the intermediate certificate is not sent (verified with Wireshark). I tried to set all entries in logging.properties to ALL, but I dont get anything in my logs. Has anyone encountered the same behaviour? server.xml: Connector protocol=org.apache.coyote.http11.Http11Protocol port=443 SSLEnabled=true maxThreads=150 scheme=https secure=true keystoreFile=C:\Program Files\Apache Software Foundation\Tomcat 6.0\tomcat.keystore keystorePass=... keyAlias=intern clientAuth=false sslProtocol=TLS / keytool -list -keystore tomcat.keystore: Keystore-Typ: JKS Keystore-Provider: SUN Ihr Keystore enthält 3 Einträge. startcom.ca.sub, 23.05.2011, trustedCertEntry, Zertifikatsfingerabdruck (MD5): 4F:9B:88:B0:78:F3:16:9F:19:DC:F1:A3:8A:50:DD:82 startcom.ca, 23.05.2011, trustedCertEntry, Zertifikatsfingerabdruck (MD5): 22:4D:8F:8A:FC:F7:35:C2:BB:57:34:90:7B:8B:22:16 intern, 23.05.2011, PrivateKeyEntry, Zertifikatsfingerabdruck (MD5): 30:93:DB:AD:5A:DB:76:00:49:EC:EA:0F:4B:9E:C3:3C keytool -list -v -keystore tomcat.keystore: (output shortened) Keystore-Typ: JKS Keystore-Provider: SUN Ihr Keystore enthält 3 Einträge. Aliasname: startcom.ca.sub Erstellungsdatum: 23.05.2011 Eintragstyp: trustedCertEntry Eigner: CN=StartCom Class 2 Primary Intermediate Server CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Aussteller: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Seriennummer: b Gültig von: Wed Oct 24 22:57:08 CEST 2007 bis: Mon Oct 22 22:57:08 CEST 2012 Digitaler Fingerabdruck des Zertifikats: MD5: 4F:9B:88:B0:78:F3:16:9F:19:DC:F1:A3:8A:50:DD:82 SHA1: A9:C3:A1:41:78:DF:B2:B1:D1:94:1D:5E:3F:56:DA:FA:E2:E1:40:37 Unterschrift-Algorithmusname: SHA1withRSA Version: 3 ... *** *** Aliasname: startcom.ca Erstellungsdatum: 23.05.2011 Eintragstyp: trustedCertEntry Eigner: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Aussteller: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Seriennummer: 1 Gültig von: Sun Sep 17 21:46:36 CEST 2006 bis: Wed Sep 17 21:46:36 CEST 2036 Digitaler Fingerabdruck des Zertifikats: MD5: 22:4D:8F:8A:FC:F7:35:C2:BB:57:34:90:7B:8B:22:16 SHA1: 3E:2B:F7:F2:03:1B:96:F3:8C:E6:C4:D8:A8:5D:3E:2D:58:47:6A:0F Unterschrift-Algorithmusname: SHA1withRSA Version: 3 ... *** *** Aliasname: intern Erstellungsdatum: 23.05.2011 Eintragstyp: PrivateKeyEntry Zertifikatskettenlänge: 1 Zertifikat[1]: Eigner: EMAILADDRESS=postmas...@htl-klu.atmailto:EMAILADDRESS=postmas...@htl-klu.at, CN=intern.htl-klu.at, OU=StartCom Verified Certificate Member, O=Bernhard Hobiger, L=Klagenfurt, ST=Karnten, C=AT, OID.2.5.4.13=165616-YmmhPnif68b3zfKu Aussteller: CN=StartCom Class 2 Primary Intermediate Server CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Seriennummer: 1a3d Gültig von: Thu Mar 18 09:26:36 CET 2010 bis: Mon Mar 19 00:20:28 CET 2012 Digitaler Fingerabdruck des Zertifikats: MD5: 30:93:DB:AD:5A:DB:76:00:49:EC:EA:0F:4B:9E:C3:3C SHA1: AD:21:D5:1B:83:BB:DF:A7:61:BA:BD:E0:F9:7A:13:8B:F9:EF:8A:CC Unterschrift-Algorithmusname: SHA1withRSA Version: 3 ... *** *** Hello, Please take notice at the following lines in your output... My German(?) isn't all that good, but I see this, Zertifikatskettenlänge: 1, which I know in English should read something to the affect of... 'Certificate Chain Length' This is why Tomcat (JSSE) is only serving up the one certificate (depth 0) and when I see this output, it would appear the '-trustcacerts' flag was not used when importing the certificate(s). See this page for reference [ http://download.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html ] Here's also a blog posting from a fellow StartCom customer. http://magictrevor.wordpress.com/2011/01/26/startssl-startcom-certificates-and-tomcat/ I hope this helps! --Crypto.Sal