Re: logjam attacks in tomcat 7
Configuration like mentioned below should be able to resolve your issue: Srikanth Hugar www.gharki.com On Thu, Oct 1, 2015 at 10:22 AM, Rahul Singh <rksing...@hotmail.com> wrote: > Dear Tomcat Support Team,Thanks for your continuous support. > In our Application Tomcat V 7.0.54 is used. We are facing the problem of > "Server has a weak, ephemeral Diffie-Hellman public key > ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY" > In chrome browser. > Tomcat server .xml have following configuration, which does not contain > chipher, it means it used default cipher. > port="8585" minSpareThreads="5"enableLookups="true" > redirectPort="8282"acceptCount="32" > connectionTimeout="6"/> SSLEnabled="true"enableLookups="true" > acceptCount="32" scheme="https" secure="true" > clientAuth="false" sslEnabledProtocols="TLSv1.2" > > algorithm="SunX509"/> > Underline JAVA is : OpenJDK Runtime Environment (rhel-2.5.5.3.el6-x86_64 > u79-b14) > So could ypu please assist me to understand the following things. > 1- What value of default cipher is using in My application.2- Does it > require to update for working with lates Browser chrome and fixing the > "Diffie-Hellman" security issue. > Regards,Rahul kumar Singh
Re: Tomcat 7 - Organizing web applications into sub directories
Thank you Andre! Your solution was very helpful! On Wed, Aug 26, 2015 at 10:26 AM, André Warnier <a...@ice-sa.com> wrote: > On 26.08.2015 06:06, Srikanth Challa wrote: > >> I am trying to organize my applications (multiple) into a specific >> hierarchy under the webapps folder. >> Something like this - >> webapps >> dev >>app1 >>app2 >> test >>app1 >>app3 >> >> When deploying (without WAR), I am getting a 404 error for servlets. Tried >> changing the web.xml servlet mapping, still no luck. It works perfectly >> when the folder is moved directly under webapps like below - >> webapps >> app1 >> >> Does tomcat have a limitation on organizing webapps under multiple levels >> of folders (under the webapp directory)? >> >> > Hi. > Without getting too technical : > It is not a limitation of Tomcat. There /are/ ways of doing what you > indicate above. But the problem is that if you do that, you are going > against the "natural" way in which URLs are mapped to web-applications, and > that will force you further down the line, to do ever more complicated > things to keep this working correctly (for example, if you want to easily > move an application between the "dev" and the "test" areas above). > > To map URLs to web-applications, Tomcat is following the basic principles > outlined in the Servlet Specification 3.0, for example this : > > -- quote -- > 10.5 Directory Structure > A Web application exists as a structured hierarchy of directories. The > root of this > hierarchy serves as the document root for files that are part of the > application. For > example, for a Web application with the context path /catalog in a Web > container, > the index.html file at the base of the Web application hierarchy or in a > JAR file > inside WEB-INF/lib that includes the index.html under META-INF/resources > directory can be served to satisfy a request from /catalog/index.html. > -- unquote -- > > (re: http://tomcat.apache.org/tomcat-8.0-doc/appdev/deployment.html) > > For Tomcat, the "root" for all the applications within a specified , > is the directory which is indicated by the "appBase" attribute of the > corresponding tag. > Like this : >unpackWARs="true" autoDeploy="true"> > > and then under "(/somepath/)webapps/" you would have something like this : > > (/somepath/)webapps/ >app1 > app1-sub1 > app1-sub2 >app2 > app2-sub1 > app2-sub2 > etc.. > > This makes it clear to Tomcat that "app1" and "app2" are the distinct > web-applications (also known as "context"), corresponding respectively to > URLs such as : > http://yourhost:port/app1 > http://yourhost:port/app2 > and that the subdirectories "app1-sub1", "app1-sub2" etc.. are internal > sub-divisions of these "app1" and "app2" web-applications, helping to map > longer URLs to "things" inside these application (such as servlets, JSP > pages, HTML pages etc.) (these further sub-mappings being described in the > web.xml file of each web-application). > > If you want to go against this "natural" interpretation of the directory > structure by Tomcat, then you have to start telling Tomcat (in various > places), that "app1/app1-sub1" is one application, and "app1/app1-sub2" is > a different application etc.., which complicates things for you (for > example, you'd have to name a WAR file like "app1#app1-sub1.war"). (And > also, since it is not the "natural way", it will confuse orther people). > > A more practical way of achieving what you want, would probably be to > define 2 distinct 's, like this (in server.xml) : > > unpackWARs="true" autoDeploy="true"> > ... > > > unpackWARs="true" autoDeploy="true"> > ... > > > (and of course, both "mydevhost" and "mytesthost" map to the same IP > address (in DNS)). > > and then have a directory structure like this : > > webapps-dev/ >app1 >app2 > > webapps-test/ >app1 >app2 >app3 > > corresponding to URLs like : > http://mydevhost:port/app1 (maps to /somepath/webapps-dev/app1) > http://mytesthost:port/app1 (maps to /somepath/webapps-test/app1) > etc.. > > This way, the internal configuration and content of "app1" can be exactly > the same for "dev" and "test", and you can move an application between the > 2 Hosts (or anywhwere else, such as to another machine) without having to > make any change at all inside the application or its configuration. > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- *-* Srikanth Challa Founder, CEO Enterprise Atlas Inc. srika...@enterpriseatlas.com +1 (510) 402-6212
Tomcat 7 - Organizing web applications into sub directories
I am trying to organize my applications (multiple) into a specific hierarchy under the webapps folder. Something like this - webapps dev app1 app2 test app1 app3 When deploying (without WAR), I am getting a 404 error for servlets. Tried changing the web.xml servlet mapping, still no luck. It works perfectly when the folder is moved directly under webapps like below - webapps app1 Does tomcat have a limitation on organizing webapps under multiple levels of folders (under the webapp directory)? -- *-* Srikanth Challa Founder, CEO Enterprise Atlas Inc. srika...@enterpriseatlas.com +1 (510) 402-6212
JSp dynamic include in tomcat 8.0.15
When i include jsp:include page=/WEB-INF//countries.jsp / It does not work in tomcat 8.0.15. and my included jsp file contents are something like : div class=txt form:select path=country form:option value=US label=US - UNITED STATES OF AMERICA / ... /form:select /div What could be the problem?
Static files with default servlet in tomcat 8.0.9
Hello, I am trying to configure static files with default servlet in tomcat 8.0.9 but could not succeed. My directory structure in deployed webapp is: - WEB-INF - static -css -images -js - META-INF and* web.xml* configuration using default servlet is : !-- static URLs -- servlet-mapping servlet-namedefault/servlet-name url-pattern/res/*/url-pattern /servlet-mapping But when i make request from my page with URL it fails with 404. http://SUB.DOMAIN.COM/myapp/*res/static/*js/imports/jquerymin.js What could be the problem? How can i make it work? I tried to find information from web, but could not help. Thanks.
Re: [OT] minIdle not being enforced and connections are getting closed instead of returning to the pool
Hi Chris, We are creating oracle.sql.ARRAY objects in our application using the below piece of code. ArrayDescriptor varArrayDesc = ArrayDescriptor.createDescriptor(ARRAY_XYZ, connection); ARRAY xyzArray = new ARRAY(ArrayDescriptor paramArrayDescriptor, Connection paramConnection, Object paramObject); When we passed the proxy connection returned from the pool, we were getting class cast exceptions as internally jdbc driver (ojdbc6.jar in my case) is somewhere trying cast the proxy connection to oracle.jdbc.OracleConnection. That's the reason we were unwrapping the connections. Thanks Srikanth On Fri, Nov 15, 2013 at 7:29 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Srikanth, On 11/15/13, 2:36 AM, Srikanth wrote: I was unwrapping each connection before returning it using the below piece of code. con = ds.getConnection().unwrap(oracle.jdbc.OracleConnection.*class*); *return* con; As explained by you, this is where the problem was. That will definitely do it. You end up closing the underlying connection to the DB and never returning the real object to the pool (unless you are managing the relationship between pooled-connections and unwrapped-connections). I needed a OracleConnection in some parts of my application as I was creating ArrayDescriptor, which failed when I passed the proxy Connection. I have yet to see a use case where downcasting to Oracle's Connection is truly required. What can't you do with the JDBC API? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.15 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJShijSAAoJEBzwKT+lPKRYpmgP/0mQ667wWM8RvdCK+/YOafO4 Xb3o8B2/cfnIRohoAnQPeLnq0O6eP7xlAG+GNi8cB3iS3EilJY9YqwCrIAaFML82 cR095yVUgR69oiL6oZFwR6UrONzf6ow7vu0QkQhm8MqFQKrvso21Q96A8ypdPizg M7TPVfKYGTeD5Ug3SGMkCIPfLOHE+rDdqggKX7eaIf+2kh4yTufHzjXSRu2xSvwE 8Qf1nByMMXjnD8OJ02Td2tgMR6FG4drICCjJdZPpdM1LRmTmz3NqRd8ZiXJDd7vC Bng/u/+N3pMoP1XrYguhRI+Riskr1rKHXB2e2ldszqGP1CiyG/1RVeRwAKLoYzZp gv63e7FPtw6MXpPYL/ToACOecxqTPJmVGhmR9JPTxHOcyigQ1IRt4xgUbzqPK0MO raI90wIPO5LspR/ToptrS8KzZQwOLDEsT33G4UUzyFiYqqX0ZtLoIqB5KKMITphW JCUehv3fzIyd4A5vdBGoRtN+GXKgHrIgrC7la2WPScFc5TtxF82hV79ntZwY18Nw JEp7AFJFnzUctWzsSuAzK46+4moUfN3x0j+hUE2OfjL3NUDg+5cyqdiAc/OuEiZD d4WFIO8CqLIivH3eNY88phtyF6s3wRMMeinaL4dRz036/xU6EUrAsp1DN+Z4iUKR wrtS2cBs0ZWjl7f1mBjN =KEnf -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: minIdle not being enforced and connections are getting closed instead of returning to the pool
Hi Daniel, Thank you very much for responding to the query. How do you know it is creating a new connection? Are you monitoring the number of active / idle connections in the pool? What numbers do you see? Actually I was logging the time taken to get the Connection from pool and it was taking around 2300 milli seconds to get connection from pool after *initialSize* connections(10) are retrieved. I checked it for around 100 fetches in a span of 5 minutes as my *timeBetweenEvictionRunsMillis* was 60 and after each run of evictor thread *minIdle* should be validated. This is unlikely as the pool returns a proxy that wraps the actual connection. Unless you are specifically accessing the underlying JDBC connection, what you are indicating shouldn't happen. http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Getting_the_actual_JDBC_connection Do you have a code example of what you're doing? Yes, I was unwrapping each connection before returning it using the below piece of code. con = ds.getConnection().unwrap(oracle.jdbc.OracleConnection.*class*); *return* con; As explained by you, this is where the problem was. I needed a OracleConnection in some parts of my application as I was creating ArrayDescriptor, which failed when I passed the proxy Connection. Now I am unwrapping the proxy Connection only when required and calling *con.close()* on the Proxy returned from the pool, not on the unwrapped connection. This fixed my issue J. Once again thanks for the clarifying my doubts and helping me resolving my issue. Best Regards Srikanth R Patlolla On Wed, Nov 13, 2013 at 5:42 PM, Daniel Mikusa dmik...@gopivotal.comwrote: On Nov 13, 2013, at 4:01 AM, Srikanth gaadi...@gmail.com wrote: Hi, I am using the below configuration for creating a datasource in Tomcat 7.0.42. And the backend database is Oracle 10g. Resource name=jdbc/crd auth=Container type=javax.sql.DataSource factory=org.apache.tomcat.jdbc.pool.DataSourceFactory driverClassName=oracle.jdbc.driver.OracleDriver username= password= url=jdbc:oracle:thin:@:: initialSize=10 minIdle=20 maxIdle=40 maxActive=100 maxWait=6 validationQuery=SELECT 1 FROM DUAL validationInterval=30 testOnBorrow=true testOnReturn=true testWhileIdle=true minEvictableIdleTimeMillis=180 timeBetweenEvictionRunsMillis=6 removeAbandoned=true removeAbandonedTimeout=600 logAbandoned=true jmxEnabled=true jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState; org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer; org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReportJmx(threshold=1) /Resource Now the problem is whenever I try to get a connection from pool, it is creating a new connection and returning back. How do you know it is creating a new connection? Are you monitoring the number of active / idle connections in the pool? What numbers do you see? minIdle connections are not maintained in the pool minIdle is only enforced if you have more than minIdle connections in the pool. For example, if you have 10 connections idle in the pool and minIdle is 20, the idle check will not run. If you have 30 connections idle in the pool and minIdle is 20 then the idle check will run. In addition, the idle check will only remove idle connections from the pool. It will not add connections to the pool. and when I call con.close(), the connections are getting closed instead of returning to the pool (closing the connection in finally block by passing con object to a different method) This is unlikely as the pool returns a proxy that wraps the actual connection. Unless you are specifically accessing the underlying JDBC connection, what you are indicating shouldn't happen. http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Getting_the_actual_JDBC_connection Do you have a code example of what you're doing? Getting connection is taking considerable amount of time in my application, so I need the tomcat server to maintain the idle connections at any point of time. Again, how do you know it is not maintaining idle connections. Do you see any messages in the logs? Dan Kindly help me resolve the issue. Thanks Srikanth - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
minIdle not being enforced and connections are getting closed instead of returning to the pool
Hi, I am using the below configuration for creating a datasource in Tomcat 7.0.42. And the backend database is Oracle 10g. Resource name=jdbc/crd auth=Container type=javax.sql.DataSource factory=org.apache.tomcat.jdbc.pool.DataSourceFactory driverClassName=oracle.jdbc.driver.OracleDriver username= password= url=jdbc:oracle:thin:@:: initialSize=10 minIdle=20 maxIdle=40 maxActive=100 maxWait=6 validationQuery=SELECT 1 FROM DUAL validationInterval=30 testOnBorrow=true testOnReturn=true testWhileIdle=true minEvictableIdleTimeMillis=180 timeBetweenEvictionRunsMillis=6 removeAbandoned=true removeAbandonedTimeout=600 logAbandoned=true jmxEnabled=true jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState; org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer; org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReportJmx(threshold=1) /Resource Now the problem is whenever I try to get a connection from pool, it is creating a new connection and returning back. minIdle connections are not maintained in the pool and when I call con.close(), the connections are getting closed instead of returning to the pool (closing the connection in finally block by passing con object to a different method) Getting connection is taking considerable amount of time in my application, so I need the tomcat server to maintain the idle connections at any point of time. Kindly help me resolve the issue. Thanks Srikanth
Order of webapps startup
As per the Wiki at http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q27 --- What order do webapps start (or how can I change startup order)? There is no expected startup order. Neither the Servlet spec nor Tomcat define one. You can't rely on the apps starting in any particular order. --- Wondering if there is anything changed in 7.x? If not, how in general it is addressed if one webapp depends on another webapp to be available. Thanks Srikanth - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
On 12/17/10 3:01 AM, Pid wrote: On 15/12/2010 15:37, Srikanth Konjarla wrote: On 12/15/10 7:13 AM, Pid wrote: On 15/12/2010 02:40, Srikanth Konjarla wrote: I could catch Axis threadlocals from the app to clean up. However, I have a question wrt following tomcat's log at the time of undeploy of app. The message suggests that it is removing the same threadlocal twice. Is it because it was not removed in the first attempt? - ec 15, 2010 1:05:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@14213040]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@6ee3849c ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 15, 2010 1:05:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@14213040]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@6ee3849c ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. I don't think this is from Axis, does your code check other sources? Right. This is not from Axis. This is from one of the components of the app. I am wondering why the threalocal is not cleared at first time? Are you generically clearing all ThreadLocals, or just Axis related ones? I am clearing ThreadLocals pertaining to Axis. Also, clearing all threadlocals from context listener during destroy process of the webapp. Or is it one each for threadLocals and inheritedthreadLocals? Yes, you need to clear them separately. Right. The code mimics tomcat's cleaning process that exists in WebappClassLoader class. Srikanth p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
On 12/15/10 7:13 AM, Pid wrote: On 15/12/2010 02:40, Srikanth Konjarla wrote: I could catch Axis threadlocals from the app to clean up. However, I have a question wrt following tomcat's log at the time of undeploy of app. The message suggests that it is removing the same threadlocal twice. Is it because it was not removed in the first attempt? - ec 15, 2010 1:05:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@14213040]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@6ee3849c ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 15, 2010 1:05:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@14213040]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@6ee3849c ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. I don't think this is from Axis, does your code check other sources? Right. This is not from Axis. This is from one of the components of the app. I am wondering why the threalocal is not cleared at first time? Or is it one each for threadLocals and inheritedthreadLocals? Srikanth p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
I could catch Axis threadlocals from the app to clean up. However, I have a question wrt following tomcat's log at the time of undeploy of app. The message suggests that it is removing the same threadlocal twice. Is it because it was not removed in the first attempt? - ec 15, 2010 1:05:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@14213040]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@6ee3849c ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 15, 2010 1:05:28 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@14213040]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@6ee3849c ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. On 12/13/10 4:23 AM, Pid wrote: On 12/12/2010 18:18, Srikanth Konjarla wrote: On 12/12/10 8:28 AM, Pid * wrote: On 11 Dec 2010, at 21:39, Srikanth Konjarla srikanth.konja...@gmail.com wrote: On Dec 11, 2010, at 1:04 PM, Pid * p...@pidster.com wrote: On 11 Dec 2010, at 20:02, Srikanth Konjarla srikanth.konja...@gmail.com wrote: Pid, Thanks for your patience. Here is the output from catalina.out file while the webapp is being undeployed. As you can see there are few threadLocals that are cleaned up. -- Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. The above means that something is storing the WebappClassLoader in a ThreadLocal. Is your app doing this? The two below I know about and I believe are defects in Axis 1.4. The only component that uses threadlocals in my app is Axis and I believe it is not cleaning up after completely. I agree. Originally, I have started on tracking down Axis threads that are responsible. In this case, Axis is performing webservice client operations. Then you are also seeing an additional problem - namely that the classloader itself is being stored in a threadlocal. I haven't seen Axis do that so far. You are correct. I think it is Spring framework (also used in the application) that is storing classloader in threadlocal. Which version of Spring Framework are you using and how do you arrive at that conclusion? Are you using any other libraries and if so, which exact versions are you using? BTW, do you have any suggestions on where/how to track Axis threads so that I can clean them up from my app? I'm still looking into it - but I'll post here when I've got an answer. p Thanks Srikanth You may need to use a newer version of Axis - I don't think v1 is expected to do any more releases. p Srikanth p Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.unsyncbytearrayoutputstrea...@775d1479]) and a value of type [byte[]] (value [...@5faeed4]) but failed
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
On 12/12/10 8:28 AM, Pid * wrote: On 11 Dec 2010, at 21:39, Srikanth Konjarla srikanth.konja...@gmail.com wrote: On Dec 11, 2010, at 1:04 PM, Pid * p...@pidster.com wrote: On 11 Dec 2010, at 20:02, Srikanth Konjarla srikanth.konja...@gmail.com wrote: Pid, Thanks for your patience. Here is the output from catalina.out file while the webapp is being undeployed. As you can see there are few threadLocals that are cleaned up. -- Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. The above means that something is storing the WebappClassLoader in a ThreadLocal. Is your app doing this? The two below I know about and I believe are defects in Axis 1.4. The only component that uses threadlocals in my app is Axis and I believe it is not cleaning up after completely. I agree. Originally, I have started on tracking down Axis threads that are responsible. In this case, Axis is performing webservice client operations. Then you are also seeing an additional problem - namely that the classloader itself is being stored in a threadlocal. I haven't seen Axis do that so far. You are correct. I think it is Spring framework (also used in the application) that is storing classloader in threadlocal. BTW, do you have any suggestions on where/how to track Axis threads so that I can clean them up from my app? Thanks Srikanth You may need to use a newer version of Axis - I don't think v1 is expected to do any more releases. p Srikanth p Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.unsyncbytearrayoutputstrea...@775d1479]) and a value of type [byte[]] (value [...@5faeed4]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.xmlutils$threadlocaldocumentbuil...@3a0ee334]) and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value [org.apache.xerces.jaxp.documentbuilderi...@61583db6]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Srikanth On 12/11/10 2:26 AM, Pid wrote: On 12/11/10 9:25 AM, Srikanth Konjarla wrote: On Dec 11, 2010, at 1:18 AM, Pid * p...@pidster.com wrote: On 11 Dec 2010, at 01:07, Srikanth Konjarla srikanth.konja...@gmail.com wrote: BTW, I see some similarities with the following. https://jira.springframework.org/browse/SWS-533 Similarities in which sense? The issue was closed as invalid. The similarity is that the thread is retained. This is not a problem. The threads exist in a pool and are reused. Chuck explained why the WAIT status isn't a problem. However, other than the case is invalid it does not provide detail why it is invalid and why the thread is in WAIT state. Yes, it does. It also refers to JAXB, not Axis. So it's unrelated to your problem. If the thread is reused by tomcat, what happened to the references from previous cycle. Which references? The ThreadLocals? If a ThreadLocal is created by an application, but not cleaned up, the thread still contains the reference in the internal map of ThreadLocals. If the reference is to a class from a webapp which is subsequently unloaded, then the classloader
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
On Dec 11, 2010, at 1:18 AM, Pid * p...@pidster.com wrote: On 11 Dec 2010, at 01:07, Srikanth Konjarla srikanth.konja...@gmail.com wrote: BTW, I see some similarities with the following. https://jira.springframework.org/browse/SWS-533 Similarities in which sense? The issue was closed as invalid. The similarity is that the thread is retained. However, other than the case is invalid it does not provide detail why it is invalid and why the thread is in WAIT state. If the thread is reused by tomcat, what happened to the references from previous cycle. I would be interested in learning. You're using Axis 1.4 which I've been looking at recently, because I believe it causes a leak. I believe the same but wanted to make sure that leaking threads are captured and cleaned during the undeploy process. Additionally, I was wondering how I can detect and locate runaway Axis threads with thread locals. Please post the warnings from your logs so I can see of it's the same problem. Will do. Srikanth p Srikanth On 12/10/10 3:41 PM, Caldarale, Charles R wrote: From: Srikanth Konjarla [mailto:srikanth.konja...@gmail.com] Subject: Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor) as part of the thread local cleanup process at the time of undeploy, tomcat removes few threadLocals but misses the threadLocals for the thread in question. I am wondering about the tomcat thread still being in WAIT mode and been cleaned up. The WAIT mode is normal - the thread is sitting in the pool, waiting for a request to show up. I believe the ThreadLocal objects are discarded by letting such infected threads exit and creating new ones. That's an area still undergoing refinement, so you might want to try moving up to 6.0.29 and see if it makes any difference. Or try sending in enough concurrent requests to get all the threads busy and see if the references disappear after 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 - 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
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
Pid, Thanks for your patience. Here is the output from catalina.out file while the webapp is being undeployed. As you can see there are few threadLocals that are cleaned up. -- Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.unsyncbytearrayoutputstrea...@775d1479]) and a value of type [byte[]] (value [...@5faeed4]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.xmlutils$threadlocaldocumentbuil...@3a0ee334]) and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value [org.apache.xerces.jaxp.documentbuilderi...@61583db6]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Srikanth On 12/11/10 2:26 AM, Pid wrote: On 12/11/10 9:25 AM, Srikanth Konjarla wrote: On Dec 11, 2010, at 1:18 AM, Pid * p...@pidster.com wrote: On 11 Dec 2010, at 01:07, Srikanth Konjarla srikanth.konja...@gmail.com wrote: BTW, I see some similarities with the following. https://jira.springframework.org/browse/SWS-533 Similarities in which sense? The issue was closed as invalid. The similarity is that the thread is retained. This is not a problem. The threads exist in a pool and are reused. Chuck explained why the WAIT status isn't a problem. However, other than the case is invalid it does not provide detail why it is invalid and why the thread is in WAIT state. Yes, it does. It also refers to JAXB, not Axis. So it's unrelated to your problem. If the thread is reused by tomcat, what happened to the references from previous cycle. Which references? The ThreadLocals? If a ThreadLocal is created by an application, but not cleaned up, the thread still contains the reference in the internal map of ThreadLocals. If the reference is to a class from a webapp which is subsequently unloaded, then the classloader will not be garbage collected. I would be interested in learning. PLEASE post the leak warnings from your logs. p You're using Axis 1.4 which I've been looking at recently, because I believe it causes a leak. I believe the same but wanted to make sure that leaking threads are captured and cleaned during the undeploy process. Additionally, I was wondering how I can detect and locate runaway Axis threads with thread locals. Please post the warnings from your logs so I can see of it's the same problem. Will do. Srikanth p Srikanth On 12/10/10 3:41 PM, Caldarale, Charles R wrote: From: Srikanth Konjarla [mailto:srikanth.konja...@gmail.com] Subject: Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor) as part of the thread local cleanup process at the time of undeploy, tomcat removes few threadLocals but misses the threadLocals for the thread in question. I am wondering about the tomcat thread still being in WAIT mode and been cleaned up. The WAIT mode is normal - the thread is sitting in the pool, waiting for a request to show up. I believe the ThreadLocal objects are discarded by letting such infected threads exit and creating new ones. That's an area still undergoing refinement, so you might want to try moving up
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
On Dec 11, 2010, at 1:04 PM, Pid * p...@pidster.com wrote: On 11 Dec 2010, at 20:02, Srikanth Konjarla srikanth.konja...@gmail.com wrote: Pid, Thanks for your patience. Here is the output from catalina.out file while the webapp is being undeployed. As you can see there are few threadLocals that are cleaned up. -- Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. The above means that something is storing the WebappClassLoader in a ThreadLocal. Is your app doing this? The two below I know about and I believe are defects in Axis 1.4. The only component that uses threadlocals in my app is Axis and I believe it is not cleaning up after completely. Originally, I have started on tracking down Axis threads that are responsible. In this case, Axis is performing webservice client operations. Srikanth p Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a value of type [org.apache.catalina.loader.WebappClassLoader] (value [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ -- Parent Classloader: org.apache.catalina.loader.standardclassloa...@1eb3319f ]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.unsyncbytearrayoutputstrea...@775d1479]) and a value of type [byte[]] (value [...@5faeed4]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.xmlutils$threadlocaldocumentbuil...@3a0ee334]) and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value [org.apache.xerces.jaxp.documentbuilderi...@61583db6]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Srikanth On 12/11/10 2:26 AM, Pid wrote: On 12/11/10 9:25 AM, Srikanth Konjarla wrote: On Dec 11, 2010, at 1:18 AM, Pid * p...@pidster.com wrote: On 11 Dec 2010, at 01:07, Srikanth Konjarla srikanth.konja...@gmail.com wrote: BTW, I see some similarities with the following. https://jira.springframework.org/browse/SWS-533 Similarities in which sense? The issue was closed as invalid. The similarity is that the thread is retained. This is not a problem. The threads exist in a pool and are reused. Chuck explained why the WAIT status isn't a problem. However, other than the case is invalid it does not provide detail why it is invalid and why the thread is in WAIT state. Yes, it does. It also refers to JAXB, not Axis. So it's unrelated to your problem. If the thread is reused by tomcat, what happened to the references from previous cycle. Which references? The ThreadLocals? If a ThreadLocal is created by an application, but not cleaned up, the thread still contains the reference in the internal map of ThreadLocals. If the reference is to a class from a webapp which is subsequently unloaded, then the classloader will not be garbage collected. I would be interested in learning. PLEASE post the leak warnings from your logs. p You're using Axis 1.4 which I've been looking at recently, because I believe it causes a leak. I believe the same but wanted to make sure that leaking threads are captured and cleaned during the undeploy process. Additionally, I was wondering how I can detect and locate runaway Axis threads with thread locals. Please post the warnings from your logs so I can see of it's the same problem. Will do. Srikanth p Srikanth On 12/10/10 3:41 PM, Caldarale, Charles R wrote: From: Srikanth
6.0.26 java.lang.Thread.State: WAITING (on object monitor)
All, I have a webservice client in the webapp. When the webapp is undeployed the classloader has not been GC'ed. Upon investigation it is found that a thread is in WAIT state which has references to the webapp class loader. I see the following from heap dump. http-8080-2 at java.lang.Object.wait(J)V (Native Method) at java.lang.Object.wait()V (Object.java:485) at org.apache.tomcat.util.net.JIoEndpoint$Worker.await()Ljava/net/Socket; (JIoEndpoint.java:458) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V (JIoEndpoint.java:484) at java.lang.Thread.run()V (Unknown Source) This is a pure development instance used by only a single user. Hence, I have configured the Connector with minSpareThreads=2. If the thread is retained by tomcat to reuse for another request, then wondering why would it not remove references to other objects. Essentially, the thread has threadLocals object that has few references. Version details of tomcat: Server version: Apache Tomcat/6.0.26 Server built: March 9 2010 1805 Server number: 6.0.26.0 OS Name:Linux OS Version: 2.6.18-164.15.1.el5 Architecture: amd64 JVM Version:1.6.0_18-b07 JVM Vendor: Sun Microsystems Inc. Thanks Srikanth - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
Chuck, You are right. It is apache Axis client that is responsible for threadLocals in this case. However, as part of the thread local cleanup process at the time of undeploy, tomcat removes few threadLocals but misses the threadLocals for the thread in question. I am wondering about the tomcat thread still being in WAIT mode and been cleaned up. Srikanth On 12/10/10 2:36 PM, Caldarale, Charles R wrote: From: Srikanth Konjarla [mailto:srikanth.konja...@gmail.com] Subject: 6.0.26 java.lang.Thread.State: WAITING (on object monitor) Essentially, the thread has threadLocals object that has few references. And who put the ThreadLocal there? (Hint: it wasn't Tomcat; your webapp - or a library it's using - is behaving badly, and not cleaning up after itself.) - 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
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
On 12/10/10 3:41 PM, Caldarale, Charles R wrote: From: Srikanth Konjarla [mailto:srikanth.konja...@gmail.com] Subject: Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor) as part of the thread local cleanup process at the time of undeploy, tomcat removes few threadLocals but misses the threadLocals for the thread in question. I am wondering about the tomcat thread still being in WAIT mode and been cleaned up. The WAIT mode is normal - the thread is sitting in the pool, waiting for a request to show up. Does it mean that the thread is actually released to serve next request? As in thread is recycled for reuse? What happens to data that was referenced during the previous cycle? I believe the ThreadLocal objects are discarded by letting such infected threads exit and creating new ones. I was thinking on the same lines. As I have mentioned earlier, I see few messages in catalina log to the effect that threadLocals are forcibly removed. I was initially embarked on finding out Axis related threads that are leaking by checking threads in destroy method of application but, could not catch the thread in question. That's an area still undergoing refinement, so you might want to try moving up to 6.0.29 and see if it makes any difference. Ok. Will try that. Thanks Srikanth Or try sending in enough concurrent requests to get all the threads busy and see if the references disappear after 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
On 12/10/10 4:11 PM, Pid * wrote: On 10 Dec 2010, at 22:46, Srikanth Konjarla srikanth.konja...@gmail.com wrote: Chuck, You are right. It is apache Axis client that is responsible for threadLocals in this case. However, as part of the thread local cleanup process at the time of undeploy, tomcat removes few threadLocals but misses the threadLocals for the thread in question. I am wondering about the tomcat thread still being in WAIT mode and been cleaned up. Please upgrade to the latest 6.0 release. Monitor your catalina logs on app unload, look for leak warnings. Will try that. Please report them and the version of Axis you're using here. Axis version is 1.4. Actually, the threadLocals in question are coming from Axis' MethodCache. Srikanth p Srikanth On 12/10/10 2:36 PM, Caldarale, Charles R wrote: From: Srikanth Konjarla [mailto:srikanth.konja...@gmail.com] Subject: 6.0.26 java.lang.Thread.State: WAITING (on object monitor) Essentially, the thread has threadLocals object that has few references. And who put the ThreadLocal there? (Hint: it wasn't Tomcat; your webapp - or a library it's using - is behaving badly, and not cleaning up after itself.) - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor)
BTW, I see some similarities with the following. https://jira.springframework.org/browse/SWS-533 Srikanth On 12/10/10 3:41 PM, Caldarale, Charles R wrote: From: Srikanth Konjarla [mailto:srikanth.konja...@gmail.com] Subject: Re: 6.0.26 java.lang.Thread.State: WAITING (on object monitor) as part of the thread local cleanup process at the time of undeploy, tomcat removes few threadLocals but misses the threadLocals for the thread in question. I am wondering about the tomcat thread still being in WAIT mode and been cleaned up. The WAIT mode is normal - the thread is sitting in the pool, waiting for a request to show up. I believe the ThreadLocal objects are discarded by letting such infected threads exit and creating new ones. That's an area still undergoing refinement, so you might want to try moving up to 6.0.29 and see if it makes any difference. Or try sending in enough concurrent requests to get all the threads busy and see if the references disappear after 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Unable to consume a secure web service from with in a JSP
Hi I figured the problem, the code I had for setting system properties was in the wrong place. I moved it to the constructor from main method (obviously that wont work, works only when run as standalone program) and it works now. Thanks -Original Message- From: Srikanth Madarapu Sent: Tuesday, May 16, 2006 3:43 PM To: Tomcat Users List Subject: Unable to consume a secure web service from with in a JSP Hi I am trying to consume a web service that is available on a secure web server (oracle app server). I have created a jsp and deployed under Tomcat 5.5.9. When I try to consume the web service I am getting the error below... Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: No trusted certificate found I know why this error is being generated, basically I need to supply the client certificate with the system properties, javax.net.ssl.trustStore and propertiesjavax.net.ssl.trustStorePassword. I have set them with the following statements in the JSP scriptlet and also in the proxy class that connects to the web service but neither of them work. System.setProperty( javax.net.ssl.trustStore, client.keystore ); System.setProperty( javax.net.ssl.trustStorePassword, changeit); If I run the proxy client as a standalone java program it works fine and I get the intended results from the web service. It would be greatly appreciated if somebody can tell me what am I missing. Thanks Srikanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Client certificate
Hi I am new to tomcat. I have a jsp that connects to a web service available on a secure server. I need to have the client certificate so I have set the following system properties. System.setProperty( javax.net.ssl.trustStore, C:/Tomcat 5.5/webapps/SSO/client.keystore ); System.setProperty( javax.net.ssl.trustStorePassword, changeit); But it doesn't work, can somebody help how to achieve this. Thanks Srikanth
RE: Client certificate
I am sorry forgot to mention the error message, the error I get is java.rmi.RemoteException: ; nested exception is: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: No trusted certificate found Thanks -Original Message- From: Srikanth Madarapu Sent: Tuesday, May 16, 2006 11:34 AM To: users@tomcat.apache.org Subject: Client certificate Hi I am new to tomcat. I have a jsp that connects to a web service available on a secure server. I need to have the client certificate so I have set the following system properties. System.setProperty( javax.net.ssl.trustStore, C:/Tomcat 5.5/webapps/SSO/client.keystore ); System.setProperty( javax.net.ssl.trustStorePassword, changeit); But it doesn't work, can somebody help how to achieve this. Thanks Srikanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to consume a secure web service from with in a JSP
Hi I am trying to consume a web service that is available on a secure web server (oracle app server). I have created a jsp and deployed under Tomcat 5.5.9. When I try to consume the web service I am getting the error below... Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: No trusted certificate found I know why this error is being generated, basically I need to supply the client certificate with the system properties, javax.net.ssl.trustStore and propertiesjavax.net.ssl.trustStorePassword. I have set them with the following statements in the JSP scriptlet and also in the proxy class that connects to the web service but neither of them work. System.setProperty( javax.net.ssl.trustStore, client.keystore ); System.setProperty( javax.net.ssl.trustStorePassword, changeit); If I run the proxy client as a standalone java program it works fine and I get the intended results from the web service. It would be greatly appreciated if somebody can tell me what am I missing. Thanks Srikanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unable to consume a secure web service from with in a JSP
Hi Richie Thanks for the reply, but sorry I didn't quite understand what you are trying to tell. What is ISA server ? FYI the oracle app server and the tomcat web server both are running on the same windows box. The web services are deployed on the oracle application server and are available over SSL. Thanks Srikanth -Original Message- From: Paul, Richardson [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 3:50 PM To: Tomcat Users List Subject: RE: Unable to consume a secure web service from with in a JSP Hi, This might not be the issue that you are facing, but please check if the connection goes through an ISA server. If it is then it would require authentication for the connection, by default. This sometimes cause problems with the applications using SOAP for SSL. Please run a monitoring from the firewall/proxy for the client machines IP (the machine that's trying to connect to your service). If in-fact you are behind an ISA/ISA 2004 box, let me know if you would need any further help with configuring ISA. Hope this helps. Thanks Cheers! Richie -Original Message- From: Srikanth Madarapu [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 May 2006 3:43 PM To: Tomcat Users List Subject: Unable to consume a secure web service from with in a JSP Hi I am trying to consume a web service that is available on a secure web server (oracle app server). I have created a jsp and deployed under Tomcat 5.5.9. When I try to consume the web service I am getting the error below... Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: No trusted certificate found I know why this error is being generated, basically I need to supply the client certificate with the system properties, javax.net.ssl.trustStore and propertiesjavax.net.ssl.trustStorePassword. I have set them with the following statements in the JSP scriptlet and also in the proxy class that connects to the web service but neither of them work. System.setProperty( javax.net.ssl.trustStore, client.keystore ); System.setProperty( javax.net.ssl.trustStorePassword, changeit); If I run the proxy client as a standalone java program it works fine and I get the intended results from the web service. It would be greatly appreciated if somebody can tell me what am I missing. Thanks Srikanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unable to consume a secure web service from with in a JSP
Hi Both the client and server are running on the same windows box, meaning in the same network. -Original Message- From: Paul, Richardson [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 5:20 PM To: Tomcat Users List Subject: RE: Unable to consume a secure web service from with in a JSP Sorry I was not clearer! Now, is the client machine that is connecting to the web server is also in the same network? If yes, then what I said would not apply. I am talking about a scenario when the connection would be across the Internet through a firewall. An Internet Security and Acceleration is one such firewall device that would usually block SOAP communication through SSL unless configured to allow it. Let me know if you have any other questions. -Original Message- From: Srikanth Madarapu [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 May 2006 4:56 PM To: Tomcat Users List Subject: RE: Unable to consume a secure web service from with in a JSP Hi Richie Thanks for the reply, but sorry I didn't quite understand what you are trying to tell. What is ISA server ? FYI the oracle app server and the tomcat web server both are running on the same windows box. The web services are deployed on the oracle application server and are available over SSL. Thanks Srikanth -Original Message- From: Paul, Richardson [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 3:50 PM To: Tomcat Users List Subject: RE: Unable to consume a secure web service from with in a JSP Hi, This might not be the issue that you are facing, but please check if the connection goes through an ISA server. If it is then it would require authentication for the connection, by default. This sometimes cause problems with the applications using SOAP for SSL. Please run a monitoring from the firewall/proxy for the client machines IP (the machine that's trying to connect to your service). If in-fact you are behind an ISA/ISA 2004 box, let me know if you would need any further help with configuring ISA. Hope this helps. Thanks Cheers! Richie -Original Message- From: Srikanth Madarapu [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 May 2006 3:43 PM To: Tomcat Users List Subject: Unable to consume a secure web service from with in a JSP Hi I am trying to consume a web service that is available on a secure web server (oracle app server). I have created a jsp and deployed under Tomcat 5.5.9. When I try to consume the web service I am getting the error below... Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: No trusted certificate found I know why this error is being generated, basically I need to supply the client certificate with the system properties, javax.net.ssl.trustStore and propertiesjavax.net.ssl.trustStorePassword. I have set them with the following statements in the JSP scriptlet and also in the proxy class that connects to the web service but neither of them work. System.setProperty( javax.net.ssl.trustStore, client.keystore ); System.setProperty( javax.net.ssl.trustStorePassword, changeit); If I run the proxy client as a standalone java program it works fine and I get the intended results from the web service. It would be greatly appreciated if somebody can tell me what am I missing. Thanks Srikanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]