You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vikram Goyal <v....@uq.edu.au> on 2003/09/16 04:17:33 UTC

Stackoverflow after DB inactivity

Hello all,

I am getting a Stackoverflow error in Tomcat 4.1+ after a period of database
inactivity, typically (3+ hours). I am using Struts for the front end and
while the non DB access pages work fine, as soon as access to a page is
requested where data is to be fetched from the database, I get the
StackOverflow. This is not random and I can replicate the error. The error
goes away however, when I try to access the same page twice or thrice and
everything works fine after that.

This error is appearing on both windows and linux, i.e., Tomcat is on these
machines, although the database, MySQL 4 is running on linux 9. The DB
access is through a connection pool I set up in Struts config for my
application using org.apache.commons.dbcp.BasicDataSource.

The stack trace follows:
2003-09-16 11:39:56 StandardWrapperValve[action]: Servlet.service() for
servlet action threw exception
javax.servlet.ServletException: Servlet execution threw an exception
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
 at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.StackOverflowError

Any help, pointers appreciated.

Regards,
Vikram


Re: Stackoverflow after DB inactivity

Posted by Vikram Goyal <v....@uq.edu.au>.
Yes I do.

> I don't use dbcp but it sounds like your database connections are timing 
> out. Do you have autoReconnect=true in your mysql jdbc connection url?
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Stackoverflow after DB inactivity

Posted by Vikram Goyal <v....@uq.edu.au>.
Yes I do.

> I don't use dbcp but it sounds like your database connections are timing 
> out. Do you have autoReconnect=true in your mysql jdbc connection url?
> 


Re[2]: Character Set Issues (windows vs. Unix)

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Hans!

Sorry about responding with significat delays, I'm reading
the list only periodically, in gulps

AT>   String s = rs.getString(x);
AT>   char c = s.charAt(y);
AT>   out.print((int)c);

HL> Thats exactly what I am doing.
HL> .... same result

What result? What codes do you get for non-ascii characters
on Unix and on Windos boxes from this test?

HL> I have even tried
HL> Reader reader = r.getCharacterStream("field_name");
HL> and then printing out the the char values of the stream

I guess r is of the type ResultSet (sorry, Chris Rolfe,
you seem to have misunderstood somthing). Okay, I beleive there
is not any difference between ResultSet.getString() and
ResultSet.getCharacterStream(), it will be enough to test
either of them

HL> Its the most bizarre thing i have seen.
HL> ...and driving me insane! :(

I like to invetigate these matters :-)
So, waiting for more info from you!

Anton


Re[2]: Character Set Issues (windows vs. Unix)

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Hans!

Sorry about responding with significat delays, I'm reading
the list only periodically, in gulps

AT>   String s = rs.getString(x);
AT>   char c = s.charAt(y);
AT>   out.print((int)c);

HL> Thats exactly what I am doing.
HL> .... same result

What result? What codes do you get for non-ascii characters
on Unix and on Windos boxes from this test?

HL> I have even tried
HL> Reader reader = r.getCharacterStream("field_name");
HL> and then printing out the the char values of the stream

I guess r is of the type ResultSet (sorry, Chris Rolfe,
you seem to have misunderstood somthing). Okay, I beleive there
is not any difference between ResultSet.getString() and
ResultSet.getCharacterStream(), it will be enough to test
either of them

HL> Its the most bizarre thing i have seen.
HL> ...and driving me insane! :(

I like to invetigate these matters :-)
So, waiting for more info from you!

Anton


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Character Set Issues (windows vs. Unix)

Posted by Chris Rolfe <sp...@telus.net>.
InputStream and OutputStream Readers rely on platform default character
encodings (unless you specify an encoding in the constructor).

For example, a text file with German umlauts encoding in MacRoman translates
without any further effort when read on an OS X server and printed to an
ISO-8859-1 page. Move the text files onto a Windows box, and see the funny
characters. 

Perhaps that's the problem?

Cheers,
Chris


on 9/17/03 9:00 AM, Hans Liebenberg at hans@cambrient.com wrote:

> Hi Anton,
> 
> Thats exactly what I am doing. I have even tried
> 
> Reader reader = r.getCharacterStream("field_name");
> and then printing out the the char values of the stream.... same result
> 
> Its the most bizarre thing i have seen.
> ...and driving me insane! :(
> 
> Thanks for you help
> 
> Hans
> 
> 
> 
> -----Original Message-----
> From: Anton Tagunov [mailto:atagunov@mail.cnt.ru]
> Sent: Tuesday, September 16, 2003 9:04 AM
> To: Tomcat Users List; hans@cambrient.com
> Subject: Re: Character Set Issues (windows vs. Unix)
> 
> 
> Hello Hans!
> 
> HL> When the application is installed on the windows server the particular
> HL> character (which is some kind of spacing character in word) gets read
> out of
> HL> the database as
> HL> Ascii code 160,
> 
> HL> BUT on the Linux server the exact same routine reads it as ascii code
> 65533
> 
> HL> Same database, same application config - only difference is OS
> 
> HL> The JVM's are both set up as default english installs.
> 
> Fun story ideed :-)
> Are you sure you get it wron from ResultSet.getString()?
> 
> Try doing
> 
> String s = rs.getString(x);
> char c = s.charAt(y);
> out.print((int)c);
> 
> Are you getting different character codes?
> 
> Anton
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


Re: Character Set Issues (windows vs. Unix)

Posted by Chris Rolfe <sp...@telus.net>.
InputStream and OutputStream Readers rely on platform default character
encodings (unless you specify an encoding in the constructor).

For example, a text file with German umlauts encoding in MacRoman translates
without any further effort when read on an OS X server and printed to an
ISO-8859-1 page. Move the text files onto a Windows box, and see the funny
characters. 

Perhaps that's the problem?

Cheers,
Chris


on 9/17/03 9:00 AM, Hans Liebenberg at hans@cambrient.com wrote:

> Hi Anton,
> 
> Thats exactly what I am doing. I have even tried
> 
> Reader reader = r.getCharacterStream("field_name");
> and then printing out the the char values of the stream.... same result
> 
> Its the most bizarre thing i have seen.
> ...and driving me insane! :(
> 
> Thanks for you help
> 
> Hans
> 
> 
> 
> -----Original Message-----
> From: Anton Tagunov [mailto:atagunov@mail.cnt.ru]
> Sent: Tuesday, September 16, 2003 9:04 AM
> To: Tomcat Users List; hans@cambrient.com
> Subject: Re: Character Set Issues (windows vs. Unix)
> 
> 
> Hello Hans!
> 
> HL> When the application is installed on the windows server the particular
> HL> character (which is some kind of spacing character in word) gets read
> out of
> HL> the database as
> HL> Ascii code 160,
> 
> HL> BUT on the Linux server the exact same routine reads it as ascii code
> 65533
> 
> HL> Same database, same application config - only difference is OS
> 
> HL> The JVM's are both set up as default english installs.
> 
> Fun story ideed :-)
> Are you sure you get it wron from ResultSet.getString()?
> 
> Try doing
> 
> String s = rs.getString(x);
> char c = s.charAt(y);
> out.print((int)c);
> 
> Are you getting different character codes?
> 
> Anton
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Character Set Issues (windows vs. Unix)

Posted by Hans Liebenberg <ha...@cambrient.com>.
Hi Anton,

Thats exactly what I am doing. I have even tried

Reader reader = r.getCharacterStream("field_name");
and then printing out the the char values of the stream.... same result

Its the most bizarre thing i have seen.
...and driving me insane! :(

Thanks for you help

Hans



-----Original Message-----
From: Anton Tagunov [mailto:atagunov@mail.cnt.ru]
Sent: Tuesday, September 16, 2003 9:04 AM
To: Tomcat Users List; hans@cambrient.com
Subject: Re: Character Set Issues (windows vs. Unix)


Hello Hans!

HL> When the application is installed on the windows server the particular
HL> character (which is some kind of spacing character in word) gets read
out of
HL> the database as
HL> Ascii code 160,

HL> BUT on the Linux server the exact same routine reads it as ascii code
65533

HL> Same database, same application config - only difference is OS

HL> The JVM's are both set up as default english installs.

Fun story ideed :-)
Are you sure you get it wron from ResultSet.getString()?

Try doing

  String s = rs.getString(x);
  char c = s.charAt(y);
  out.print((int)c);

Are you getting different character codes?

Anton


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Character Set Issues (windows vs. Unix)

Posted by Hans Liebenberg <ha...@cambrient.com>.
Hi Anton,

Thats exactly what I am doing. I have even tried

Reader reader = r.getCharacterStream("field_name");
and then printing out the the char values of the stream.... same result

Its the most bizarre thing i have seen.
...and driving me insane! :(

Thanks for you help

Hans



-----Original Message-----
From: Anton Tagunov [mailto:atagunov@mail.cnt.ru]
Sent: Tuesday, September 16, 2003 9:04 AM
To: Tomcat Users List; hans@cambrient.com
Subject: Re: Character Set Issues (windows vs. Unix)


Hello Hans!

HL> When the application is installed on the windows server the particular
HL> character (which is some kind of spacing character in word) gets read
out of
HL> the database as
HL> Ascii code 160,

HL> BUT on the Linux server the exact same routine reads it as ascii code
65533

HL> Same database, same application config - only difference is OS

HL> The JVM's are both set up as default english installs.

Fun story ideed :-)
Are you sure you get it wron from ResultSet.getString()?

Try doing

  String s = rs.getString(x);
  char c = s.charAt(y);
  out.print((int)c);

Are you getting different character codes?

Anton


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




Re: Character Set Issues (windows vs. Unix)

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Hans!

HL> When the application is installed on the windows server the particular
HL> character (which is some kind of spacing character in word) gets read out of
HL> the database as
HL> Ascii code 160,

HL> BUT on the Linux server the exact same routine reads it as ascii code 65533

HL> Same database, same application config - only difference is OS

HL> The JVM's are both set up as default english installs.

Fun story ideed :-)
Are you sure you get it wron from ResultSet.getString()?

Try doing

  String s = rs.getString(x);
  char c = s.charAt(y);
  out.print((int)c);

Are you getting different character codes?

Anton


Re: Character Set Issues (windows vs. Unix)

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Hans!

HL> When the application is installed on the windows server the particular
HL> character (which is some kind of spacing character in word) gets read out of
HL> the database as
HL> Ascii code 160,

HL> BUT on the Linux server the exact same routine reads it as ascii code 65533

HL> Same database, same application config - only difference is OS

HL> The JVM's are both set up as default english installs.

Fun story ideed :-)
Are you sure you get it wron from ResultSet.getString()?

Try doing

  String s = rs.getString(x);
  char c = s.charAt(y);
  out.print((int)c);

Are you getting different character codes?

Anton


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Character Set Issues (windows vs. Unix)

Posted by Christopher Williams <cc...@ntlworld.com>.
Hans,

Make the database fields BLOBs as you're storing binary data.  No attempt
should then be made by your database to interpret character codes.



Re: Character Set Issues (windows vs. Unix)

Posted by Christopher Williams <cc...@ntlworld.com>.
Hans,

Make the database fields BLOBs as you're storing binary data.  No attempt
should then be made by your database to interpret character codes.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Character Set Issues (windows vs. Unix)

Posted by Hans Liebenberg <ha...@cambrient.com>.
Hi,

I am yet again being haunted by character set problems and actually don't
have a clue what is happening here.

I have one web application and 2 servers.

Linux Server:
 Red Hat Linux 2.4.18-14
 JDK 1.4.2
 Apache Tomcat/4.1.24-LE-jdk14
 Postgres 7.2.2
 Accessing the Database via JDBC, charSet=SQL_ASCII

Windows 2000
 JDK 1.4.2
 Apache Tomcat/4.1.24-LE-jdk14
 Accessing the same postgres database on the Linux server
 Accessing the Database via JDBC, charSet=SQL_ASCII

The config for the application is exactly the same on both machines.
But here is my problem....

I have a form in my web application that allows an admin user to paste
content from MS Word which in turn gets saved into the postgres database.
As we all know Word uses some strange characters for apostrophes, commas,
spaces etc.
Which I understand.

I have another page that reads and displays the value from the database.
When the application is installed on the windows server the particular
character (which is some kind of spacing character in word) gets read out of
the database as
Ascii code 160,

BUT on the Linux server the exact same routine reads it as ascii code 65533

Same database, same application config - only difference is OS

The JVM's are both set up as default english installs.

I really am battling with this one.


Regards
Hans












Character Set Issues (windows vs. Unix)

Posted by Hans Liebenberg <ha...@cambrient.com>.
Hi,

I am yet again being haunted by character set problems and actually don't
have a clue what is happening here.

I have one web application and 2 servers.

Linux Server:
 Red Hat Linux 2.4.18-14
 JDK 1.4.2
 Apache Tomcat/4.1.24-LE-jdk14
 Postgres 7.2.2
 Accessing the Database via JDBC, charSet=SQL_ASCII

Windows 2000
 JDK 1.4.2
 Apache Tomcat/4.1.24-LE-jdk14
 Accessing the same postgres database on the Linux server
 Accessing the Database via JDBC, charSet=SQL_ASCII

The config for the application is exactly the same on both machines.
But here is my problem....

I have a form in my web application that allows an admin user to paste
content from MS Word which in turn gets saved into the postgres database.
As we all know Word uses some strange characters for apostrophes, commas,
spaces etc.
Which I understand.

I have another page that reads and displays the value from the database.
When the application is installed on the windows server the particular
character (which is some kind of spacing character in word) gets read out of
the database as
Ascii code 160,

BUT on the Linux server the exact same routine reads it as ascii code 65533

Same database, same application config - only difference is OS

The JVM's are both set up as default english installs.

I really am battling with this one.


Regards
Hans












---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Stackoverflow after DB inactivity

Posted by Jon Wingfield <jo...@mkodo.com>.
I don't use dbcp but it sounds like your database connections are timing 
out. Do you have autoReconnect=true in your mysql jdbc connection url?

Vikram Goyal wrote:
> Hello all,
> 
> I am getting a Stackoverflow error in Tomcat 4.1+ after a period of database
> inactivity, typically (3+ hours). I am using Struts for the front end and
> while the non DB access pages work fine, as soon as access to a page is
> requested where data is to be fetched from the database, I get the
> StackOverflow. This is not random and I can replicate the error. The error
> goes away however, when I try to access the same page twice or thrice and
> everything works fine after that.
> 
> This error is appearing on both windows and linux, i.e., Tomcat is on these
> machines, although the database, MySQL 4 is running on linux 9. The DB
> access is through a connection pool I set up in Struts config for my
> application using org.apache.commons.dbcp.BasicDataSource.
> 
> The stack trace follows:
> 2003-09-16 11:39:56 StandardWrapperValve[action]: Servlet.service() for
> servlet action threw exception
> javax.servlet.ServletException: Servlet execution threw an exception
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:269)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:256)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:171)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
>  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:392)
>  at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:619)
>  at java.lang.Thread.run(Thread.java:534)
> ----- Root Cause -----
> java.lang.StackOverflowError
> 
> Any help, pointers appreciated.
> 
> Regards,
> Vikram
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 




Re: Stackoverflow after DB inactivity

Posted by Jon Wingfield <jo...@mkodo.com>.
I don't use dbcp but it sounds like your database connections are timing 
out. Do you have autoReconnect=true in your mysql jdbc connection url?

Vikram Goyal wrote:
> Hello all,
> 
> I am getting a Stackoverflow error in Tomcat 4.1+ after a period of database
> inactivity, typically (3+ hours). I am using Struts for the front end and
> while the non DB access pages work fine, as soon as access to a page is
> requested where data is to be fetched from the database, I get the
> StackOverflow. This is not random and I can replicate the error. The error
> goes away however, when I try to access the same page twice or thrice and
> everything works fine after that.
> 
> This error is appearing on both windows and linux, i.e., Tomcat is on these
> machines, although the database, MySQL 4 is running on linux 9. The DB
> access is through a connection pool I set up in Struts config for my
> application using org.apache.commons.dbcp.BasicDataSource.
> 
> The stack trace follows:
> 2003-09-16 11:39:56 StandardWrapperValve[action]: Servlet.service() for
> servlet action threw exception
> javax.servlet.ServletException: Servlet execution threw an exception
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:269)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:256)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:171)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
>  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:392)
>  at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:619)
>  at java.lang.Thread.run(Thread.java:534)
> ----- Root Cause -----
> java.lang.StackOverflowError
> 
> Any help, pointers appreciated.
> 
> Regards,
> Vikram
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org