Re: problems with connector

2006-11-18 Thread Enrico Donelli

Thanks Rainer for your reply!

Here's my mod_jk.conf

I solved my previous error adding the directive
JkShmFile /var/log/apache2/mod_jk.shm
(see later the copy of the file)

Now I have different errors:

[Sat Nov 18 09:27:57 2006] [16854:7072] [info]
ajp_send_request::jk_ajp_common.c (1170): (ajp13) socket 33 is not
connected any more (errno=11)
[Sat Nov 18 09:27:57 2006] [16854:7072] [info]
ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
request. Will try another pooled connection
[Sat Nov 18 09:27:57 2006] [16854:7072] [info]
ajp_send_request::jk_ajp_common.c (1218): (ajp13) all endpoints are
disconnected or dead
[Sat Nov 18 09:27:57 2006] [16854:7072] [info]
ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat
failed,  recoverable operation attempt=1

What do they mean?

I'm using versions
mod_jk/1.2.19
Apache/2.0.54
tomcat/5.5.20


Thanks again!!

Enrico


# ===
# mod_jk.conf

# Load mod_jk module
LoadModulejk_module  /usr/lib/apache2/modules/mod_jk.so
# Declare the module for IfModule directive (remove this line on Apache 2.0.x)
#AddModule mod_jk.c
# Where to find workers.properties
JkWorkersFile /etc/apache2/workers.properties
# Where to put jk logs
JkLogFile /var/log/apache2/mod_jk.log

JkShmFile /var/log/apache2/mod_jk.shm


# Set the jk log level [debug/error/info]
JkLogLevelinfo
# Select the log format
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat %w %V %T
# Send servlet for context /examples to worker named worker1
#JkMount  /examples/servlet/* worker1
# Send JSPs  for context /examples to worker named worker1


#== workers.properties =
workers.tomcat_home=/tomcat/dir
workers.java_home=/opt/jdk
ps=/
worker.list=ajp13
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
#worker.ajp13.connection_pool_size
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp12, ajp13

worker.inprocess.type=jni








On 17/11/06, Rainer Jung [EMAIL PROTECTED] wrote:

Please give details on your mod_jk version and concerning your
configuration (mod_jk config inside httpd.conf and workers.properties).

Errno 2 looks line not such file or directory. So does
/etc/apache2/logs/jk-runtime-status exist as a file and is the apache
user allowed to write into it. Does the directory /etc/apache2/logs
exist and again, does the apache user have write permissions there?

Does the log message already show, when you are starting? If yes, could
you reproduce with JkLogLevel trace and provide the resulting file?

Regards,

Rainer


Enrico Donelli schrieb:
 Hi all,
 I'm having some problems with the mod_jk connector.
 In mod_jk logs file I have a lot of lines like

 [Fri Nov 17 23:07:18 2006] [12236:7072] [error]
 jk_child_init::mod_jk.c (2406): Attachning
 shm:/etc/apache2/logs/jk-runtime-status errno=2

 and from time to time the connector completely locks apache, forcing
 me to restart both apache and tomcat.


 Any idea? I could find no documentation about this error :((

 I'm using debian3.1, jdk1.5.0_05 and tomcat 5.20.

 Thanks in advance!!
 Enrico



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Performance Concerns

2006-11-18 Thread Gaurav Kushwaha

I have a simple JSP-application that makes use of an ODBC database
(access). When I run it using Tomcat on PC2 (XP) its performance is
very good. However, running on PC1 (W2K Server) is orders of
magnitudes slower! :-(

I have already read most of the relevant manuals and tried various
settings (server.xml, JAVA_OPTS, ...). No help.

Has anybody observed similiar problems?
Any help is appreciated...

Gaurav Singh Kushwaha
Ph: +91-9880101496
Bangalore, India.
http://www.chakpak.com


Reloading JAAS Configuration File

2006-11-18 Thread olivier nouguier

Hi all,
I was wondering if there is a smarter way to reload a jaas configuration
file than to call
Configuration.getConfiguration().refresh(); in a servlet.
I was thinking of such a call in a webapp lifcycle listener.
I really don't know much about JMX but perhaps it should the only nice way?

Idea ?

Thanks
--
Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie
et toi dans les pleurs.
Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
et toi dans la joie.


Re: problems with connector

2006-11-18 Thread Rainer Jung
Hi Enrico,

it looks like the config you sent doesn't fit to your problem. The only
configured forwarding rule with JkMount is a comment, so mod_jk should
never try to reach any tomcat. I assume, you added the comment sign when
trying to find the reason to your problem, but this makes me question
the rest of the config, e.g. the connection_pool_size comment.

Before we try to solve your problem: the following lines in your
workers.properties are obsolete, or not used in your situation. You
should remove them:

 workers.tomcat_home=/tomcat/dir
 workers.java_home=/opt/jdk
 ps=/

 worker.ajp12.port=8007
 worker.ajp12.host=localhost
 worker.ajp12.type=ajp12
 worker.ajp12.lbfactor=1

 #worker.ajp13.connection_pool_size
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp12, ajp13

 worker.inprocess.type=jni

Now to your problem: Please add

worker.ajp13.socket_timeout=0

to your workers.properties and try again. If you can easily reproduce
the problem, it would be nice to increase JkLogLevel to trace (will
produce lots of logging) and attach the JkLogFile.

Regards,

Rainer

Enrico Donelli schrieb:
 Thanks Rainer for your reply!
 
 Here's my mod_jk.conf
 
 I solved my previous error adding the directive
 JkShmFile /var/log/apache2/mod_jk.shm
 (see later the copy of the file)
 
 Now I have different errors:
 
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1170): (ajp13) socket 33 is not
 connected any more (errno=11)
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
 request. Will try another pooled connection
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1218): (ajp13) all endpoints are
 disconnected or dead
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat
 failed,  recoverable operation attempt=1
 
 What do they mean?
 
 I'm using versions
 mod_jk/1.2.19
 Apache/2.0.54
 tomcat/5.5.20
 
 
 Thanks again!!
 
 Enrico
 
 
 # ===
 # mod_jk.conf
 
 # Load mod_jk module
 LoadModulejk_module  /usr/lib/apache2/modules/mod_jk.so
 # Declare the module for IfModule directive (remove this line on
 Apache 2.0.x)
 #AddModule mod_jk.c
 # Where to find workers.properties
 JkWorkersFile /etc/apache2/workers.properties
 # Where to put jk logs
 JkLogFile /var/log/apache2/mod_jk.log
 
 JkShmFile /var/log/apache2/mod_jk.shm
 
 
 # Set the jk log level [debug/error/info]
 JkLogLevelinfo
 # Select the log format
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 # JkOptions indicate to send SSL KEY SIZE,
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 # JkRequestLogFormat set the request format
 JkRequestLogFormat %w %V %T
 # Send servlet for context /examples to worker named worker1
 #JkMount  /examples/servlet/* worker1
 # Send JSPs  for context /examples to worker named worker1
 
 
 #== workers.properties =
 workers.tomcat_home=/tomcat/dir
 workers.java_home=/opt/jdk
 ps=/
 worker.list=ajp13
 worker.ajp12.port=8007
 worker.ajp12.host=localhost
 worker.ajp12.type=ajp12
 worker.ajp12.lbfactor=1
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 #worker.ajp13.connection_pool_size
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp12, ajp13
 
 worker.inprocess.type=jni
 
 
 
 
 
 
 
 
 On 17/11/06, Rainer Jung [EMAIL PROTECTED] wrote:
 Please give details on your mod_jk version and concerning your
 configuration (mod_jk config inside httpd.conf and workers.properties).

 Errno 2 looks line not such file or directory. So does
 /etc/apache2/logs/jk-runtime-status exist as a file and is the apache
 user allowed to write into it. Does the directory /etc/apache2/logs
 exist and again, does the apache user have write permissions there?

 Does the log message already show, when you are starting? If yes, could
 you reproduce with JkLogLevel trace and provide the resulting file?

 Regards,

 Rainer


 Enrico Donelli schrieb:
  Hi all,
  I'm having some problems with the mod_jk connector.
  In mod_jk logs file I have a lot of lines like
 
  [Fri Nov 17 23:07:18 2006] [12236:7072] [error]
  jk_child_init::mod_jk.c (2406): Attachning
  shm:/etc/apache2/logs/jk-runtime-status errno=2
 
  and from time to time the connector completely locks apache, forcing
  me to restart both apache and tomcat.
 
 
  Any idea? I could find no documentation about this error :((
 
  I'm using debian3.1, jdk1.5.0_05 and tomcat 5.20.
 
  Thanks in advance!!
  Enrico
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


Re: Starting Tomcat

2006-11-18 Thread David Schulberg
Hi Again,

Running catalina run - same result
Service is not running.
Nothing logged.
How to work out what is not happening??

David

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 18 November 2006 4:26 PM
To: Tomcat Users List
Subject: RE: Starting Tomcat

 From: David Schulberg [mailto:[EMAIL PROTECTED] 
 Subject: Starting Tomcat
 
 Can run Tomcat as a windows service. Want to be able to run 
 startup.bat but when I run it the output is:

snip

 and nothing happens.

This should open up a 2nd command prompt window, which will persist
until shutdown.bat is used, and the primary window will return a prompt.
However, the secondary window will close fairly quickly if any of the
configured ports are already in use (such as by the Tomcat service,
perhaps).  Use the command catalina.bat run if you want to see
execution in the current window.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Realtime notification of ThreadPool logFull

2006-11-18 Thread jwboring


Nelson, Tracy wrote:
 Why not just grab the source

I looked at the source (org.apache.tomcat.util.threads.ThreadPool) and it IS
logging to the commons logger - see below.

private static void logFull(Log loghelper, int currentThreadCount,
int maxThreads) {
if( logfull ) {
log.error(sm.getString(threadpool.busy,
   new Integer(currentThreadCount),
   new Integer(maxThreads)));
logfull=false;
} else if( log.isDebugEnabled() ) {
log.debug(All threads are busy  + currentThreadCount +   +
  maxThreads );
}
}


But this is NOT the log I am getting in catalina.out. Instead, I am getting,
Nov 17, 2006 12:08:25 PM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (10) are currently busy, waiting. Increase maxThreads.
What gives? I am getting other normal info, etc ... level messages but not
this one. Using v5.5.17.

Jeff
-- 
View this message in context: 
http://www.nabble.com/Realtime-notification-of-ThreadPool-logFull-tf2654425.html#a7419824
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Realtime notification of ThreadPool logFull

2006-11-18 Thread Martin Gainty
your diagnostic appears out of sync with your source
where did you acquire the source?
M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: jwboring [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Saturday, November 18, 2006 9:27 AM
Subject: RE: Realtime notification of ThreadPool logFull


 
 
 Nelson, Tracy wrote:
 Why not just grab the source
 
 I looked at the source (org.apache.tomcat.util.threads.ThreadPool) and it IS
 logging to the commons logger - see below.
 
 private static void logFull(Log loghelper, int currentThreadCount,
int maxThreads) {
 if( logfull ) {
log.error(sm.getString(threadpool.busy,
   new Integer(currentThreadCount),
   new Integer(maxThreads)));
logfull=false;
} else if( log.isDebugEnabled() ) {
log.debug(All threads are busy  + currentThreadCount +   +
  maxThreads );
}
}
 
 
 But this is NOT the log I am getting in catalina.out. Instead, I am getting,
 Nov 17, 2006 12:08:25 PM org.apache.tomcat.util.threads.ThreadPool logFull
 SEVERE: All threads (10) are currently busy, waiting. Increase maxThreads.
 What gives? I am getting other normal info, etc ... level messages but not
 this one. Using v5.5.17.
 
 Jeff
 -- 
 View this message in context: 
 http://www.nabble.com/Realtime-notification-of-ThreadPool-logFull-tf2654425.html#a7419824
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: RSS help

2006-11-18 Thread michael
On Sat, Nov 18, 2006 at 12:20:59AM -0800, Dave wrote:

 How to support RSS in a website so that people can subscribe? I
 googled and found lots of documents about how to subscribe and about
 news readers, but not talking about how to support RSS functionality
 in a website?

  
Developing Feeds with RSS and Atom by Ben Hammersley

There are many similar books.

Thanks.

mp

-- 
Michael Powe[EMAIL PROTECTED]   Naugatuck CT USA
The most likely way for the world to be destroyed, most experts
agree, is by accident.  That's where we come in. We're computer
professionals. We cause accidents.  -- Nathaniel Borenstein, inventor
of MIME


pgpzFXhWAvUYi.pgp
Description: PGP signature


RE: RSS help

2006-11-18 Thread Michael Hencin
Dave

I went thru the same thing. Basically all you need to do is make an XML file
and put it on a web server some place. Then provide the link. People can
copy the link and paste it into any rss reader, or if their browser
understands what to do, it will add the rss feed link to the integrated
reader. 

So you need to create the XML file, save that file to your web server. Then
provide a link for people to use.

Here are some links I came by

http://searchenginewatch.com/showPage.html?page=2175271


http://en.wikipedia.org/wiki/RSS_%28file_format%29

Mike


-Original Message-
From: Dave [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 18, 2006 2:21 AM
To: users@myfaces.apache.org; Tomcat Users List
Subject: RSS help

How to support RSS in a website so that people can subscribe? I googled and
found lots of documents about how to subscribe and about news readers, but
not talking about how to support RSS functionality in a website?
   
  Thanks,
  Dave

 
-
Sponsored Link

   Mortgage rates as low as 4.625% - $150,000 loan for $579 a month.
Intro-*Terms


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Performance Concerns

2006-11-18 Thread Caldarale, Charles R
 From: Gaurav Kushwaha [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat Performance Concerns
 
 I have a simple JSP-application that makes use of an ODBC database
 (access).

Try using a real database with JDBC drivers.  Access and ODBC are pretty
much just toys and inappropriate for any kind of production environment.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Starting Tomcat

2006-11-18 Thread Caldarale, Charles R
 From: David Schulberg [mailto:[EMAIL PROTECTED] 
 Subject: Re: Starting Tomcat
 
 Running catalina run - same result

What shows up in the command prompt window when you do this?  (Do not
use the Run... menu item from the Start button.)  Are you using the
exact same installation files as the service does?  Do you have an
access permissions problem with your logon account versus the service
account?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Performance Concerns

2006-11-18 Thread Martin Gainty
Good Morning Gaurav-

It is truly Amazing how many managers who want to use Access DB in their 
production environments
I would recommend a migration to true multi-threaded environment with a DB 
which has full Transaction support such as Oracle
Take a look at 
http://www2.sys-con.com/itsg/virtualcd/Java/archives/0312/callahan/index.html
specifically I would look at breaking single-tier to three tier architecture to 
decouple the application,business and DB to differing structures
More immediate concerns would be migrating Type 1 (NonMultiUserAccess 
JDBCToOdbcBridge) to Type4 (True ThinCLient) JDBC driver

Please keep us apprised on your progress,
Martin --
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, November 18, 2006 11:33 AM
Subject: RE: Tomcat Performance Concerns


 From: Gaurav Kushwaha [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat Performance Concerns
 
 I have a simple JSP-application that makes use of an ODBC database
 (access).

Try using a real database with JDBC drivers.  Access and ODBC are pretty
much just toys and inappropriate for any kind of production environment.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Performance Concerns

2006-11-18 Thread Caldarale, Charles R
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Subject: Re: Tomcat Performance Concerns
 
 I would recommend a migration to true multi-threaded 
 environment with a DB which has full Transaction support
 such as Oracle

For once, I at least partially agree with Martin, but I would not use
Oracle - too expensive.  If you're moving up from Access, then MySQL
would be a several orders of magnitude improvment, and it's free.  If
you're running a Windows Server environment, you may already have SQL
Server available.  However, the Microsoft JDBC drivers for that are not
well regarded, and should be replaced by more robust open-source
versions (Google or search the Tomcat archives for recommendations):
http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2


 I would look at breaking single-tier to three tier
 architecture to decouple the application, business
 and DB to differing structures

Don't assume that a multi-tier implementation requires multiple boxes.
It's perfectly fine to run multiple layers on a single system as long as
you don't require the ultimate in performance and isolation (and few
applications really do).

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problems with connector

2006-11-18 Thread Rainer Jung
Adding to my own comments: I think I found a problem. So one more question:

Do you also observe a real problem, or only the info log messages. Do
the requests actually fail?


Regards,

Rainer

Enrico Donelli schrieb:
 Thanks Rainer for your reply!
 
 Here's my mod_jk.conf
 
 I solved my previous error adding the directive
 JkShmFile /var/log/apache2/mod_jk.shm
 (see later the copy of the file)
 
 Now I have different errors:
 
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1170): (ajp13) socket 33 is not
 connected any more (errno=11)
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
 request. Will try another pooled connection
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1218): (ajp13) all endpoints are
 disconnected or dead
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat
 failed,  recoverable operation attempt=1
 
 What do they mean?
 
 I'm using versions
 mod_jk/1.2.19
 Apache/2.0.54
 tomcat/5.5.20
 
 
 Thanks again!!
 
 Enrico
 
 
 # ===
 # mod_jk.conf
 
 # Load mod_jk module
 LoadModulejk_module  /usr/lib/apache2/modules/mod_jk.so
 # Declare the module for IfModule directive (remove this line on
 Apache 2.0.x)
 #AddModule mod_jk.c
 # Where to find workers.properties
 JkWorkersFile /etc/apache2/workers.properties
 # Where to put jk logs
 JkLogFile /var/log/apache2/mod_jk.log
 
 JkShmFile /var/log/apache2/mod_jk.shm
 
 
 # Set the jk log level [debug/error/info]
 JkLogLevelinfo
 # Select the log format
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 # JkOptions indicate to send SSL KEY SIZE,
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 # JkRequestLogFormat set the request format
 JkRequestLogFormat %w %V %T
 # Send servlet for context /examples to worker named worker1
 #JkMount  /examples/servlet/* worker1
 # Send JSPs  for context /examples to worker named worker1
 
 
 #== workers.properties =
 workers.tomcat_home=/tomcat/dir
 workers.java_home=/opt/jdk
 ps=/
 worker.list=ajp13
 worker.ajp12.port=8007
 worker.ajp12.host=localhost
 worker.ajp12.type=ajp12
 worker.ajp12.lbfactor=1
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 #worker.ajp13.connection_pool_size
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp12, ajp13
 
 worker.inprocess.type=jni
 
 
 
 
 
 
 
 
 On 17/11/06, Rainer Jung [EMAIL PROTECTED] wrote:
 Please give details on your mod_jk version and concerning your
 configuration (mod_jk config inside httpd.conf and workers.properties).

 Errno 2 looks line not such file or directory. So does
 /etc/apache2/logs/jk-runtime-status exist as a file and is the apache
 user allowed to write into it. Does the directory /etc/apache2/logs
 exist and again, does the apache user have write permissions there?

 Does the log message already show, when you are starting? If yes, could
 you reproduce with JkLogLevel trace and provide the resulting file?

 Regards,

 Rainer


 Enrico Donelli schrieb:
  Hi all,
  I'm having some problems with the mod_jk connector.
  In mod_jk logs file I have a lot of lines like
 
  [Fri Nov 17 23:07:18 2006] [12236:7072] [error]
  jk_child_init::mod_jk.c (2406): Attachning
  shm:/etc/apache2/logs/jk-runtime-status errno=2
 
  and from time to time the connector completely locks apache, forcing
  me to restart both apache and tomcat.
 
 
  Any idea? I could find no documentation about this error :((
 
  I'm using debian3.1, jdk1.5.0_05 and tomcat 5.20.
 
  Thanks in advance!!
  Enrico
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Performance Concerns

2006-11-18 Thread Len Popp

Can you determine which part of the system is running slowly? One thing to
try would be a simplified version of your application that doesn't access
the database - if it is still slow then you know it's not related to the DB.
You could also add logging messages at various points to measure how long
different parts of the application take. That will tell you what operation
is taking all the time. (I can't think of any particular reason why Win 2000
would be so much slower than Win XP.)

Also, make sure you're allocating a good amount of memory for the JVM on the
slow machine, so it doesn't spend all its time in garbage collection.

As for the Access database, I've used Access on a development machine with
no problems. (I used the Access ODBC driver and Sun's JDBC-ODBC bridge.)
Performance definitely wasn't as good as MySQL or SQL Server, but it was
fine for development and testing.
--
Len

On 11/18/06, Gaurav Kushwaha [EMAIL PROTECTED] wrote:


I have a simple JSP-application that makes use of an ODBC database
(access). When I run it using Tomcat on PC2 (XP) its performance is
very good. However, running on PC1 (W2K Server) is orders of
magnitudes slower! :-(

I have already read most of the relevant manuals and tried various
settings (server.xml, JAVA_OPTS, ...). No help.

Has anybody observed similiar problems?
Any help is appreciated...

Gaurav Singh Kushwaha
Ph: +91-9880101496
Bangalore, India.
http://www.chakpak.com




Re: Tomcat Performance Concerns

2006-11-18 Thread Martin Gainty

You can purchase Oracle Lite 32 concurrent connections with transaction support 
for 90.00 thru University of Wisconsin
http://wwwtest.techstore.doit.wisc.edu/product.asp?itemnum=C13093login=D

Oracle Lite Doc available at
http://download-east.oracle.com/docs/html/A97672_01/wn32db.htm

There are a ton of sites to get oracle information from one of the most 
frequently visited sites is Oracles AskTom
http://asktom.oracle.com

One of the best sites for DBA oracle resources is Don Burleson's site located at
http://www.dba-oracle.com/articles.htm

HTH,
Martin --
Oracle has alot of bells and whistles which you can add on as needed but an out 
of the box 
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, November 18, 2006 12:09 PM
Subject: RE: Tomcat Performance Concerns


 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Subject: Re: Tomcat Performance Concerns
 
 I would recommend a migration to true multi-threaded 
 environment with a DB which has full Transaction support
 such as Oracle

For once, I at least partially agree with Martin, but I would not use
Oracle - too expensive.  If you're moving up from Access, then MySQL
would be a several orders of magnitude improvment, and it's free.  If
you're running a Windows Server environment, you may already have SQL
Server available.  However, the Microsoft JDBC drivers for that are not
well regarded, and should be replaced by more robust open-source
versions (Google or search the Tomcat archives for recommendations):
http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2


 I would look at breaking single-tier to three tier
 architecture to decouple the application, business
 and DB to differing structures

Don't assume that a multi-tier implementation requires multiple boxes.
It's perfectly fine to run multiple layers on a single system as long as
you don't require the ultimate in performance and isolation (and few
applications really do).

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Pooling Issue

2006-11-18 Thread tyju tiui
I'm having problems setting up connection pooling with
comcat 5.5.2.0 and MySQL 5.0.24 using mysql
connector/J 5.0.

I've setup / populated a test database and verified
that I can login to the server/db using the specified
username/password/host found in the connection string.
My server.xml looks like this:
!-- Example Server Configuration File --
!-- Note that component elements are nested
corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents
the entire JVM,
 which may contain one or more Service
instances.  The Server
 listens for a shutdown command on the indicated
port.

 Note:  A Server is not itself a Container, so
you may not
 define subcomponents such as Valves or
Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN

  !-- Comment these entries out to disable JMX MBeans
support used for the
   administration web application --
  Listener
className=org.apache.catalina.core.AprLifecycleListener
/
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener
/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
  Listener
className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue
type=java.lang.Integer value=30/

!-- Editable user database that can also be used
by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated
and saved
  
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

  /GlobalNamingResources

  !-- A Service is a collection of one or more
Connectors that share
   a single Container (and therefore the web
applications visible
   within that Container).  Normally, that
Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container,
so you may not
   define subcomponents such as Valves or
Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Catalina

!-- A Connector represents an endpoint by which
requests are received
 and responses are returned.  Each Connector
passes requests on to the
 associated Container (normally an Engine)
for processing.

 By default, a non-SSL HTTP/1.1 Connector is
established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector
on port 8443 by
 following the instructions below and
uncommenting the second Connector
 entry.  SSL support requires the following
steps (see the SSL Config
 HOWTO in the Tomcat 5 documentation bundle
for more detailed
 instructions):
 * If your JDK version 1.3 or prior, download
and install JSSE 1.0.2 or
   later, and put the JAR files into
$JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias
tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias
tomcat -keyalg RSA  (Unix)
   with a password value of changeit for
both the certificate and
   the keystore itself.

 By default, DNS lookups are enabled when a
web application calls
 request.getRemoteHost().  This can have an
adverse impact on
 performance, so you can disable it by setting
the
 enableLookups attribute to false.  When
DNS lookups are disabled,
 request.getRemoteHost() will return the
String version of the
 IP address of the remote client.
--

!-- Define a non-SSL HTTP/1.1 Connector on port
8080 --
Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false
redirectPort=8443 acceptCount=100
   connectionTimeout=2
disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set
connectionTimeout value
 to 0 --

!-- Note : To use gzip compression you could
set the following properties :

   compression=on
   compressionMinSize=2048
  
noCompressionUserAgents=gozilla, traviata
  
compressableMimeType=text/html,text/xml
--

!-- Define a SSL HTTP/1.1 Connector on port 8443
--
!--
Connector port=8443 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false
disableUploadTimeout=true
   acceptCount=100 scheme=https
secure=true
   clientAuth=false sslProtocol=TLS /
--

!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009
   enableLookups=false
redirectPort=8443 protocol=AJP/1.3 /

!-- 

Re: Pooling Issue

2006-11-18 Thread David Smith
For starters, you might want to make a copy of your server.xml file for 
documentation purposes and then drop all the comments from the active 
one.  The documentation comments are excellent, but they make the 
serverl.xml near impossible to read.


At any rate the exception is connection refused.  Are you sure your 
MySQL server is listening on port 3306?  Some default configurations use 
unix sockets exclusively -- something java JDBC drivers can't do.  Try 
this from the same machine your server is on:


mysql -h localhost -P 3306 -u rpd -p

The above command forces mysql client to connect via TCP/IP with userid 
rpd and prompt for a password.  If this works, then we're looking at 
something else.  If this doesn't, reconfigure your mysql server to 
listen on tcp/ip port 3306 and try again.


Some additional recommendations -- not directly related to your issue, 
but worth mentioning:


The Context ... ... /Context block should be in it's own xml file 
under conf/Catalina/localhost, named to match the context of your webapp 
-- DBTest.xml in your case.  Avoid setting this in server.xml as it 
requires restarting the tomcat container every time you want to make a 
change to your webapp's config.


Drop the autoReconnect=true from your database url.  It isn't 
recommended by MySQL and doesn't make sense in a database connection 
pool anyway.


--David

tyju tiui wrote:

I'm having problems setting up connection pooling with
comcat 5.5.2.0 and MySQL 5.0.24 using mysql
connector/J 5.0.

I've setup / populated a test database and verified
that I can login to the server/db using the specified
username/password/host found in the connection string.
My server.xml looks like this:

  

 snipped here  a lot of irrelevant stuff to the issue at hand. /

!-- ** Pooling Config ** --
Context path=/DBTest docBase=DBTest
 debug=5 reloadable=true
crossContext=true


  

 snipped again./

Resource name=jdbc/TestDB
  auth=Container
  type=javax.sql.DataSource
 
factory=org.apache.commons.dbcp.BasicDataSourceFactory

  maxActive=100
  username=rpd
  password=2wERk4rpd
  maxIdle=30
  maxWait=1
 
driverClassName=com.mysql.jdbc.Driver

  removeAbandoned=true
 
url=jdbc:mysql://localhost:3306/phptest?autoReconnect=true

  /

/Context
!-- ** End Pooling ** --

  /Host

/Engine

  /Service

/Server







I'm using the sample web.xml and test.jsp found at:
http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html






There error I'm getting is:

org.apache.jasper.JasperException: Unable to get
connection, DataSource invalid:
org.apache.commons.dbcp.SQLNestedException: Cannot
create PoolableConnectionFactory (Server connection
failure during transaction. Due to underlying
exception: 'java.net.SocketException:
java.net.ConnectException: Connection refused'.

** BEGIN NESTED EXCEPTION ** 


java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException:
Connection refused
at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276)
at
com.mysql.jdbc.Connection.createNewIO(Connection.java:2815)
at
com.mysql.jdbc.Connection.init(Connection.java:1531)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
Source)
at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown
Source)
at
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
at
org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at

UnsatisfiedLinkError while using JNI

2006-11-18 Thread Daniel Wildschut
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,
I am using JNI to load a library which
I use for a Web Service running on a Tomcat5.5-Server
using Axis. My problem is that when I call a native function
it immediatly fails with java.lang.UnsatisfiedLinkError:
new_ParticleSocket__SWIG_0 ( new_ParticleSocket__SWIG_0 being the
function called ). No further information is provided by the exception.
After checking the obvious ( classpath and
java.library.path/LD_LIBRARY_PATH, also checked if the library was
loaded twice ) I checked the library itself ( which is generated by SWIG
1.3.29 ) using nm to see if all symbols were generated correctly ( which
they were, the symbols are all in the form
Java_edu_teco_particles_libParticle_libparticleJNI_* and in a standalone
form without the prefix).
I then used LD_DEBUG=all to check if the library was indeed loaded.
There I found that the library was loaded however when JNI searches for
the necessary function it does not search the newly loaded library.
( A lookup is performed on all libraries loaded before but not on the
new library )
I am using Debian GNU/Linux with Sun JDK 1.5.08

Any help would be appreciated

 - Daniel Wildschut
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFX3dDUS3Mvw9vkgURArBYAJ9HFskU8O8jSXvBibCA0X+mqv4FPwCbBIDk
jRUTnbGR1+t+ejlH9OLCoTk=
=VkIX
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: UnsatisfiedLinkError while using JNI

2006-11-18 Thread Martin Gainty
the entries in the LD_LIBRARY_PATH must be colon separated
if your setting thru bash make sure you export LD_LIBRARY_PATH
If none that works take a look at these LD_LIBRARY_PATH diagnostics
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: Daniel Wildschut [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Saturday, November 18, 2006 4:12 PM
Subject: UnsatisfiedLinkError while using JNI


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hello,
 I am using JNI to load a library which
 I use for a Web Service running on a Tomcat5.5-Server
 using Axis. My problem is that when I call a native function
 it immediatly fails with java.lang.UnsatisfiedLinkError:
 new_ParticleSocket__SWIG_0 ( new_ParticleSocket__SWIG_0 being the
 function called ). No further information is provided by the exception.
 After checking the obvious ( classpath and
 java.library.path/LD_LIBRARY_PATH, also checked if the library was
 loaded twice ) I checked the library itself ( which is generated by SWIG
 1.3.29 ) using nm to see if all symbols were generated correctly ( which
 they were, the symbols are all in the form
 Java_edu_teco_particles_libParticle_libparticleJNI_* and in a standalone
 form without the prefix).
 I then used LD_DEBUG=all to check if the library was indeed loaded.
 There I found that the library was loaded however when JNI searches for
 the necessary function it does not search the newly loaded library.
 ( A lookup is performed on all libraries loaded before but not on the
 new library )
 I am using Debian GNU/Linux with Sun JDK 1.5.08
 
 Any help would be appreciated
 
 - Daniel Wildschut
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.5 (GNU/Linux)
 
 iD8DBQFFX3dDUS3Mvw9vkgURArBYAJ9HFskU8O8jSXvBibCA0X+mqv4FPwCbBIDk
 jRUTnbGR1+t+ejlH9OLCoTk=
 =VkIX
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: Pooling Issue

2006-11-18 Thread tyju tiui
Hi David,

Thank you so much for the response and good advice.
I verified that I was able to connect to MySQL using
the command you suggested (via port 3306). I also
removed the autoReconnect parameter and moved the
pooling config out to Catalina/localhost/DBTest.xml. I
restarted tomcat and I'm still having the same issue.

Do you have any other ideas?

Thanks again,

Ty



--- David Smith [EMAIL PROTECTED] wrote:

 For starters, you might want to make a copy of your
 server.xml file for 
 documentation purposes and then drop all the
 comments from the active 
 one.  The documentation comments are excellent, but
 they make the 
 serverl.xml near impossible to read.
 
 At any rate the exception is connection refused.
  Are you sure your 
 MySQL server is listening on port 3306?  Some
 default configurations use 
 unix sockets exclusively -- something java JDBC
 drivers can't do.  Try 
 this from the same machine your server is on:
 
 mysql -h localhost -P 3306 -u rpd -p
 
 The above command forces mysql client to connect via
 TCP/IP with userid 
 rpd and prompt for a password.  If this works, then
 we're looking at 
 something else.  If this doesn't, reconfigure your
 mysql server to 
 listen on tcp/ip port 3306 and try again.
  
 Some additional recommendations -- not directly
 related to your issue, 
 but worth mentioning:
 
 The Context ... ... /Context block should be in
 it's own xml file 
 under conf/Catalina/localhost, named to match the
 context of your webapp 
 -- DBTest.xml in your case.  Avoid setting this in
 server.xml as it 
 requires restarting the tomcat container every time
 you want to make a 
 change to your webapp's config.
 
 Drop the autoReconnect=true from your database url. 
 It isn't 
 recommended by MySQL and doesn't make sense in a
 database connection 
 pool anyway.
 
 --David
 
 tyju tiui wrote:
  I'm having problems setting up connection pooling
 with
  comcat 5.5.2.0 and MySQL 5.0.24 using mysql
  connector/J 5.0.
 
  I've setup / populated a test database and
 verified
  that I can login to the server/db using the
 specified
  username/password/host found in the connection
 string.
  My server.xml looks like this:
 

   snipped here  a lot of irrelevant stuff to
 the issue at hand. /
  !-- ** Pooling Config **
 --
  Context path=/DBTest docBase=DBTest
   debug=5 reloadable=true
  crossContext=true
 
 

  snipped again./
  Resource name=jdbc/TestDB
auth=Container
type=javax.sql.DataSource
   
 

factory=org.apache.commons.dbcp.BasicDataSourceFactory
maxActive=100
username=rpd
password=2wERk4rpd
maxIdle=30
maxWait=1
   
  driverClassName=com.mysql.jdbc.Driver
removeAbandoned=true
   
 

url=jdbc:mysql://localhost:3306/phptest?autoReconnect=true
/
 
  /Context
  !-- ** End Pooling ** --
 
/Host
 
  /Engine
 
/Service
 
  /Server
 
 
 
 
 
 
 
  I'm using the sample web.xml and test.jsp found
 at:
 

http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
 
 
 
 
 
 
  There error I'm getting is:
 
  org.apache.jasper.JasperException: Unable to get
  connection, DataSource invalid:
  org.apache.commons.dbcp.SQLNestedException:
 Cannot
  create PoolableConnectionFactory (Server
 connection
  failure during transaction. Due to underlying
  exception: 'java.net.SocketException:
  java.net.ConnectException: Connection refused'.
 
  ** BEGIN NESTED EXCEPTION ** 
 
  java.net.SocketException
  MESSAGE: java.net.ConnectException: Connection
 refused
 
  STACKTRACE:
 
  java.net.SocketException:
 java.net.ConnectException:
  Connection refused
  at
 

com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
  at
 com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276)
  at
 

com.mysql.jdbc.Connection.createNewIO(Connection.java:2815)
  at
 

com.mysql.jdbc.Connection.init(Connection.java:1531)
  at
 

com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
  at
 

org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
  at
 

org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
  at
 

org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
  at
 

org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
  at
 

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
  at
 

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
  Source)
  at
 


Re: UnsatisfiedLinkError while using JNI

2006-11-18 Thread Daniel Wildschut
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,
the library itself is found and loaded ( at least according to
LD_DEBUG=all ), also if the library is not in the LD_LIBRARY_PATH I get
a different error ( the runtime telling me the library could not be loaded).

- - Daniel Wildschut

Martin Gainty wrote:
 the entries in the LD_LIBRARY_PATH must be colon separated
 if your setting thru bash make sure you export LD_LIBRARY_PATH
 If none that works take a look at these LD_LIBRARY_PATH diagnostics
 http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
 
 M-
 This e-mail communication and any attachments may contain confidential and 
 privileged information for the use of the 
 designated recipients named above. If you are not the intended recipient, you 
 are hereby notified that you have received
 this communication in error and that any review, disclosure, dissemination, 
 distribution or copying of it or its 
 contents
 - Original Message - 
 From: Daniel Wildschut [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Saturday, November 18, 2006 4:12 PM
 Subject: UnsatisfiedLinkError while using JNI
 
 
 Hello,
 I am using JNI to load a library which
 I use for a Web Service running on a Tomcat5.5-Server
 using Axis. My problem is that when I call a native function
 it immediatly fails with java.lang.UnsatisfiedLinkError:
 new_ParticleSocket__SWIG_0 ( new_ParticleSocket__SWIG_0 being the
 function called ). No further information is provided by the exception.
 After checking the obvious ( classpath and
 java.library.path/LD_LIBRARY_PATH, also checked if the library was
 loaded twice ) I checked the library itself ( which is generated by SWIG
 1.3.29 ) using nm to see if all symbols were generated correctly ( which
 they were, the symbols are all in the form
 Java_edu_teco_particles_libParticle_libparticleJNI_* and in a standalone
 form without the prefix).
 I then used LD_DEBUG=all to check if the library was indeed loaded.
 There I found that the library was loaded however when JNI searches for
 the necessary function it does not search the newly loaded library.
 ( A lookup is performed on all libraries loaded before but not on the
 new library )
 I am using Debian GNU/Linux with Sun JDK 1.5.08
 
 Any help would be appreciated
 
 - Daniel Wildschut

- -
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFX39wUS3Mvw9vkgURAixpAKCh2kMLolGaGQjSbNhSHmSVYSLNbQCgzDsk
2WUnnKZboeY2/o+mTiXHudc=
=K55o
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problems with connector

2006-11-18 Thread Enrico Donelli

Thanks a lot for your help Rainer, I really appreciate.


From time to time (every couple of weeks) the connector completely

hangs apache. Tomcat alone is still alive, but apache no longer
replies to requests, and I need to restart both

Now it's working properly, but there are still many error in log files:

[Sat Nov 18 22:43:13 2006] [28124:7072] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (914): sendfull
returned -32 with errno=32
[Sat Nov 18 22:43:13 2006] [28124:7072] [info]
ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
request. Will try another pooled connection

or

[Sat Nov 18 22:08:36 2006] [27825:7072] [info]
ajp_process_callback::jk_ajp_common.c (1410): Writing to client
aborted or client network problems
[Sat Nov 18 22:08:36 2006] [27825:7072] [info]
ajp_service::jk_ajp_common.c (1795): (ajp13) request failed, because
of client write error without recovery in send loop attempt=0
[Sat Nov 18 22:08:36 2006] ajp13 www.scandinaviadesign.it 24.124384
[Sat Nov 18 22:08:36 2006] [27825:7072] [info]  jk_handler::mod_jk.c
(2056): Aborting connection for worker=ajp13

Thanks again!!!

Enrico

On 18/11/06, Rainer Jung [EMAIL PROTECTED] wrote:

Adding to my own comments: I think I found a problem. So one more question:

Do you also observe a real problem, or only the info log messages. Do
the requests actually fail?


Regards,

Rainer

Enrico Donelli schrieb:
 Thanks Rainer for your reply!

 Here's my mod_jk.conf

 I solved my previous error adding the directive
 JkShmFile /var/log/apache2/mod_jk.shm
 (see later the copy of the file)

 Now I have different errors:

 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1170): (ajp13) socket 33 is not
 connected any more (errno=11)
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
 request. Will try another pooled connection
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_send_request::jk_ajp_common.c (1218): (ajp13) all endpoints are
 disconnected or dead
 [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
 ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat
 failed,  recoverable operation attempt=1

 What do they mean?

 I'm using versions
 mod_jk/1.2.19
 Apache/2.0.54
 tomcat/5.5.20


 Thanks again!!

 Enrico


 # ===
 # mod_jk.conf
 
 # Load mod_jk module
 LoadModulejk_module  /usr/lib/apache2/modules/mod_jk.so
 # Declare the module for IfModule directive (remove this line on
 Apache 2.0.x)
 #AddModule mod_jk.c
 # Where to find workers.properties
 JkWorkersFile /etc/apache2/workers.properties
 # Where to put jk logs
 JkLogFile /var/log/apache2/mod_jk.log

 JkShmFile /var/log/apache2/mod_jk.shm


 # Set the jk log level [debug/error/info]
 JkLogLevelinfo
 # Select the log format
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 # JkOptions indicate to send SSL KEY SIZE,
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 # JkRequestLogFormat set the request format
 JkRequestLogFormat %w %V %T
 # Send servlet for context /examples to worker named worker1
 #JkMount  /examples/servlet/* worker1
 # Send JSPs  for context /examples to worker named worker1


 #== workers.properties =
 workers.tomcat_home=/tomcat/dir
 workers.java_home=/opt/jdk
 ps=/
 worker.list=ajp13
 worker.ajp12.port=8007
 worker.ajp12.host=localhost
 worker.ajp12.type=ajp12
 worker.ajp12.lbfactor=1
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 #worker.ajp13.connection_pool_size
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp12, ajp13

 worker.inprocess.type=jni








 On 17/11/06, Rainer Jung [EMAIL PROTECTED] wrote:
 Please give details on your mod_jk version and concerning your
 configuration (mod_jk config inside httpd.conf and workers.properties).

 Errno 2 looks line not such file or directory. So does
 /etc/apache2/logs/jk-runtime-status exist as a file and is the apache
 user allowed to write into it. Does the directory /etc/apache2/logs
 exist and again, does the apache user have write permissions there?

 Does the log message already show, when you are starting? If yes, could
 you reproduce with JkLogLevel trace and provide the resulting file?

 Regards,

 Rainer


 Enrico Donelli schrieb:
  Hi all,
  I'm having some problems with the mod_jk connector.
  In mod_jk logs file I have a lot of lines like
 
  [Fri Nov 17 23:07:18 2006] [12236:7072] [error]
  jk_child_init::mod_jk.c (2406): Attachning
  shm:/etc/apache2/logs/jk-runtime-status errno=2
 
  and from time to time the connector completely locks apache, forcing
  me to restart both apache and tomcat.
 
 
  Any idea? I could find no documentation about this error :((
 
  I'm using debian3.1, jdk1.5.0_05 and tomcat 5.20.
 
  Thanks in advance!!
  Enrico
 

 

Re: Response encoding problem

2006-11-18 Thread ruphus13

Hi - I'm trying to show utf-8 data in the browser from my jsp page.
When the page renders, its character encoding is iso-8859-1, according
to the browser.  The http
response headers have the same encoding (iso-8859-1).

Here's what's been done thus far:

1) meta tag set as follows:
meta http-equiv=Content-Type content=text/html; charset=utf-8/

2) jsp page encoding directive issued at the start of the jsp page.
[EMAIL PROTECTED] contentType=text/html; charset=UTF-8%

3) Generated jsp page has the following java code, as a consequence:
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType(text/html; charset=UTF-8);
pageContext = _jspxFactory.getPageContext(this, request, response,
  null, false, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
out = pageContext.getOut();
_jspx_out = out;
...
4) When I save the page as an html file and open it as an html file in
the browser, it renders correctly (due to the meta tag and no http
headers), which is expected.

5) Manually changing the page encoding in firefox results in the page
being rendered correctly.

6) Also set utf-8 in the connector settings in tomcat/conf/server.xml
(for GETs?)

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8080 minProcessors=5 maxProcessors=75
 URIEncoding=UTF-8 useBodyEncodingForURI=true
 enableLookups=true redirectPort=8443
 acceptCount=100 debug=0 connectionTimeout=2
 useURIValidationHack=false disableUploadTimeout=true /

7) Set utf-8 in web.xml as follows:
servlet
  servlet-namejsp/servlet-name
  servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
  init-param
  param-namejavaEncoding/param-name
  param-valueUTF8/param-value
  /init-param
...

However, the page still shows up as iso-8859-1 (in firefox and IE),
and viewing the response headers using a 3rd party plugin shows the
content-type as ISO-8859-1

Tomcat: 4.1.31
JDK: 1.4.2

What I'm hoping to learn is how to set the http response headers
correctly.  It seems that the generated java code is doing the right
thing.  However, the response header is still jacked...

Any help will be very, very much appreciated!  I've gone through
several articles on Goog as well as the tomcat mailing list... The
brick wall is getting bloodier, and I'm getting woozy from the
pounding...

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Response encoding problem

2006-11-18 Thread Enrico Donelli

I don't know if this helps, but I had a similar problems once, and it
was caused by a filter which was reading a parameter from the request.
This first access set the encoding to 8859-1, overriding all my
following settings.

I would start from this ... hope this helps.
Good luck!

Enrico

On 18/11/06, ruphus13 [EMAIL PROTECTED] wrote:

Hi - I'm trying to show utf-8 data in the browser from my jsp page.
When the page renders, its character encoding is iso-8859-1, according
to the browser.  The http
response headers have the same encoding (iso-8859-1).

Here's what's been done thus far:

1) meta tag set as follows:
meta http-equiv=Content-Type content=text/html; charset=utf-8/

2) jsp page encoding directive issued at the start of the jsp page.
[EMAIL PROTECTED] contentType=text/html; charset=UTF-8%

3) Generated jsp page has the following java code, as a consequence:
try {
 _jspxFactory = JspFactory.getDefaultFactory();
 response.setContentType(text/html; charset=UTF-8);
 pageContext = _jspxFactory.getPageContext(this, request, response,
   null, false, 8192, true);
 application = pageContext.getServletContext();
 config = pageContext.getServletConfig();
 out = pageContext.getOut();
 _jspx_out = out;
...
4) When I save the page as an html file and open it as an html file in
the browser, it renders correctly (due to the meta tag and no http
headers), which is expected.

5) Manually changing the page encoding in firefox results in the page
being rendered correctly.

6) Also set utf-8 in the connector settings in tomcat/conf/server.xml
(for GETs?)

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8080 minProcessors=5 maxProcessors=75
  URIEncoding=UTF-8 useBodyEncodingForURI=true
  enableLookups=true redirectPort=8443
  acceptCount=100 debug=0 connectionTimeout=2
  useURIValidationHack=false disableUploadTimeout=true /

7) Set utf-8 in web.xml as follows:
servlet
   servlet-namejsp/servlet-name
   servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
   init-param
   param-namejavaEncoding/param-name
   param-valueUTF8/param-value
   /init-param
...

However, the page still shows up as iso-8859-1 (in firefox and IE),
and viewing the response headers using a 3rd party plugin shows the
content-type as ISO-8859-1

Tomcat: 4.1.31
JDK: 1.4.2

What I'm hoping to learn is how to set the http response headers
correctly.  It seems that the generated java code is doing the right
thing.  However, the response header is still jacked...

Any help will be very, very much appreciated!  I've gone through
several articles on Goog as well as the tomcat mailing list... The
brick wall is getting bloodier, and I'm getting woozy from the
pounding...

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: UnsatisfiedLinkError while using JNI

2006-11-18 Thread Caldarale, Charles R
 From: Daniel Wildschut [mailto:[EMAIL PROTECTED] 
 Subject: UnsatisfiedLinkError while using JNI

 I then used LD_DEBUG=all to check if the library was indeed loaded.
 There I found that the library was loaded however when JNI searches
 for the necessary function it does not search the newly loaded
library.

This may be a classloader conflict.  What triggers the loading of the
native library?  If this is done under a classloader that's not in the
same branch of the tree that's now making the reference to the native
method, it may not be able to find it.  Look at:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
for Tomcat classloading info.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Response encoding problem

2006-11-18 Thread Caldarale, Charles R
 From: Enrico Donelli [mailto:[EMAIL PROTECTED] 
 Subject: Re: Response encoding problem
 
 I don't know if this helps, but I had a similar problems once, and it
 was caused by a filter which was reading a parameter from the request.
 This first access set the encoding to 8859-1, overriding all my
 following settings.

Also, I have a vague memory that the JSP source itself must be stored in
UTF-8, if there are any non-ASCII characters in it.  Might want to check
the archives for 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problems with connector

2006-11-18 Thread Rainer Jung
Hi Enrico,

would you be so kind and answer some of the questions in my previous
mails, before we proceed to further questions from your side :)

Regards,

Rainer

Enrico Donelli schrieb:
 Thanks a lot for your help Rainer, I really appreciate.
 
 From time to time (every couple of weeks) the connector completely
 hangs apache. Tomcat alone is still alive, but apache no longer
 replies to requests, and I need to restart both
 
 Now it's working properly, but there are still many error in log files:
 
 [Sat Nov 18 22:43:13 2006] [28124:7072] [error]
 ajp_connection_tcp_send_message::jk_ajp_common.c (914): sendfull
 returned -32 with errno=32
 [Sat Nov 18 22:43:13 2006] [28124:7072] [info]
 ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
 request. Will try another pooled connection
 
 or
 
 [Sat Nov 18 22:08:36 2006] [27825:7072] [info]
 ajp_process_callback::jk_ajp_common.c (1410): Writing to client
 aborted or client network problems
 [Sat Nov 18 22:08:36 2006] [27825:7072] [info]
 ajp_service::jk_ajp_common.c (1795): (ajp13) request failed, because
 of client write error without recovery in send loop attempt=0
 [Sat Nov 18 22:08:36 2006] ajp13 www.scandinaviadesign.it 24.124384
 [Sat Nov 18 22:08:36 2006] [27825:7072] [info]  jk_handler::mod_jk.c
 (2056): Aborting connection for worker=ajp13
 
 Thanks again!!!
 
 Enrico
 
 On 18/11/06, Rainer Jung [EMAIL PROTECTED] wrote:
 Adding to my own comments: I think I found a problem. So one more
 question:

 Do you also observe a real problem, or only the info log messages. Do
 the requests actually fail?


 Regards,

 Rainer

 Enrico Donelli schrieb:
  Thanks Rainer for your reply!
 
  Here's my mod_jk.conf
 
  I solved my previous error adding the directive
  JkShmFile /var/log/apache2/mod_jk.shm
  (see later the copy of the file)
 
  Now I have different errors:
 
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_send_request::jk_ajp_common.c (1170): (ajp13) socket 33 is not
  connected any more (errno=11)
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
  request. Will try another pooled connection
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_send_request::jk_ajp_common.c (1218): (ajp13) all endpoints are
  disconnected or dead
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat
  failed,  recoverable operation attempt=1
 
  What do they mean?
 
  I'm using versions
  mod_jk/1.2.19
  Apache/2.0.54
  tomcat/5.5.20
 
 
  Thanks again!!
 
  Enrico
 
 
  # ===
  # mod_jk.conf
  
  # Load mod_jk module
  LoadModulejk_module  /usr/lib/apache2/modules/mod_jk.so
  # Declare the module for IfModule directive (remove this line on
  Apache 2.0.x)
  #AddModule mod_jk.c
  # Where to find workers.properties
  JkWorkersFile /etc/apache2/workers.properties
  # Where to put jk logs
  JkLogFile /var/log/apache2/mod_jk.log
 
  JkShmFile /var/log/apache2/mod_jk.shm
 
 
  # Set the jk log level [debug/error/info]
  JkLogLevelinfo
  # Select the log format
  JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
  # JkOptions indicate to send SSL KEY SIZE,
  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  # JkRequestLogFormat set the request format
  JkRequestLogFormat %w %V %T
  # Send servlet for context /examples to worker named worker1
  #JkMount  /examples/servlet/* worker1
  # Send JSPs  for context /examples to worker named worker1
 
 
  #== workers.properties =
  workers.tomcat_home=/tomcat/dir
  workers.java_home=/opt/jdk
  ps=/
  worker.list=ajp13
  worker.ajp12.port=8007
  worker.ajp12.host=localhost
  worker.ajp12.type=ajp12
  worker.ajp12.lbfactor=1
  worker.ajp13.port=8009
  worker.ajp13.host=localhost
  worker.ajp13.type=ajp13
  worker.ajp13.lbfactor=1
  #worker.ajp13.connection_pool_size
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=ajp12, ajp13
 
  worker.inprocess.type=jni
 
 
 
 
 
 
 
 
  On 17/11/06, Rainer Jung [EMAIL PROTECTED] wrote:
  Please give details on your mod_jk version and concerning your
  configuration (mod_jk config inside httpd.conf and
 workers.properties).
 
  Errno 2 looks line not such file or directory. So does
  /etc/apache2/logs/jk-runtime-status exist as a file and is the apache
  user allowed to write into it. Does the directory /etc/apache2/logs
  exist and again, does the apache user have write permissions there?
 
  Does the log message already show, when you are starting? If yes,
 could
  you reproduce with JkLogLevel trace and provide the resulting file?
 
  Regards,
 
  Rainer
 
 
  Enrico Donelli schrieb:
   Hi all,
   I'm having some problems with the mod_jk connector.
   In mod_jk logs file I have a lot of lines like
  
   [Fri Nov 17 23:07:18 2006] [12236:7072] [error]
   jk_child_init::mod_jk.c (2406): 

Re: Response encoding problem

2006-11-18 Thread Bill Barker
If your JSP page is being included from another servlet, then it won't be 
allowed to set the content-type (or charset) of the response.  Just a wild 
guess here :).

The HTTP/1.1 RFC states that the character encoding of the headers is 
iso-8859-1.  That is why Tomcat doesn't provide an option to change it.

ruphus13 [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi - I'm trying to show utf-8 data in the browser from my jsp page.
 When the page renders, its character encoding is iso-8859-1, according
 to the browser.  The http
 response headers have the same encoding (iso-8859-1).

 Here's what's been done thus far:

 1) meta tag set as follows:
 meta http-equiv=Content-Type content=text/html; charset=utf-8/

 2) jsp page encoding directive issued at the start of the jsp page.
 [EMAIL PROTECTED] contentType=text/html; charset=UTF-8%

 3) Generated jsp page has the following java code, as a consequence:
 try {
 _jspxFactory = JspFactory.getDefaultFactory();
 response.setContentType(text/html; charset=UTF-8);
 pageContext = _jspxFactory.getPageContext(this, request, response,
   null, false, 8192, true);
 application = pageContext.getServletContext();
 config = pageContext.getServletConfig();
 out = pageContext.getOut();
 _jspx_out = out;
 ...
 4) When I save the page as an html file and open it as an html file in
 the browser, it renders correctly (due to the meta tag and no http
 headers), which is expected.

 5) Manually changing the page encoding in firefox results in the page
 being rendered correctly.

 6) Also set utf-8 in the connector settings in tomcat/conf/server.xml
 (for GETs?)

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8080 minProcessors=5 maxProcessors=75
  URIEncoding=UTF-8 useBodyEncodingForURI=true
  enableLookups=true redirectPort=8443
  acceptCount=100 debug=0 connectionTimeout=2
  useURIValidationHack=false disableUploadTimeout=true /

 7) Set utf-8 in web.xml as follows:
 servlet
   servlet-namejsp/servlet-name
   servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
   init-param
   param-namejavaEncoding/param-name
   param-valueUTF8/param-value
   /init-param
 ...

 However, the page still shows up as iso-8859-1 (in firefox and IE),
 and viewing the response headers using a 3rd party plugin shows the
 content-type as ISO-8859-1

 Tomcat: 4.1.31
 JDK: 1.4.2

 What I'm hoping to learn is how to set the http response headers
 correctly.  It seems that the generated java code is doing the right
 thing.  However, the response header is still jacked...

 Any help will be very, very much appreciated!  I've gone through
 several articles on Goog as well as the tomcat mailing list... The
 brick wall is getting bloodier, and I'm getting woozy from the
 pounding...

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Accessing Tomcat Manager failure

2006-11-18 Thread Rusty Mccloud
Attached is the server.xml file requested.

Regards,
Rusty
 

-Original Message-
From: Gregor Schneider [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 17, 2006 02:33 PM
To: Tomcat Users List; Martin Gainty
Subject: Re: Accessing Tomcat Manager failure

Please post the file $CATALINA_HOME/conf/server.xml so that we can see
where  how the ressource for your authorization is defined.

Greg
-- 
what's puzzlin' you, is the nature of my game

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

?xml version='1.0' encoding='utf-8'?
Server
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/
  GlobalNamingResources
Environment name=simpleValue type=java.lang.Integer value=30/
Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/
Resource name=jdbc/eiserver type=javax.sql.DataSource/
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
ResourceParams name=jdbc/eiserver
  parameter
namevalidationQuery/name
valueselect count(*) from dual/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namemaxActive/name
value60/value
  /parameter
  parameter
namepassword/name
valuezorro/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:oci8:eiserver/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
namemaxIdle/name
value5/value
  /parameter
  parameter
nameusername/name
valuehunt/value
  /parameter
/ResourceParams
  /GlobalNamingResources
  Service name=Catalina
Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443
/Connector
Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443
/Connector
Engine defaultHost=localhost name=Catalina
  Host appBase=webapps name=localhost
Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_log_test. suffix=.txt timestamp=true/
  /Host
  Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/
  
/Engine
  /Service
/Server
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: UnsatisfiedLinkError while using JNI

2006-11-18 Thread Daniel Wildschut
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,
I checked the classloader and indeed the problem was
a classloader conflict ( the imported classes used the System-default
ClassLoader, which lead to the problem ).
I was able to place the call to LoadLibrary into a separate class
which I put into the classpath. This solved the problem.

Thank you for your time  advice

- - Daniel Wildschut

Caldarale, Charles R wrote:
 From: Daniel Wildschut [mailto:[EMAIL PROTECTED] 
 Subject: UnsatisfiedLinkError while using JNI

 I then used LD_DEBUG=all to check if the library was indeed loaded.
 There I found that the library was loaded however when JNI searches
 for the necessary function it does not search the newly loaded
 library.
 
 This may be a classloader conflict.  What triggers the loading of the
 native library?  If this is done under a classloader that's not in the
 same branch of the tree that's now making the reference to the native
 method, it may not be able to find it.  Look at:
 http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
 for Tomcat classloading info.
 
  - 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 start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFX5auUS3Mvw9vkgURAolnAJ9g/TckEBJCaiSz7s4nS0lfDMBvZgCfdUUB
aSL3e87jRRe9Av8L7WmFCKw=
=Dt97
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Realtime notification of ThreadPool logFull

2006-11-18 Thread jwboring


Martin Gainty wrote:
 
 your diagnostic appears out of sync with your source. where did you
 acquire the source?
 

The app is deployed under the the binary distribution gotten from the web
site (http://tomcat.apache.org/download-55.cgi). We do not compile from the
source, at least not yet. I only got the source to check the log code.
Source came from the archives
(http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/). Can anyone
explain the log message I am getting that does not appear to be to commons
log? 

I'll install v5.5.20 Monday from binary and see if I get the same strange
log.

Jeff
-- 
View this message in context: 
http://www.nabble.com/Realtime-notification-of-ThreadPool-logFull-tf2654425.html#a7424775
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Performance Concerns

2006-11-18 Thread Gaurav Kushwaha

Thanks Martin and Everyone else for the suggestions.
Martin, Oracle I dont want to go with since its expensive. I will infact try
out MySQL and will let you guys know.

Regards,
Gaurav.
On 11/18/06, Martin Gainty [EMAIL PROTECTED] wrote:


Good Morning Gaurav-

It is truly Amazing how many managers who want to use Access DB in their
production environments
I would recommend a migration to true multi-threaded environment with a DB
which has full Transaction support such as Oracle
Take a look at

http://www2.sys-con.com/itsg/virtualcd/Java/archives/0312/callahan/index.html
specifically I would look at breaking single-tier to three tier
architecture to decouple the application,business and DB to differing
structures
More immediate concerns would be migrating Type 1 (NonMultiUserAccess
JDBCToOdbcBridge) to Type4 (True ThinCLient) JDBC driver

Please keep us apprised on your progress,
Martin --



Gaurav Singh Kushwaha
Ph: +91-9880101496
Bangalore, India.
http://www.chakpak.com


Re: Realtime notification of ThreadPool logFull

2006-11-18 Thread Rainer Jung
Hi Jeff,

jwboring schrieb:
 private static void logFull(Log loghelper, int currentThreadCount,
 int maxThreads) {
   if( logfull ) {
 log.error(sm.getString(threadpool.busy,
new Integer(currentThreadCount),
new Integer(maxThreads)));

Most likely this is the one you are interested in!

 logfull=false;
 } else if( log.isDebugEnabled() ) {
 log.debug(All threads are busy  + currentThreadCount +   +
   maxThreads );
 }
 }
 
 
 But this is NOT the log I am getting in catalina.out. Instead, I am getting,
 Nov 17, 2006 12:08:25 PM org.apache.tomcat.util.threads.ThreadPool logFull
 SEVERE: All threads (10) are currently busy, waiting. Increase maxThreads.
 What gives? I am getting other normal info, etc ... level messages but not
 this one. Using v5.5.17.
 
 Jeff

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Performance Concerns

2006-11-18 Thread Tomi NA

2006/11/19, Gaurav Kushwaha [EMAIL PROTECTED]:

Thanks Martin and Everyone else for the suggestions.
Martin, Oracle I dont want to go with since its expensive. I will infact try
out MySQL and will let you guys know.


I would argue that you chose one of the inferior database management
systems, but rather than start a flame war, I'll say that just for
completeness you should probably look into postgresql and firebird or
one of their object-oriented cousins like db4o (dual licenced, if I'm
not mistaking).
A lot more could be said on the topic, but this is a much, much better
start than the initial extreme...well, extremes (Access and Oracle).

Cheers,
t.n.a.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Response encoding problem

2006-11-18 Thread ruphus13

Thanks for all your help.  Here's some more data and an update:

1) The jsp is basically displaying unicode strings from the db.  So,
there is no other data other than a directive to print the string from
the db.
2) Running a direct query from the db shows the string correctly.  The
db is mysql.  The table type is innodb.  The charset has been set to
utf-8.
3) Currently, the locale is set as follows:

% java.util.Locale locale = request.getLocale();
   String userLocale = locale.toString(); %
fmt:setLocale value = ${userLocale}/

When I changed that to force the locale to utf-8, the browser
(firefox) was showing the page encoding as utf-8.  The response
headers were utf-8.  However, the string now was getting 'double
encoded', and was still showing up jacked.

I will try the filters route, and will try and see what is getting
passed in and out.
Will also try working with a very basic jsp page that just prints out
a static string to see how things are flowing through the app.

Any links on the 'best practices' to follow for such a scenario
(showing utf-8 strings from the db)?

Thanks in advance!


On 11/18/06, Bill Barker [EMAIL PROTECTED] wrote:

If your JSP page is being included from another servlet, then it won't be
allowed to set the content-type (or charset) of the response.  Just a wild
guess here :).

The HTTP/1.1 RFC states that the character encoding of the headers is
iso-8859-1.  That is why Tomcat doesn't provide an option to change it.

ruphus13 [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi - I'm trying to show utf-8 data in the browser from my jsp page.
 When the page renders, its character encoding is iso-8859-1, according
 to the browser.  The http
 response headers have the same encoding (iso-8859-1).

 Here's what's been done thus far:

 1) meta tag set as follows:
 meta http-equiv=Content-Type content=text/html; charset=utf-8/

 2) jsp page encoding directive issued at the start of the jsp page.
 [EMAIL PROTECTED] contentType=text/html; charset=UTF-8%

 3) Generated jsp page has the following java code, as a consequence:
 try {
 _jspxFactory = JspFactory.getDefaultFactory();
 response.setContentType(text/html; charset=UTF-8);
 pageContext = _jspxFactory.getPageContext(this, request, response,
   null, false, 8192, true);
 application = pageContext.getServletContext();
 config = pageContext.getServletConfig();
 out = pageContext.getOut();
 _jspx_out = out;
 ...
 4) When I save the page as an html file and open it as an html file in
 the browser, it renders correctly (due to the meta tag and no http
 headers), which is expected.

 5) Manually changing the page encoding in firefox results in the page
 being rendered correctly.

 6) Also set utf-8 in the connector settings in tomcat/conf/server.xml
 (for GETs?)

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8080 minProcessors=5 maxProcessors=75
  URIEncoding=UTF-8 useBodyEncodingForURI=true
  enableLookups=true redirectPort=8443
  acceptCount=100 debug=0 connectionTimeout=2
  useURIValidationHack=false disableUploadTimeout=true /

 7) Set utf-8 in web.xml as follows:
 servlet
   servlet-namejsp/servlet-name
   servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
   init-param
   param-namejavaEncoding/param-name
   param-valueUTF8/param-value
   /init-param
 ...

 However, the page still shows up as iso-8859-1 (in firefox and IE),
 and viewing the response headers using a 3rd party plugin shows the
 content-type as ISO-8859-1

 Tomcat: 4.1.31
 JDK: 1.4.2

 What I'm hoping to learn is how to set the http response headers
 correctly.  It seems that the generated java code is doing the right
 thing.  However, the response header is still jacked...

 Any help will be very, very much appreciated!  I've gone through
 several articles on Goog as well as the tomcat mailing list... The
 brick wall is getting bloodier, and I'm getting woozy from the
 pounding...

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pooling Issue

2006-11-18 Thread David Smith
Well that's a stumper.  The connection refused exception implies that 
nothing is listening on that port or the port is blocked by a firewall.  
Is there any more to that exception like a root cause?  Given you are 
using the localhost interface, I doubt this has a bearing but would you 
happen to have any iptables or other firewall software active?  In short 
is there anything in your system that might prevent the connection?


--David

tyju tiui wrote:

Hi David,

Thank you so much for the response and good advice.
I verified that I was able to connect to MySQL using
the command you suggested (via port 3306). I also
removed the autoReconnect parameter and moved the
pooling config out to Catalina/localhost/DBTest.xml. I
restarted tomcat and I'm still having the same issue.

Do you have any other ideas?

Thanks again,

Ty



--- David Smith [EMAIL PROTECTED] wrote:

  

For starters, you might want to make a copy of your
server.xml file for 
documentation purposes and then drop all the
comments from the active 
one.  The documentation comments are excellent, but
they make the 
serverl.xml near impossible to read.


At any rate the exception is connection refused.
 Are you sure your 
MySQL server is listening on port 3306?  Some
default configurations use 
unix sockets exclusively -- something java JDBC
drivers can't do.  Try 
this from the same machine your server is on:


mysql -h localhost -P 3306 -u rpd -p

The above command forces mysql client to connect via
TCP/IP with userid 
rpd and prompt for a password.  If this works, then
we're looking at 
something else.  If this doesn't, reconfigure your
mysql server to 
listen on tcp/ip port 3306 and try again.
 
Some additional recommendations -- not directly
related to your issue, 
but worth mentioning:


The Context ... ... /Context block should be in
it's own xml file 
under conf/Catalina/localhost, named to match the
context of your webapp 
-- DBTest.xml in your case.  Avoid setting this in
server.xml as it 
requires restarting the tomcat container every time
you want to make a 
change to your webapp's config.


Drop the autoReconnect=true from your database url. 
It isn't 
recommended by MySQL and doesn't make sense in a
database connection 
pool anyway.


--David

tyju tiui wrote:


I'm having problems setting up connection pooling
  

with


comcat 5.5.2.0 and MySQL 5.0.24 using mysql
connector/J 5.0.

I've setup / populated a test database and
  

verified


that I can login to the server/db using the
  

specified


username/password/host found in the connection
  

string.


My server.xml looks like this:

  
  

  snipped here  a lot of irrelevant stuff to
the issue at hand. /


!-- ** Pooling Config **
  

--


Context path=/DBTest docBase=DBTest
 debug=5 reloadable=true
crossContext=true


  
  

 snipped again./


Resource name=jdbc/TestDB
  auth=Container
  type=javax.sql.DataSource
 

  

factory=org.apache.commons.dbcp.BasicDataSourceFactory
  

  maxActive=100
  username=rpd
  password=2wERk4rpd
  maxIdle=30
  maxWait=1
 
driverClassName=com.mysql.jdbc.Driver

  removeAbandoned=true
 

  

url=jdbc:mysql://localhost:3306/phptest?autoReconnect=true
  

  /

/Context
!-- ** End Pooling ** --

  /Host

/Engine

  /Service

/Server







I'm using the sample web.xml and test.jsp found
  

at:


http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
  





There error I'm getting is:

org.apache.jasper.JasperException: Unable to get
connection, DataSource invalid:
org.apache.commons.dbcp.SQLNestedException:
  

Cannot


create PoolableConnectionFactory (Server
  

connection


failure during transaction. Due to underlying
exception: 'java.net.SocketException:
java.net.ConnectException: Connection refused'.

** BEGIN NESTED EXCEPTION ** 


java.net.SocketException
MESSAGE: java.net.ConnectException: Connection
  

refused


STACKTRACE:

java.net.SocketException:
  

java.net.ConnectException:


Connection refused
at

  

com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
  

at
  

com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276)


at

  

com.mysql.jdbc.Connection.createNewIO(Connection.java:2815)
  

at

  

com.mysql.jdbc.Connection.init(Connection.java:1531)
  

at

  

com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
  

at

  

org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
  

at


Re: Pooling Issue

2006-11-18 Thread tyju tiui
I do have a firewall, but I tried opening port 3306 and still had the same 
problem.
I don't know what could be impeding the connection since I'm able to connect to 
mysql from the server.
Is there any other way for me to test the connection using from tomcat? Maybe 
an interactive logon or something?

The root cause is:
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: 
org.apache.commons.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (Communications link failure due to underlying 
exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused
at 
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
at com.mysql.jdbc.Connection.init(Connection.java:1531)
at 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at 
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at 
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at 
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at 
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
 Source)
at 
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown 
Source)
at org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **



Last packet sent to the server was 21 ms ago.)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
 Source)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown 
Source)
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

- Original Message 
From: David Smith [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, November 18, 2006 9:28:46 PM
Subject: Re: Pooling Issue

Well that's a stumper.  The connection refused exception implies that 
nothing is listening on that port or the port is blocked by a firewall.  
Is there any more to that 

Re: problems with connector

2006-11-18 Thread Mohan2005

Hi;
just to give my 2-cents as a mod_jk user, 

i had a similar problem where mod_jk and tomcat was working ok, and apache
was also working ok, but sending blank pages to the user.
noticed the mod_jk log had grown to over 3GB in size, then deleted and
restarted services and started working fine. later implemented a method to
rotate mod_jk log at 200MB.





Enrico Donelli wrote:
 
 Thanks a lot for your help Rainer, I really appreciate.
 
 From time to time (every couple of weeks) the connector completely
 hangs apache. Tomcat alone is still alive, but apache no longer
 replies to requests, and I need to restart both
 
 Now it's working properly, but there are still many error in log files:
 
 [Sat Nov 18 22:43:13 2006] [28124:7072] [error]
 ajp_connection_tcp_send_message::jk_ajp_common.c (914): sendfull
 returned -32 with errno=32
 [Sat Nov 18 22:43:13 2006] [28124:7072] [info]
 ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
 request. Will try another pooled connection
 
 or
 
 [Sat Nov 18 22:08:36 2006] [27825:7072] [info]
 ajp_process_callback::jk_ajp_common.c (1410): Writing to client
 aborted or client network problems
 [Sat Nov 18 22:08:36 2006] [27825:7072] [info]
 ajp_service::jk_ajp_common.c (1795): (ajp13) request failed, because
 of client write error without recovery in send loop attempt=0
 [Sat Nov 18 22:08:36 2006] ajp13 www.scandinaviadesign.it 24.124384
 [Sat Nov 18 22:08:36 2006] [27825:7072] [info]  jk_handler::mod_jk.c
 (2056): Aborting connection for worker=ajp13
 
 Thanks again!!!
 
 Enrico
 
 On 18/11/06, Rainer Jung [EMAIL PROTECTED] wrote:
 Adding to my own comments: I think I found a problem. So one more
 question:

 Do you also observe a real problem, or only the info log messages. Do
 the requests actually fail?


 Regards,

 Rainer

 Enrico Donelli schrieb:
  Thanks Rainer for your reply!
 
  Here's my mod_jk.conf
 
  I solved my previous error adding the directive
  JkShmFile /var/log/apache2/mod_jk.shm
  (see later the copy of the file)
 
  Now I have different errors:
 
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_send_request::jk_ajp_common.c (1170): (ajp13) socket 33 is not
  connected any more (errno=11)
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_send_request::jk_ajp_common.c (1194): (ajp13) error sending
  request. Will try another pooled connection
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_send_request::jk_ajp_common.c (1218): (ajp13) all endpoints are
  disconnected or dead
  [Sat Nov 18 09:27:57 2006] [16854:7072] [info]
  ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat
  failed,  recoverable operation attempt=1
 
  What do they mean?
 
  I'm using versions
  mod_jk/1.2.19
  Apache/2.0.54
  tomcat/5.5.20
 
 
  Thanks again!!
 
  Enrico
 
 
  # ===
  # mod_jk.conf
  
  # Load mod_jk module
  LoadModulejk_module  /usr/lib/apache2/modules/mod_jk.so
  # Declare the module for IfModule directive (remove this line on
  Apache 2.0.x)
  #AddModule mod_jk.c
  # Where to find workers.properties
  JkWorkersFile /etc/apache2/workers.properties
  # Where to put jk logs
  JkLogFile /var/log/apache2/mod_jk.log
 
  JkShmFile /var/log/apache2/mod_jk.shm
 
 
  # Set the jk log level [debug/error/info]
  JkLogLevelinfo
  # Select the log format
  JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
  # JkOptions indicate to send SSL KEY SIZE,
  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  # JkRequestLogFormat set the request format
  JkRequestLogFormat %w %V %T
  # Send servlet for context /examples to worker named worker1
  #JkMount  /examples/servlet/* worker1
  # Send JSPs  for context /examples to worker named worker1
 
 
  #== workers.properties =
  workers.tomcat_home=/tomcat/dir
  workers.java_home=/opt/jdk
  ps=/
  worker.list=ajp13
  worker.ajp12.port=8007
  worker.ajp12.host=localhost
  worker.ajp12.type=ajp12
  worker.ajp12.lbfactor=1
  worker.ajp13.port=8009
  worker.ajp13.host=localhost
  worker.ajp13.type=ajp13
  worker.ajp13.lbfactor=1
  #worker.ajp13.connection_pool_size
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=ajp12, ajp13
 
  worker.inprocess.type=jni
 
 
 
 
 
 
 
 
  On 17/11/06, Rainer Jung [EMAIL PROTECTED] wrote:
  Please give details on your mod_jk version and concerning your
  configuration (mod_jk config inside httpd.conf and
 workers.properties).
 
  Errno 2 looks line not such file or directory. So does
  /etc/apache2/logs/jk-runtime-status exist as a file and is the apache
  user allowed to write into it. Does the directory /etc/apache2/logs
  exist and again, does the apache user have write permissions there?
 
  Does the log message already show, when you are starting? If yes,
 could
  you reproduce with JkLogLevel trace and provide the resulting file?
 
  Regards,
 
  Rainer
 
 
  Enrico Donelli schrieb:
   Hi all,
   

RE: Starting Tomcat

2006-11-18 Thread David Schulberg
Hi,

As before I get the following output in my DOS window and then nothing
further:

F:\apache-tomcat-5.5.20\bincatalina run
Using CATALINA_BASE:   F:\apache-tomcat-5.5.20
Using CATALINA_HOME:   F:\apache-tomcat-5.5.20
Using CATALINA_TMPDIR: F:\apache-tomcat-5.5.20\temp
Using JRE_HOME:C:\Program Files\Java\jdk1.5.0_07
C:\Program Files\Java\jdk1.5.0_07\bin\java 
-Djava.util.logging.manager=org.ap
ache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=F:\apache-tomca
t-5.5.20\conf\logging.properties  
-Djava.endorsed.dirs=F:\apache-tomcat-5.5.2
0\common\endorsed -classpath C:\Program
Files\Java\jdk1.5.0_07\lib\tools.jar;F
:\apache-tomcat-5.5.20\bin\bootstrap.jar
-Dcatalina.base=F:\apache-tomcat-5.5.
20 -Dcatalina.home=F:\apache-tomcat-5.5.20
-Djava.io.tmpdir=F:\apache-tomcat
-5.5.20\temp org.apache.catalina.startup.Bootstrap  start

I would have thought it would be firing up tomcat5w.exe or tomcat.exe
Pretty certain it is not a permissions problem.

Service is running the executable command:
'F:\apache-tomcat-5.5.20\bin\tomcat5.exe //RS//Tomcat5'

- David

On Sat, 18 Nov 2006 10:37:50 -0600, Caldarale, Charles R
[EMAIL PROTECTED] said:
  From: David Schulberg [mailto:[EMAIL PROTECTED] 
  Subject: Re: Starting Tomcat
  
  Running catalina run - same result
 
 What shows up in the command prompt window when you do this?  (Do not
 use the Run... menu item from the Start button.)  Are you using the
 exact same installation files as the service does?  Do you have an
 access permissions problem with your logon account versus the service
 account?
 
  - 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 start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 
  David Schulberg
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Send your email first class


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Starting Tomcat

2006-11-18 Thread Caldarale, Charles R
 From: David Schulberg [mailto:[EMAIL PROTECTED] 
 Subject: RE: Starting Tomcat
 
 F:\apache-tomcat-5.5.20\bincatalina run
 Using CATALINA_BASE:   F:\apache-tomcat-5.5.20
 Using CATALINA_HOME:   F:\apache-tomcat-5.5.20
 Using CATALINA_TMPDIR: F:\apache-tomcat-5.5.20\temp
 Using JRE_HOME:C:\Program Files\Java\jdk1.5.0_07
 C:\Program Files\Java\jdk1.5.0_07\bin\java 
 -Djava.util.logging.manager=org.ap
 ache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=F:\apache-tomca
 t-5.5.20\conf\logging.properties  
 -Djava.endorsed.dirs=F:\apache-tomcat-5.5.2
 0\common\endorsed -classpath C:\Program
 Files\Java\jdk1.5.0_07\lib\tools.jar;F
 :\apache-tomcat-5.5.20\bin\bootstrap.jar
 -Dcatalina.base=F:\apache-tomcat-5.5.
 20 -Dcatalina.home=F:\apache-tomcat-5.5.20
 -Djava.io.tmpdir=F:\apache-tomcat
 -5.5.20\temp org.apache.catalina.startup.Bootstrap  start

In order to get the above, someone must have modified catalina.bat to
display the generated command, perhaps by putting an echo at the front
of the line (193 in the unedited script).  Doing so would prevent the
command from being executed.

 I would have thought it would be firing up tomcat5w.exe or tomcat.exe

No, those are only used for the service.  When running from a command
prompt, a direct call to the standard java launcher is used.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]