Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mikolaj Rydzewski
On Thu, 4 Nov 2010 11:08:07 +0530, sasidhar prabhakar sasidhar1...@gmail.com wrote: I didn't understand below, in DAO class everything fine. Connection,PreparedStatement,ResultSet are all declared method local, and closed properly. Within finally clause? Please guide me to solve the

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
We are using struts and following DAO pattern. This is the code public String getCountryName(long ipSum){ String name = null; Connection connection = null; PreparedStatement pstmt = null; ResultSet rs = null; try{ connection =

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mikolaj Rydzewski
On Thu, 4 Nov 2010 13:20:48 +0530, sasidhar prabhakar sasidhar1...@gmail.com wrote: We are using struts and following DAO pattern. Looks fine. Does the problem occur everytime? -- Mikolaj Rydzewski m...@ceti.pl - To

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
Yes it is. I have one doubt. Is abandoned trace really shows the code where the connection established and did not close it. Is remove abandoned, will close the connection after time out and places it back to pool. Is it really closes the connection? for example I configured pool with 200

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mark Thomas
On 04/11/2010 05:01, sasidhar prabhakar wrote: Yes it is. I have one doubt. You have a question not a doubt and you have more than one of them. Is abandoned trace really shows the code where the connection established and did not close it. Yes. Is remove abandoned, will close the

[OT] Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Peter Crowther
On 4 November 2010 10:54, Mark Thomas ma...@apache.org wrote: On 04/11/2010 05:01, sasidhar prabhakar wrote: I have one doubt. You have a question not a doubt I see this on many forums, and have come to realise it's associated with speakers of at least one of the widely-used languages in

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
On Thu, Nov 4, 2010 at 4:24 PM, Mark Thomas ma...@apache.org wrote: On 04/11/2010 05:01, sasidhar prabhakar wrote: Is abandoned trace really shows the code where the connection established and did not close it. Yes. The code I posted above is clean and properly closed all of

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Rob Gregory
The code you posted looks fine but without the complete class it is hard to say 100% your class is fine. -Original Message- From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com] Sent: 04 November 2010 11:36 To: Tomcat Users List Subject: Re: DBCP abandoned trace - unable to

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
The complete class has only two methods. And class is import connection.ConnectionUtil; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Calendar; import javax.sql.DataSource; import

Re: web.xml cant load because of listener

2010-11-04 Thread Konstantin Kolinko
2010/11/4 Will Sumekar will.sume...@gmail.com: listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener AFAIK, you have to specify contextConfigLocation context parameter with location of your application context xml file. BTW, the log that you

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Rob Gregory
The full class looks ok to me. Your issues must be elsewhere. -Original Message- From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com] Sent: 04 November 2010 12:05 To: Tomcat Users List Subject: Re: DBCP abandoned trace - unable to understand the leak The complete class has

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread sasidhar prabhakar
The class is fine but in log it is showing this one. Here everything closed fine. Then why it is showing like this DBCP object created 2010-11-04 11:07:59 by the following code was never closed: java.lang.Exception at

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Rob Gregory
Are you sure it is running against the code you think it is running against. Try changing something that is output to the log files and make sure you see this change before the abandoned stack trace is thrown. -Original Message- From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com]

Is there a GOOD AJP-based cluster reference?

2010-11-04 Thread Jeffrey Janner
I've googled and not found anything very helpful, particularly nothing recent. I am trying to set up AJP load balancing using Apache 2.2.17 to Tomcat 6.0.29. I'd like to route root to the Tomcat named context (not root). From the docs I've read so far, I should be able to, but all the

Re: web.xml cant load because of listener

2010-11-04 Thread Will Sumekar
AFAIK if you dont specify contextConfigLocation system looks for default filename applicationContext.xml at default location of ./WEB-INF/. But it doesnt matter cos even if I put context-param the error still comes. So far it looks like the error is caused by listener. Once I remove it, it's OK.

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Propes, Barry L
Not sure if it matters or not, but in your SponserSummaryDAO method, it appears you establish the rs as null, but don't ever close it? You might specifically try that. And is it necessary to reassign all those variables (connection, rs, pstmt) to null again in those catch blocks?

Re: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sasidhar, On 11/4/2010 8:34 AM, sasidhar prabhakar wrote: The class is fine but in log it is showing this one. Here everything closed fine. Then why it is showing like this DBCP object created 2010-11-04 11:07:59 by the following code was never

RE: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Mikolaj Rydzewski
On Thu, 4 Nov 2010 10:37:25 -0500, Propes, Barry L barry.l.pro...@citi.com wrote: Not sure if it matters or not, but in your SponserSummaryDAO method, it appears you establish the rs as null, but don't ever close it? You might specifically try that. And is it necessary to reassign all

filter order question

2010-11-04 Thread Aggarwal, Ajay
From reading the doc, it seems the filters are invoked in the order in which they appear in filter-mapping in web.xml. However I have a situation where I have 2 filters one mapped using servlet-name and other one mapped using url-pattern and they are not being invoked in the right order. Below

RE: filter order question

2010-11-04 Thread Rob Gregory
What was the URL of your request? -Original Message- From: Aggarwal, Ajay [mailto:ajay.aggar...@stratus.com] Sent: 04 November 2010 16:09 To: Tomcat Users List Subject: filter order question From reading the doc, it seems the filters are invoked in the order in which they appear

Re: filter order question

2010-11-04 Thread Konstantin Kolinko
2010/11/4 Aggarwal, Ajay ajay.aggar...@stratus.com: From reading the doc, it seems the filters are invoked in the order in which they appear in filter-mapping in web.xml. However I have a situation where I have 2 filters one mapped using servlet-name and other one mapped using url-pattern and

Re: ISAPI-Problem

2010-11-04 Thread Jost Richstein
And here is whole response I receive, if I run into that error: HTTP/1.1 500 Internal Server Error Date: Thu, 04 Nov 2010 16:26:36 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Type: text/html !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN

Secondary instance of Tomcat on single server does not process requests

2010-11-04 Thread Ari King
Hi all, My secondary instance of Tomcat 6 does not process requests -- it simply times out for everything. The only log is catalina.out and there are not errors in it. Anyone know what could be wrong? I'm using Tomcat 6, Java 1.6.0_20, on Centos 5.5 Final. I've set the secondary instance to use

Re: Is there a GOOD AJP-based cluster reference?

2010-11-04 Thread Mark Eggers
At the risk of violating your request (not to point you to the documentation), I'm going to point you at the documentation. In particular: manual/mod/mod_proxy.html#proxypassreverse (from the Apache httpd docs) This will rewrite response URLs. However, there is a caveat. It will not rewrite

Re: Secondary instance of Tomcat on single server does not process requests

2010-11-04 Thread Konstantin Kolinko
2010/11/4 Ari King ari.brandeis.k...@gmail.com: |-- conf     |-- server.xml     |-- web.xml Those two files are not sufficient. Note, that the conf folder is read only from the second instance. (The files in CATALINA_HOME\conf are never read).

Re: Secondary instance of Tomcat on single server does not process requests

2010-11-04 Thread David kerber
On 11/4/2010 12:56 PM, Ari King wrote: Hi all, My secondary instance of Tomcat 6 does not process requests -- it simply times out for everything. The only log is catalina.out and there are not errors in it. Anyone know what could be wrong? I'm using Tomcat 6, Java 1.6.0_20, on Centos 5.5 Final.

RE: filter order question

2010-11-04 Thread Aggarwal, Ajay
Thank you so much Konstantin for pointing to these specs! -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Thursday, November 04, 2010 12:35 PM To: Tomcat Users List Subject: Re: filter order question 2010/11/4 Aggarwal, Ajay ajay.aggar...@stratus.com:

Re: web.xml cant load because of listener

2010-11-04 Thread Pid
On 04/11/2010 16:06, Will Sumekar wrote: AFAIK if you dont specify contextConfigLocation system looks for default filename applicationContext.xml at default location of ./WEB-INF/. But it doesnt matter cos even if I put context-param the error still comes. So far it looks like the error is

Re: connection Pooling in tomcat 6

2010-11-04 Thread Pid
On 04/11/2010 05:50, mike houston wrote: Hi.. Is there a framework for implementing database connection pooling in tomcat 6? I am migrating my application from tomcat 4 to 6. There is already a connection pooling implemented for the sql2000 server using the MS pool.exe framework. But now

Re: Secondary instance of Tomcat on single server does not process requests

2010-11-04 Thread Ari King
On Thu, Nov 4, 2010 at 1:09 PM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2010/11/4 Ari King ari.brandeis.k...@gmail.com: |-- conf |-- server.xml |-- web.xml Those two files are not sufficient. Note, that the conf folder is read only from the second instance. (The files

Re: Is there a GOOD AJP-based cluster reference?

2010-11-04 Thread Pid
On 04/11/2010 14:56, Jeffrey Janner wrote: p.s. Don't send me to the Tomcat Apache docs, I've read them. What happens if you define the balancer before you try to use it? p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature

Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Nagulapalli, Srinivas
I can deploy an old Java web application to Tomcat 6.0.18 using (Java JDK 1.5.0.22) fine. However, get error deploying same application to Tomcat 6.0.20. Cannot deploy to any Tomcat later either, like all Tomcat 6.0.24, 6.0.26, 6.0.28 and 6.0.29 versions give me same error message: Error

Re: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Mark Thomas
On 04/11/2010 14:52, Nagulapalli, Srinivas wrote: I appreciate any insights/pointers or help. Look at the logs. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail:

Re: Secondary instance of Tomcat on single server does not process requests

2010-11-04 Thread Mark Eggers
From the RUNNING.txt you will need tomcat-juli.jar in $CATALINA_BASE/bin. That being said, I start up and shut down 4 Tomcat instances when I'm working on cluster issues. Here's a typical directory structure I use for each Tomcat that's a part of the cluster: deimos-host/ ├── bin │ ├──

RE: Is there a GOOD AJP-based cluster reference?

2010-11-04 Thread Jeffrey Janner
That's what I'm doing now Pid. Not sure if that's helping much since it seemed to work the other way round also. Switching the order still showed the same apparent behavior. See my response to Mark Eggers about how I've got it working right now. I'd love to get any more input from you if there is

RE: Is there a GOOD AJP-based cluster reference?

2010-11-04 Thread Jeffrey Janner
In looking at the JSPs, the dev team is coding all the paths inside a c:url construct, which is why the context string is getting prepended to every path in the document. What was throwing me off a bit was the default doc was just a redirect as:

Re: Is there a GOOD AJP-based cluster reference?

2010-11-04 Thread Mark Eggers
Interesting. I'll have to try something similar for my situation. What I'm trying to do is a bit of the reverse. I want hostname:80/tomcat-host/manager to end up at (tomcat-host) /manager for four different tomcat hosts. The forward stuff works fine, but the URLs coming back all drop the

RE: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Nagulapalli, Srinivas
I am stumped. I see in Catalina.log only the cryptic error message like below. No error in localhost.log file.Don't know what I might be missing. What is baffling is, same application gets deployed fine in Tomcat 6.0.18 and earlier. Thanks for any pointers. -Srini Contents of Catalina.log: Nov

Re: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Mark Thomas
On 04/11/2010 16:35, Nagulapalli, Srinivas wrote: Nov 4, 2010 4:28:05 PM org.apache.catalina.startup.HostConfig deployWAR SEVERE: Error deploying configuration descriptor MYPROJECT.war And the contexts of your context.xml file is what? Mark

RE: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Nagulapalli, Srinivas
No difference in context.xml file for Tomcat-6.0.18 and 6.0.20-both have following: Context WatchedResourceWEB-INF/web.xml/WatchedResource Context Thanks for any pointers. -Srini -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Thursday, November 04, 2010 4:41

RE: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Nagulapalli, Srinivas
Forgot to put contents of application's context.xml. Still no difference in contents between 6.0.18 and 6.0.20- same file listed under %TOMCAT_HOME%\conf\Catalina\localhost\MYPROJECT.xml for both versions Contents of MYPROJECT.XML : !-- The contents of this file will

Re: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Konstantin Kolinko
2010/11/4 Nagulapalli, Srinivas srinivas.nagulapa...@starwoodvo.com: Forgot to put contents of application's context.xml. Still no difference in contents between 6.0.18 and 6.0.20- same file listed under %TOMCAT_HOME%\conf\Catalina\localhost\MYPROJECT.xml for both versions A lot is wrong with

RE: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Nagulapalli, Srinivas
Many thanks for the tip. Didn't realize how much context file changed. Changed context.xml like below and it deploys fine now in 6.0.20. Going to check and test more. Please tell if I am missing out on limb still. Changed contents of MYPROJECT.xml that deploys fine:

Re: Difference in behavior between Tomcat 6.0.18 and 6.0.20

2010-11-04 Thread Konstantin Kolinko
2010/11/5 Nagulapalli, Srinivas srinivas.nagulapa...@starwoodvo.com: Many thanks for the tip. Didn't realize how much context file changed. Changed context.xml like below and it deploys fine now in 6.0.20. Going to check and test more. Please tell if I am missing out on limb still. Changed

Re: mod_jk makes ajp connector run out of free connections

2010-11-04 Thread Marc Wilmots
Rainer, that's very true. So I am wondering...If 1200 200 (Tomcat maxThreads), then what would be the right way to solve this? Imagine that 2 Tomcats would crash, that would leave me with 1200 400. I can't just raise the maxThreads to 600 for each Tomcat, as that would probably perform even

Re: mod_jk makes ajp connector run out of free connections

2010-11-04 Thread Marc Wilmots
I just got my own question answered whether connection_pool_size sets a pool per server process. This defines the number of connections made to the AJP backend that are maintained as a connection pool. It will limit the number of those connection that each web server child process can made. This

Re: mod_jk makes ajp connector run out of free connections

2010-11-04 Thread Mark Thomas
On 04/11/2010 19:27, Marc Wilmots wrote: The best solution would be to enable DisableReuse as Mark stated, although I'm afraid that would be too big of a performance hit. Have you tried it? The cost of the required CPING/CPONG isn't that different to the cost of creating a TCP/IP connection.

Re: mod_jk makes ajp connector run out of free connections

2010-11-04 Thread Marc Wilmots
Honestlyno, I didn't. The mod_jk scared the hell out of mewouldn't you? :-) Using this option will have a strong performance penalty for Apache and Tomcat. Use this only as a last resort in case of unfixable network problems. I'll give it a try tomorrow and see what it gives. By the

Re: mod_jk makes ajp connector run out of free connections

2010-11-04 Thread Marc Wilmots
Forget about my math question. Obviously, connection_pool_size of 15, would mean there are 60 (4 tomcats) in total per server process. Then the math works out Sorry, it's 1:08am over here :-) 2010/11/5 Marc Wilmots desj...@gmail.com Honestlyno, I didn't. The mod_jk scared the hell out

Re: Connector Setting Problem in tomcat 6.0.29

2010-11-04 Thread rujin raj
I added the attributes in connector executer. even though it is not working Executer setting: Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 minSpareThreads=50 connectionTimeout=2 redirectPort=8443 / I need to

RE: Connector Setting Problem in tomcat 6.0.29

2010-11-04 Thread Caldarale, Charles R
From: rujin raj [mailto:rujin...@gmail.com] Subject: Re: Connector Setting Problem in tomcat 6.0.29 I added the attributes in connector executer. even though it is not working Executer setting: Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1