Re: Client certificate gone after 1 minute timeout (SSL, APR)

2010-02-25 Thread Albert Tumanov
 Are you keeping an SSL connection for a long time? Or, do you mean that
 if you wait for slightly longer than 1 minute after the last SSL request
 to make another one, the client certificate does not get delivered to
 Tomcat?

The latter one :)

 1) go to https://localhost:8443/ssltest, it will show the client certificate

 Does the request complete successfully at this point: meaning that the
 TCP/IP connection is closed and you get all the bytes you expected from
 the server?

I think so.

 2) wait 1 minute
 3) refresh browser - the application will not get the client certificate
  (request.getAttribute(javax.servlet.request.X509Certificate) returns null)

 I'm no SSL expert, but these two requests ought to be completely
 independent of each other: the client certificate should always be sent.

There is a concept of SSL session (Resumed TLS handshake), and I think
the client certificate
should be cached on the server side for some time.

 I have traced the SSL packets using ssltap -sxlp 8444 localhost:8443
 It shows that 1 minute after the last request, there will be Read EOF
 on Server socket.

 1 minute after step #1 above, or step #3?

After step #1

 In step #3, is the client certificate sent by the browser or not?

The browser only sends client certificate on step #1.
And this works unless APR+Firefox is used.
As I suggested, the server side should cache the cert.

 The only significant difference is that Safari seems to terminate the
 connection by sending SSL alert packet.

 Terminates which connection? #1 or #3?

#3

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat loading dlls

2010-02-25 Thread Konstantin Kolinko
Please be careful with Nabble. You are resending your messages to the
list [1] the third time in a row.  Maybe there was some OK button
that you were inadvertently pressing.

Regarding Eclipse on Windows:
1. If you updated your PATH variable, any program that was started
before the update will still see the old value of the variable.
2. You can System.getenv() to test what environment variables were
actually used to start your Tomcat instance.
3. Chapter 11.2.3 Locating Native Libraries in [2] tells about how
PATH is used for System.loadLibrary() on Windows, and how
java.library.path property overrides that.

[1] http://tomcat.apache.org/lists.html
[2] http://java.sun.com/docs/books/jni/html/design.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Regarding Connector in tomcat 6

2010-02-25 Thread André Warnier

Cummins College wrote:

Hi,

Actually we are designing a security layer over our web app. We want to give
the user an option of choosing between http or https on login. Hence the
need of changing from http to https or vice-versa at runtime.

I have the impression that you are going about this in a complicated way 
(and one which in my opinion would never work anyway).  Let me suggest a 
setup which should not require switching any Connectors or settings 
thereof :
- set up two separate versions of your webapp (say webapps/ourapp and 
webapps/ourapp-secure).  As far as I know, they can share exactly the 
same code and just differ by the context name and the content of their 
WEB-INF/web.xml.
- modify the web.xml of the secure version to make HTTPS mandatory for 
that one

- set up two Connectors, one HTTP and one HTTPS.
- when users try to access the application, they will initially get a 
login page.  Make that page normally submit to the unsecure webapp 
over HTTP, but offer a button on it leading to the secure version of the 
app under HTTPS.  This button is just a link to 
https://yourserver.company.com/ourapp-secure.
When they click on it, they will get the login page again, but this time 
they are (and will remain) in the HTTPS side of things.
With a little bit of Javascript inventiveness in the login page, I am 
sure that there must be a way to submit the login to either the secure 
or non-secure version of the application, without need for the browser 
to reload the page.


Now the basic questions still remains : given a choice between a secure 
and a non-secure session, and an identical application afterward, why 
would a user choose an unsecure session ? because he feels compassion 
for the poor hacker trying to break in ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Client certificate gone after 1 minute timeout (SSL, APR)

2010-02-25 Thread Konstantin Kolinko
2010/2/25 Albert Tumanov altum...@gmail.com:
 There is a concept of SSL session (Resumed TLS handshake),

I think that will not work anymore, because of CVE-2009-3555

See
http://tomcat.apache.org/security-6.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Regarding Connector in tomcat 6

2010-02-25 Thread Pid

On 25/02/2010 07:11, Cummins College wrote:

Hi,

Actually we are designing a security layer over our web app. We want to give
the user an option of choosing between http or https on login.


Why do you need to change the properties of the connector to do that?


Hence the need of changing from http to https or vice-versa at runtime.


Changing the properties of the connector won't change what happens in 
the web app, it'll break the application, in several ways - because 
there won't be a connector available to serve URLs that have a relative 
reference to the unsecured host.


Worse the first person to choose HTTPS will force everyone else to use 
it, too; without notifying them and breaking their version of the app 
for the above reason.




We are aware oftransport guarentee. But that is not at runtime.


Eh?



We had also thought of JMX as an option and seems like a feasible solution.
So could you tell us how to access Tomcat's MBeans at runtime using java or
any other code.


Stop.  Please stop this madness now.

Investigate the SecurityFilter project instead.


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



listing directory content outside tomcat root

2010-02-25 Thread Ivan Longhi
hi,
I would like to list the content of a directory outside tomcat root
without enabling the listings parameter in default servlet.

conf/web.xml

servlet
servlet-namedefault/servlet-name

servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
param-namelistings/param-name
param-valuefalse/param-value
/init-param
/servlet


conf/server.xml

.

  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Context path=/test docBase=/path_to_some_dir/
Parameter name=listings value=true /
/Context

..


if I try to get a file inside the dir it works (
http://localhost:8080/test/some_file.txt ) but if I try to list the
content of the directory ( http://localhost:8080/test/ ) I get 404.

any idea?

thanks



ciao,
ivan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: listing directory content outside tomcat root

2010-02-25 Thread Tim Funk

Enable listings is sort of** a global setting.

Since the default servlet is declared in conf/web.xml - its inherited in 
*every* webapp. So its config is also inherited. (Bummer)


BUT - if you add a WEB-INF/web.xml to EVERY webapp with the default 
servlet settings - then you can remove the default servlet config from 
conf/web.xml and have the default servlet per webapp config.


That means - in docBase=/path_to_some_dir/ -- you need 
/path_to_some_dir/WEB-INF/web.xml


What I forget is - what happens if you only create 
/path_to_some_dir/WEB-INF/web.xml and leave conf/web.xml alone. Which of 
course would be the easiest thing to do.



-Tim

On 2/25/2010 6:22 AM, Ivan Longhi wrote:

hi,
I would like to list the content of a directory outside tomcat root
without enabling the listings parameter in default servlet.

conf/web.xml

 servlet
 servlet-namedefault/servlet-name
 
servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
 init-param
 param-namelistings/param-name
 param-valuefalse/param-value
 /init-param
 /servlet


conf/server.xml

.

   Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false

 Context path=/test docBase=/path_to_some_dir/
 Parameter name=listings value=true /
 /Context

..


if I try to get a file inside the dir it works (
http://localhost:8080/test/some_file.txt ) but if I try to list the
content of the directory ( http://localhost:8080/test/ ) I get 404.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Sending request to tomcat failed.....

2010-02-25 Thread Munirathinavel

Hi all...
I've been performance testing for few days.While doing load testing with
50 users, I'm also trying to access the application through Browser but
sometimes pages are not loading for long time.While seeing the logs I'm
getting the following lines in mod_jk.log

[Thu Feb 25 17:09:31 2010][4180:2508] [info] jk_ajp_common.c (1788): Writing
to client aborted or client network problems
[Thu Feb 25 17:09:31 2010][4180:2508] [info] jk_ajp_common.c (2447):
(worker1) sending request to tomcat failed (unrecoverable), because of
client write error (attempt=1)
[Thu Feb 25 17:09:31 2010]worker1 216.205.107.50 48.484375
[Thu Feb 25 17:09:31 2010][4180:2508] [info] mod_jk.c (2608): Aborting
connection for worker=worker1

 These are my apache2.2  tomcat6.0.18 configurations...
 
workers.properties:

workers.tomcat_home=D:/tomcat6.0.18
workers.java_home=C:/Program Files/Java/jdk1.6.0_16

ps=/


worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=
worker.worker1.port=8009
worker.worker1.connection_pool_timeout=600
worker.worker1.connect_timeout=6
worker.worker1.prepost_timeout=6
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=60
worker.worker1.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers= worker1
worker.inprocess.type=jni

server.xml
Server port=8006 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  GlobalNamingResources
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
  Service name=Catalina
Connector debug=0 enableLookups=false port=8009
protocol=AJP/1.3
 maxThreads=150 minSpareThreads=25 maxSpareThreads=75
acceptCount=100
  minProcessors=5 maxProcessors=100 connectionTimeout=6
disableUploadTimeout=true redirectPort=8443/
   Engine name=Catalina defaultHost= debug=0 
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
  Host name=  appBase=gateway
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Listener className =
org.apache.jk.config.ApacheConfig workersConfig=conf/workers.properties
modJk=D:/Apache2.2/modules/mod_jk.so jkLog=logs/mod_jk.log
jkDebug=info noRoot=false/
  /Host
/Engine
  /Service
   
/Server

context.xml
?xml version='1.0' encoding='utf-8'?
 
   Context
 WatchedResourceWEB-INF/web.xml/WatchedResource
Resource name=jdbc/vehrentDB auth=Container
  type=javax.sql.DataSource
  maxActive=50
  maxIdle=10
minIdle=30
  username= password=  
   
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
 url=jdbc:sqlserver://:1433;  
   
databaseName=;user=;password=;
  numTestsPerEvictionRun=15 
timeBetweenEvictionRunsMillis=90
minEvictableIdleTimeMillis=90
testWhileIdle=true
testOnBorrow=false
removeAbandoned=true
removeAbandonedTimeout=300
  logAbandoned=true
/
Resource name=jdbc/empowerDB auth=Container
  type=javax.sql.DataSource
maxActive=8
maxIdle=4
minIdle=2
username= password=
   
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
 
url=jdbc:sqlserver://:1433;databaseName=;user=;password=;
numTestsPerEvictionRun=15
timeBetweenEvictionRunsMillis=90
minEvictableIdleTimeMillis=90
testWhileIdle=true
  testOnBorrow=false
removeAbandoned=true
removeAbandonedTimeout=300
  logAbandoned=true
/
/Context

httpd-vhosts.conf

NameVirtualHost *:80
VirtualHost *:80
ServerAdmin xx
DocumentRoot D:/Apache2.2/htdocs/gateway
ServerName xx
ServerAlias xx
ErrorLog logs/gateway-error.log
CustomLog logs/gateway-access.log common

JkMount /* worker1
JkUnMount /*js/*.js worker1
JkUnMount /*.jpeg worker1
JkUnMount /*.png worker1
JkUnMount /*.gif 

Apache 2.2 and TomCat 6.0 using SSL

2010-02-25 Thread sikorsky

I'm new to Apache 2.2 and TomCat 6.0.  I thought I could use SSL on my Apache
web server and not need to have SSL on my TomCat applications.  Especially
since they are both on the same server.  I installed an Entrust Cert on my
Apache webserver and it works fine with https.  When I redirect to the
TomCat servlet I get a 404.  If I switch to http everything works fine. 
Shouldn't I be able to use https/443on my web server and http/8080 on the
app server without issue?  How?
-- 
View this message in context: 
http://old.nabble.com/Apache-2.2-and-TomCat-6.0-using-SSL-tp27714427p27714427.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



ReplicationValve filter ...

2010-02-25 Thread Stephane Lorin
Hi,

 

I’d just configure a tomcat’s cluster with two nodes. The version of Tomcat
is 6.0.24 with JRE 6.0.15 on Ubuntu 9.10.

 

Cluster’s part of my “Server.xml”:

 

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster

 channelSendOptions=8

 

  Manager className=org.apache.catalina.ha.session.DeltaManager

   expireSessionsOnShutdown=false

   notifyListenersOnReplication=true/

 

  Channel
className=org.apache.catalina.tribes.group.GroupChannel

Membership
className=org.apache.catalina.tribes.membership.McastService

address=228.0.0.4

port=45564

frequency=500

dropTime=3000/

Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver

  address=192.168.1.108

  port=4000

  autoBind=100

  selectorTimeout=5000

  maxThreads=6/

 

Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter

  Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/

/Sender

Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
/

Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15In
terceptor/

  /Channel

 

  Valve className=org.apache.catalina.ha.tcp.ReplicationValve

filter=.*index.*;/

  Valve
className=org.apache.catalina.ha.session.JvmRouteBinderValve/

 

  Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer

tempDir=/tmp/war-temp/

deployDir=/tmp/war-deploy/

watchDir=/tmp/war-listen/

watchEnabled=false/

 

  ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/

  ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/

/Cluster

 

 

Clustering connection work well and I see members appear or disappear in the
log file.

 

Log node 1:

 

INFO: Created a buffer pool with max size:104857600 bytes of
type:org.apache.catalina.tribes.io.BufferPool15Impl

25 févr. 2010 14:35:42 org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded

INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1,
108}:4000,{192, 168, 1, 108},4000, alive=1019,id={93 73 -36 -95 -25 79 67 32
-89 30 -119 95 -9 24 87 -24 }, payload={}, command={}, domain={}, ]

 

Log node 2: 

 

INFO: Starting clustering manager at /SessionListener

25 févr. 2010 14:35:45 org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions

ATTENTION: Manager [/SessionListener], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1,
115}:4000,{192, 168, 1, 115},4000, alive=57336,id={35 -70 -95 77 106 -12 71
31 -111 47 -36 105 30 78 -58 60 }, payload={}, command={}, domain={}, ].
This operation will timeout if no session state has been received within 60
seconds.

25 févr. 2010 14:35:45 org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions

INFO: Manager [/SessionListener]; session state send at 25/02/10 14:35
received in 120 ms.

 

I’d just have any questions regarding filter of replication valve.

 

The filter receive java regular expressions and keep out all object
corresponding with filter, Can I use expression “^[.*specific_folder.*];” as
filter for limited the replication of data to a little part of application
where was deployed in a specific folder ? 

 

And when object must be keep out, send tomcat a replicated session empty or
don’t send a session ? 

 

Thank you for your work, it’s very precious for noob like me :-)

 

 



Re: Sending request to tomcat failed.....

2010-02-25 Thread André Warnier

Munirathinavel wrote:

Hi all...
I've been performance testing for few days.While doing load testing with
50 users, I'm also trying to access the application through Browser

..
I think that you should get these 50 people off your shoulders, so that 
you can pay attention to the answers you have already been given to your 
previous 10 identical posts.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Deploy war

2010-02-25 Thread Kaushal Shriyan
On Thu, Feb 25, 2010 at 12:55 PM, Kaushal Shriyan
kaushalshri...@gmail.com wrote:
 Hi,

 Is there a tool available to deploy same war to multiple tomcat server ?

 Thanks,

 Kaushal

Hi,

can someone guide me about
http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html ?
I did downloaded TCD and extracted it. I got build.xml  docs  images
lib  LICENSE NOTICE  RELEASE-NOTES
what do i do next to proceed ?

Please suggest.

Thanks and Regards,

Kaushal

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: listing directory content outside tomcat root

2010-02-25 Thread Ivan Longhi
thanks!!!

this should be the solution (and one more little question at the end of code):

conf/web.xml

   servlet
   servlet-namedefault/servlet-name
   
servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
   init-param
   param-namelistings/param-name
   param-valuefalse/param-value !-- FALSE to avoid
inheritance to all webapps --
   /init-param
   /servlet


conf/server.xml

.

 Host name=localhost  appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

   Context path=/test docBase=/path_to_some_dir/
   Parameter name=listings value=true /
   /Context

..


/path_to_some_dir/WEB-INF/web.xml


web-app ...
servlet
servlet-nametest/servlet-name

servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
param-namelistings/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
servlet-mapping
servlet-nametest/servlet-name
url-pattern//url-pattern
/servlet-mapping
/web-app



is servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
the right solution?

thanks,
ivan

On Thu, Feb 25, 2010 at 1:19 PM, Tim Funk funk...@apache.org wrote:
 Enable listings is sort of** a global setting.

 Since the default servlet is declared in conf/web.xml - its inherited in
 *every* webapp. So its config is also inherited. (Bummer)

 BUT - if you add a WEB-INF/web.xml to EVERY webapp with the default servlet
 settings - then you can remove the default servlet config from conf/web.xml
 and have the default servlet per webapp config.

 That means - in docBase=/path_to_some_dir/ -- you need
 /path_to_some_dir/WEB-INF/web.xml

 What I forget is - what happens if you only create
 /path_to_some_dir/WEB-INF/web.xml and leave conf/web.xml alone. Which of
 course would be the easiest thing to do.


 -Tim

 On 2/25/2010 6:22 AM, Ivan Longhi wrote:

 hi,
 I would like to list the content of a directory outside tomcat root
 without enabling the listings parameter in default servlet.

 conf/web.xml
 
     servlet
         servlet-namedefault/servlet-name

 servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
         init-param
             param-namelistings/param-name
             param-valuefalse/param-value
         /init-param
     /servlet
 

 conf/server.xml
 
 .

       Host name=localhost  appBase=webapps
             unpackWARs=true autoDeploy=true
             xmlValidation=false xmlNamespaceAware=false

         Context path=/test docBase=/path_to_some_dir/
             Parameter name=listings value=true /
         /Context

 ..
 

 if I try to get a file inside the dir it works (
 http://localhost:8080/test/some_file.txt ) but if I try to list the
 content of the directory ( http://localhost:8080/test/ ) I get 404.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





-- 
ciao,
ivan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: listing directory content outside tomcat root

2010-02-25 Thread Ivan Longhi
ops
Parameter name=listings value=true / is useless

On Thu, Feb 25, 2010 at 3:14 PM, Ivan Longhi ivan.lon...@gmail.com wrote:
       Context path=/test docBase=/path_to_some_dir/
           Parameter name=listings value=true /
       /Context

-- 
ciao,
ivan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: listing directory content outside tomcat root

2010-02-25 Thread Caldarale, Charles R
 From: Tim Funk [mailto:funk...@apache.org]
 Subject: Re: listing directory content outside tomcat root
 
 Since the default servlet is declared in conf/web.xml - its inherited
 in *every* webapp. So its config is also inherited. (Bummer)

Not a bummer at all - it's a very good thing.

 BUT - if you add a WEB-INF/web.xml to EVERY webapp with the default
 servlet settings - then you can remove the default servlet config from
 conf/web.xml and have the default servlet per webapp config.

Not needed and way more work than necessary.

 What I forget is - what happens if you only create
 /path_to_some_dir/WEB-INF/web.xml and leave conf/web.xml
 alone. Which of course would be the easiest thing to do.

And it's what you should do.  url-pattern elements in a webapp's 
WEB-INF/web.xml override the ones in the global conf/web.xml, so put the 
following in /path_to_some_dir/WEB-INF/web.xml:

servlet
servlet-namelocalDefault/servlet-name

servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
init-param
param-namelistings/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
servlet-mapping
servlet-namelocalDefault/servlet-name
url-pattern//url-pattern
/servlet-mapping

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: listing directory content outside tomcat root

2010-02-25 Thread Caldarale, Charles R
 From: Ivan Longhi [mailto:ivan.lon...@gmail.com]
 Subject: Re: listing directory content outside tomcat root
 
 is servlet-classorg.apache.catalina.servlets.DefaultServlet
 /servlet-class the right solution?

Yes.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



tomcat 6.0.18 - important amount of tcp traffic not related to http request

2010-02-25 Thread Benoit VILLAUMIE

Hi,

I have noticed on our network an important bandwith consumption that 
seems related to tomcat instances.


I am currently using multiple tomcat 6.0.18 instances (on linux 
plateform with jvm 1.6), some of theses instances belonging to a same 
cluster.


So, I was thinking first that this traffic was related to sessions 
replications.


However, the content of the communication does not seems related to 
session information. You will find below an sample of the communication.


RSP¬í7YÊWqqqcation.referentiel-common-1.0.localhost/_/WEB-INF/lib/commonwork/Catalina/localhost/_/WEB-wr-2.0.1-patch.2.jar
 file:/datfile:/data/tomcat1-pmvc/work/C0.jar 
file:/data/tomcat1-pmvc/NF/lib/partner.abcroisiere.outvc/work/Catalina/localhost/_/Wt/_/WEB-INF/lib/stax-utils-200ions-1.2.6.jar
 
file:/data/tomctalina/localhost/_/WEB-INF/lib-pmvc/work/Catalina/localhost/s-validator-1.3.1.jar
 file:/daalhost/_/WEB-INF/lib/freemarkeons-annotations-3.3.0.ga.jar 
fa/localhost/_/WEB-INF/lib/jsr1/_/WEB-INF/lib/partner.weather1-pmvc/work/Catalina/localhostB-INF/lib/xfire-annotations-1.k/Catalina/localhost/_/WEB-INFcat1-pmvc/work/Catalina/localhmmons-validator-1.3.1.jar
 
file/localhost/_/WEB-INF/lib/freemcommons-annotations-3.3.0.ga.jalina/localhost/_/WEB-INF/lib/host/_/WEB-INF/lib/partner.weamcat1-pmvc/work/Catalina/local_/WEB-INF/lib/xfire-annotationdata/tomcat1-pmvc/work/Catalinta/tomcat1-pmvc/work/Catalina/B-INF/lib/commons-pool-1.3.jar_/WEB-INF/lib/framework.fronteB-INF/lib/front-office-model-1rnate-validator-3.0.0.ga.jar
 fWEB-INF/lib/jta-1.0.1B.jar 
fillocalhost/_/WEB-INF/lib/partneCatalina/localhost/_/WEB-INF/l/lib/xfire-core-1.2.6.jar
 fileina/localhost/_/WEB-INF/lib/ana/localhost/_/WEB-INF/lib/cataar 
file:/data/tomcat..

As the communication seems related to tomcat directory structure, I take a look 
to the documentation
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html,http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html)
and the FAQ (http://wiki.apache.org/tomcat/FAQ/Clustering  
http://www.google.com/url?q=http%3A%2F%2Fwiki.apache.org%2Ftomcat%2FFAQ%2FClusteringsa=Dsntz=1usg=AFrqEzeg8m3U3MrJxhDMezfyNO4_HHq7gA)
 but find nothing that could help me to understand what is producing such communication.

The server xml part that enables clustering is currently this one. You 
will notice that the farm deployer is commented as I do not want tomcat 
farming :


!-- Clustering de sessions --
Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
channelSendOptions=8
Manager className=org.apache.catalina.ha.session.DeltaManager 
expireSessionsOnShutdown=false notifyListenersOnReplication=true/

Channel className=org.apache.catalina.tribes.group.GroupChannel
Membership 
className=org.apache.catalina.tribes.membership.McastService 
address=228.0.0.4 port=45564 frequency=500 dropTime=3000/
Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver 
address=auto port=4000 selectorTimeout=100 maxThreads=6/
Sender  
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/

/Sender
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/

/Channel

Valve className=org.apache.catalina.ha.tcp.ReplicationValve 
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/

!--Deployer
  className=org.apache.catalina.ha.deploy.FarmWarDeployer
  tempDir=/data/tomcat3/temp/war-temp/
  deployDir=/data/tomcat3/temp/war-deploy/
  watchDir=/data/tomcat3/temp/war-listen/
  watchEnabled=false/--

ClusterListener 
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
ClusterListener 
className=org.apache.catalina.ha.session.ClusterSessionListener/


/Cluster

Does someone have any clues to find the origin of these communications 
that will allow me to reduce or disable this traffic ?


Thanks for your attention.


Re: ReplicationValve filter ...

2010-02-25 Thread Filip Hanik - Dev Lists
The idea behind the ReplicationValve filter is to save time and do not 
check for session changes for certain URL's.


However, it takes about the same time to check if the session has 
changed as to go through the filter, so you can leaveit empty


best
Filip

On 02/25/2010 06:43 AM, Stephane Lorin wrote:

Hi,



I’d just configure a tomcat’s cluster with two nodes. The version of Tomcat
is 6.0.24 with JRE 6.0.15 on Ubuntu 9.10.



Cluster’s part of my “Server.xml”:



Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster

  channelSendOptions=8



   Manager className=org.apache.catalina.ha.session.DeltaManager

expireSessionsOnShutdown=false

notifyListenersOnReplication=true/



   Channel
className=org.apache.catalina.tribes.group.GroupChannel

 Membership
className=org.apache.catalina.tribes.membership.McastService

 address=228.0.0.4

 port=45564

 frequency=500

 dropTime=3000/

 Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver

   address=192.168.1.108

   port=4000

   autoBind=100

   selectorTimeout=5000

   maxThreads=6/



 Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter

   Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/

 /Sender

 Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
/

 Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15In
terceptor/

   /Channel



   Valve className=org.apache.catalina.ha.tcp.ReplicationValve

 filter=.*index.*;/

   Valve
className=org.apache.catalina.ha.session.JvmRouteBinderValve/



   Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer

 tempDir=/tmp/war-temp/

 deployDir=/tmp/war-deploy/

 watchDir=/tmp/war-listen/

 watchEnabled=false/



   ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/

   ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/

 /Cluster





Clustering connection work well and I see members appear or disappear in the
log file.



Log node 1:



INFO: Created a buffer pool with max size:104857600 bytes of
type:org.apache.catalina.tribes.io.BufferPool15Impl

25 févr. 2010 14:35:42 org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded

INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1,
108}:4000,{192, 168, 1, 108},4000, alive=1019,id={93 73 -36 -95 -25 79 67 32
-89 30 -119 95 -9 24 87 -24 }, payload={}, command={}, domain={}, ]



Log node 2:



INFO: Starting clustering manager at /SessionListener

25 févr. 2010 14:35:45 org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions

ATTENTION: Manager [/SessionListener], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1,
115}:4000,{192, 168, 1, 115},4000, alive=57336,id={35 -70 -95 77 106 -12 71
31 -111 47 -36 105 30 78 -58 60 }, payload={}, command={}, domain={}, ].
This operation will timeout if no session state has been received within 60
seconds.

25 févr. 2010 14:35:45 org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions

INFO: Manager [/SessionListener]; session state send at 25/02/10 14:35
received in 120 ms.



I’d just have any questions regarding filter of replication valve.



The filter receive java regular expressions and keep out all object
corresponding with filter, Can I use expression “^[.*specific_folder.*];” as
filter for limited the replication of data to a little part of application
where was deployed in a specific folder ?



And when object must be keep out, send tomcat a replicated session empty or
don’t send a session ?



Thank you for your work, it’s very precious for noob like me :-)






   



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: NioConnector limits and comet requests

2010-02-25 Thread Filip Hanik - Dev Lists

On 02/23/2010 10:09 PM, James Roper wrote:

Hi,

I'm trying to understand how the Tomcat 6.0 NIO connector handles the 
various limit attributes in the configuration, particularly in regards 
to comet requests.  I've had a look at the source code, and I think I 
understand, but I'd like to confirm my understanding, and also ask 
some further questions.


The acceptCount works just like it does on the other processors, it 
gets passed to the ServerSocket as the backlog parameter.  This limit 
will be reached if the acceptor thread(s) aren't able to accept new 
requests quickly enough.  This is where behaviour differs from the 
default HTTP connector, all the acceptor threads do is add the channel 
to a poller which uses the NIO selectors to wait on activity, and then 
return quickly.  As far as I can see, the number of active selectors 
can be unlimited, is that right?  Would there be any advantages in 
limiting this?  What would happen if such a limit was reached?  On the 
default HTTP connector though, when new requests arrive, the handler 
will block until it can get a free worker thread, so the acceptCount 
limit could easily be reached.  In order to reach the acceptCount 
limit in the NIO connector, the server would have to be under a 
massive amount of load, such that the accept thread never gets 
scheduled to accept new connections.  This would be a difficult limit 
to reach, so the acceptCount is possibly not a very useful parameter 
for the NIO connector.


The maxThreads is the maximum number of worker threads, this is pretty 
straight forward, these threads do the actual work of the requests, 
eventually calling some servlet service() or comet processor event() 
method.


There is another pool for comet requests, this is the connections map 
in the NIO connector.  This is unlimited, and it's used to store all 
comet requests that are not currently being processed by a worker 
thread.  Would there be any advantages to limiting this?  What would 
happen if such a limit was reached?


The poller threads just select on all the active channels, and hand 
work off to the worker threads.  The number of threads allowed in this 
pool enforce no limits on concurrent requests.


So, if my understanding of all this is correct, I can fire 
thousands/millions of requests at the example code in 
http://tomcat.apache.org/tomcat-6.0-doc/aio.html, and there is nothing 
in Tomcat that will prevent these from all being accepted, even if 
doing so may cause the server to become unresponsive as it tries to 
send a message to one million clients, or may cause out of memory 
errors.  Would it be beneficial for Tomcat to have an inbuilt 
mechanism to fail gracefully should such a situation occur?  I know 
that part of the advantage of NIO is that it handles DoS situations 
that are caused by making a small number of requests that read/write 
very slowly much better than the thread per request model, so such 
limits may be unlimited by default, but some applications may be able 
to benefit from setting a limit in Tomcat.


yes, having a maxConnections limit is beneficial.



Cheers,

James

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Deploy war

2010-02-25 Thread Kaushal Shriyan
On Thu, Feb 25, 2010 at 10:01 PM, Oliver Dauter odau...@gmail.com wrote:
 On Thu, Feb 25, 2010 at 13:27, Kaushal Shriyan kaushalshri...@gmail.com 
 wrote:
 On Thu, Feb 25, 2010 at 4:33 PM, Lorenzo Salvadorini
 lorenzo.salvador...@softecspa.it wrote:
 2010/2/25 Kaushal Shriyan kaushalshri...@gmail.com

 I did downloaded
 http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27-deployer.tar.gz
 After extracting i see only build.xml  docs  images  lib  LICENSE
 NOTICE  RELEASE-NOTES

 What do i do next?

  Please suggest

 cat docs/*

 --
 Go easy. Step lightly. Stay free. - The Clash


Hi Oliver

I did read that already. cat docs/* contains manual.html it contains
the same contents as The TCD includes a ready-to-use Ant script, with
the following targets:

The Tomcat Client Deployer Package looks to be what you need to deploy
to a remote server from the command line. From the page:

This is a package which can be used to validate, compile, compress to
.WAR, and deploy web applications to production or development Tomcat
servers. It should be noted that this feature uses the Tomcat Manager
and as such the target Tomcat server should be running.

How can i use it from command line. Please suggest.

Thanks and Regards,

Kaushal

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache 2.2 and TomCat 6.0 using SSL

2010-02-25 Thread Cyrille Le Clerc
Hello,

We tried to detail precisely on a blog post named Tomcat, SSL,
communications sécurisées et X-Forwarded-Proto (1) different
solutions to handle SSL with Tomcat including decrypting https on the
Apache layer. It is written in french but there are many schemas and
it is google translate friendly.

My preferred solution is to use the RemoteIpValve in Tomcat in
addition with the X-Forwarded-For http header set in Apache httpd.
Another solution is to create two connectors in Tomcat, a non secured
one and a secured one.

Please note that RemoteIpValve has been introduced in version 6.0.24
of Tomcat and is available for previous versions in a separate jar
(2).

Hope this helps,

Cyrille

--
Cyrille Le Clerc
clecl...@xebia.fr

(1) 
http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/
(2) http://code.google.com/p/xebia-france/wiki/RemoteIpValve

On Thu, Feb 25, 2010 at 4:56 PM, sikorsky rsm...@sikorsky.com wrote:

 I'm new to Apache 2.2 and TomCat 6.0.  I thought I could use SSL on my Apache
 web server and not need to have SSL on my TomCat applications.  Especially
 since they are both on the same server.  I installed an Entrust Cert on my
 Apache webserver and it works fine with https.  When I redirect to the
 TomCat servlet I get a 404.  If I switch to http everything works fine.
 Shouldn't I be able to use https/443on my web server and http/8080 on the
 app server without issue?  How?
 --
 View this message in context: 
 http://old.nabble.com/Apache-2.2-and-TomCat-6.0-using-SSL-tp27714427p27714427.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Deploy war

2010-02-25 Thread Kaushal Shriyan
On Thu, Feb 25, 2010 at 7:14 PM, Kaushal Shriyan
kaushalshri...@gmail.com wrote:
 On Thu, Feb 25, 2010 at 12:55 PM, Kaushal Shriyan
 kaushalshri...@gmail.com wrote:
 Hi,

 Is there a tool available to deploy same war to multiple tomcat server ?

 Thanks,

 Kaushal

 Hi,

 can someone guide me about
 http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html ?
 I did downloaded TCD and extracted it. I got build.xml  docs  images
 lib  LICENSE NOTICE  RELEASE-NOTES
 what do i do next to proceed ?

 Please suggest.

 Thanks and Regards,

 Kaushal


Hi,

deployer.properties


build=/usr/local/test/build
webapp=config
path=/config
url=http://example:8080/manager
username=tomcat
password=tomcat


ant -Durl=http:/some.other.host:8080/manager

is that correct ?

Please suggest.

Thanks and Regards,

Kaushal

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache 2.2 and TomCat 6.0 using SSL

2010-02-25 Thread Pid

On 25/02/2010 15:56, sikorsky wrote:


I'm new to Apache 2.2 and TomCat 6.0.  I thought I could use SSL on my Apache
web server and not need to have SSL on my TomCat applications.  Especially
since they are both on the same server.  I installed an Entrust Cert on my
Apache webserver and it works fine with https.  When I redirect to the
TomCat servlet I get a 404.  If I switch to http everything works fine.
Shouldn't I be able to use https/443on my web server and http/8080 on the
app server without issue?  How?


What are the exact version of HTTPD and Tomcat?

How have you connected HTTPD to Tomcat, using mod_jk or mod_proxy?

Have you applied the connector configuration in the :80 HTTP host, also 
to the :443 HTTP host?



p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: What governs a URL connection timeout?

2010-02-25 Thread Chris Mannion
Thanks Chris,

Very helpful advice.  I can't help but feel a little out of my depth
with this one :-\

On 19 February 2010 16:46, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Chris,

 On 2/19/2010 11:08 AM, Chris Mannion wrote:
 Thank, genuinely, for the responses, I've learned how I *could* set a
 timeout, which I didn't know before.  However, what I'm actually
 trying to get to the bottom of is what timeout could be in play
 *without* me setting it.

 Well, try this:

 URLConnection t_connection = t_url.openConnection();
 System.out.println(Read timeout for URLConnection:  +
            t_connection.getReadTimeout());

 That ought to tell you what the default read timeout is: the Java API
 doesn't specify what the default read timeout is, so it's up to the
 implementation to choose a default. I would expect that the default
 would be 0 (wait forever), but it might not be.

 As I said, the connection is already timing out and I don't want it
 to.

 It's possible that this exception is not accurately reporting the real
 problem. It might be something else happening that is triggering a
 ReadTimeoutException: check the source code for the HttpURLConnection
 class to see if any particular default read timeout is being set, and
 the code for the SocketInputStream class to.. oh, wait, that's a native
 method so you're out of luck, there.

 Shouldn't the socket wait indefinitely for a response if nothing set
 a finite timeout length?

 That's a reasonable expectation, but there's no documentation that says
 that behavior is the default.

 This is code in an already release product so if I can track down an
 environment setting that's governing the timeout then I can just
 adjust that setting for the one customer with the problem rather than
 having to patch the code and release it to everyone.

 I think you're going to require a patch, though it's possible that some
 of these defaults are settable via system properties, etc.

 I can't find any documentation for java.net.SocketInputStream: it must
 not be a public API. Yup:

 /**
  * This stream extends FileInputStream to implement a
  * SocketInputStream. Note that this class should bNOT/b be
  * public.
  *
  * @version     1.34, 12/19/03
  * @author      Jonathan Payne
  * @author      Arthur van Hoff
  */

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkt+wF0ACgkQ9CaO5/Lv0PAtXACgnS7F/c/VAAa1baQiJMm7oXtm
 lNkAmwXP4ifzV/2xB6NID2ZMhQ7hoeLh
 =TKYk
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





-- 
Chris Mannion
iCasework and LocalAlert implementation team
0208 144 4416

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Sending request to tomcat failed.....

2010-02-25 Thread André Warnier

Pid wrote:

Maybe you're not seeing any of the answers we're posting?


In which case..
:-)

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Sending request to tomcat failed.....

2010-02-25 Thread Pid

Maybe you're not seeing any of the answers we're posting?


p


On 25/02/2010 13:04, Munirathinavel wrote:


Hi all...
 I've been performance testing for few days.While doing load testing with
50 users, I'm also trying to access the application through Browser but
sometimes pages are not loading for long time.While seeing the logs I'm
getting the following lines in mod_jk.log

[Thu Feb 25 17:09:31 2010][4180:2508] [info] jk_ajp_common.c (1788): Writing
to client aborted or client network problems
[Thu Feb 25 17:09:31 2010][4180:2508] [info] jk_ajp_common.c (2447):
(worker1) sending request to tomcat failed (unrecoverable), because of
client write error (attempt=1)
[Thu Feb 25 17:09:31 2010]worker1 216.205.107.50 48.484375
[Thu Feb 25 17:09:31 2010][4180:2508] [info] mod_jk.c (2608): Aborting
connection for worker=worker1

  These are my apache2.2  tomcat6.0.18 configurations...

workers.properties:

 workers.tomcat_home=D:/tomcat6.0.18
 workers.java_home=C:/Program Files/Java/jdk1.6.0_16

ps=/


worker.list=worker1
 worker.worker1.type=ajp13
 worker.worker1.host=
 worker.worker1.port=8009
 worker.worker1.connection_pool_timeout=600
 worker.worker1.connect_timeout=6
 worker.worker1.prepost_timeout=6
 worker.worker1.socket_keepalive=1
 worker.worker1.socket_timeout=60
 worker.worker1.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers= worker1
worker.inprocess.type=jni

server.xml
Server port=8006 shutdown=SHUTDOWN
   Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
   Listener className=org.apache.catalina.core.JasperListener /
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
/
   Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
   GlobalNamingResources
 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
   Service name=Catalina
 Connector debug=0 enableLookups=false port=8009
protocol=AJP/1.3
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
acceptCount=100
   minProcessors=5 maxProcessors=100 connectionTimeout=6
disableUploadTimeout=true redirectPort=8443/
Engine name=Catalina defaultHost= debug=0
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase/
   Host name=  appBase=gateway
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false

 Listener className =
org.apache.jk.config.ApacheConfig workersConfig=conf/workers.properties
modJk=D:/Apache2.2/modules/mod_jk.so jkLog=logs/mod_jk.log
jkDebug=info noRoot=false/
   /Host
 /Engine
   /Service

/Server

context.xml
?xml version='1.0' encoding='utf-8'?

Context
  WatchedResourceWEB-INF/web.xml/WatchedResource
 Resource name=jdbc/vehrentDB auth=Container
   type=javax.sql.DataSource
   maxActive=50
   maxIdle=10
 minIdle=30
   username= password=

driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  url=jdbc:sqlserver://:1433;

databaseName=;user=;password=;
   numTestsPerEvictionRun=15
timeBetweenEvictionRunsMillis=90
 minEvictableIdleTimeMillis=90
 testWhileIdle=true
 testOnBorrow=false
 removeAbandoned=true
 removeAbandonedTimeout=300
   logAbandoned=true
 /
 Resource name=jdbc/empowerDB auth=Container
   type=javax.sql.DataSource
 maxActive=8
 maxIdle=4
 minIdle=2
 username= password=

driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver

url=jdbc:sqlserver://:1433;databaseName=;user=;password=;
 numTestsPerEvictionRun=15
 timeBetweenEvictionRunsMillis=90
 minEvictableIdleTimeMillis=90
 testWhileIdle=true
   testOnBorrow=false
 removeAbandoned=true
 removeAbandonedTimeout=300
   logAbandoned=true
 /
/Context

httpd-vhosts.conf

NameVirtualHost *:80
VirtualHost *:80
 ServerAdmin xx
 DocumentRoot D:/Apache2.2/htdocs/gateway
 ServerName xx
 ServerAlias xx
 ErrorLog logs/gateway-error.log
 CustomLog logs/gateway-access.log common

 JkMount /* worker1
 

Re: Regarding Connector in tomcat 6

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

On 2/25/2010 2:11 AM, Cummins College wrote:
 Actually we are designing a security layer over our web app. We want to give
 the user an option of choosing between http or https on login. Hence the
 need of changing from http to https or vice-versa at runtime.

So, user A logs on and chooses HTTPS, switching the entire server over
to HTTPS-only mode. Then, user B attempts to access the site using HTTP
and the server wont pick up the phone. Brilliant.

What happens if the server processes two requests at once: one for HTTP
and one for HTTPS? You have a race condition for who wins at best and
the possibility of disabling /both/ of your connectors, rendering your
server inert.

Why not simply allow users to use either HTTPS or HTTP at their leisure?
You don't have to go turning connectors on and off for that kind of thing.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG3CkACgkQ9CaO5/Lv0PCt0QCffnARFn+t5hYzBHhmIG9nQ6xG
cCkAoKbocNkFcunuYzkjFJ+WotA5agBB
=hA7E
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: NioConnector limits and comet requests

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

On 2/25/2010 12:47 AM, James Roper wrote:
 Is there anyone on this list with a detailed knowledge of the NIO 
 Connector?

In spite of his terse reply, Filip is, I believe, quite familiar with
that code. Would you consider writing a patch and submitting it? The
best thing to do it start out by filing a bugzilla enhancement request.
That's the place to attach any patches you might develop. Enhancement
requests with accompanying patches are accepted for inclusion much
faster than those without patches :)

 Sounds like maybe there's a task to be done in providing limits on
 the NIO pools/queues.  I wonder how hard it is to get a tomcat dev 
 environment setup...

Last time I tried, it wasn't too bad. Just be aware that sometimes the
build environment has to be specific even if the runtime environment
isn't (that is, TC6 may require Java 6 to build, but only Java 5 to
run). Check the docs for more information.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG3RAACgkQ9CaO5/Lv0PA72ACghFcr0w7BPB0vZxqZszA5tEFu
DDAAniC0dQYjsp7JcS8CXZAVbWZBshV2
=JtsS
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: listing directory content outside tomcat root

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ivan,

On 2/25/2010 9:14 AM, Ivan Longhi wrote:
 this should be the solution (and one more little question at the end of code):
 
 conf/web.xml
 
servlet
servlet-namedefault/servlet-name

 servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
param-namelistings/param-name
param-valuefalse/param-value !-- FALSE to avoid
 inheritance to all webapps --
/init-param
/servlet
 

This should be the default, so no changes to conf/web.xml should be
necessary.

 conf/server.xml
 
 .
 
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 
Context path=/test docBase=/path_to_some_dir/
Parameter name=listings value=true /
/Context

You shouldn't declare Context elements within conf/server.xml in any
currently-supported version of Tomcat. Instead, put everything you need
in your webapp's META-INF/context.xml file. Remember that path and
docBase parameters are not allowed.

Also, Parameter name=listings value=true / has no effect
whatsoever on your configuration. You can remove it. Given that, you
don't even need a META-INF/context.xml since there's nothing to add to
the default.

 /path_to_some_dir/WEB-INF/web.xml
 
 
 web-app ...
 servlet
 servlet-nametest/servlet-name
 
 servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
 init-param
 param-namelistings/param-name
 param-valuetrue/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
 servlet-nametest/servlet-name
 url-pattern//url-pattern
 /servlet-mapping
 /web-app


The above changes to WEB-INF/web.xml are all you need.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG3p8ACgkQ9CaO5/Lv0PDx2gCguuCNrDrO4sy2HChs99FKotYZ
VlkAnAsk0dyM1Kv8ckFuHxiSxW2MH3TT
=csil
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache 2.2 and Tomcat 6.0 using SSL

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

On 2/25/2010 10:56 AM, sikorsky wrote:
 I'm new to Apache 2.2 and TomCat 6.0.  I thought I could use SSL on 
 my Apache web server and not need to have SSL on my Tomcat 
 applications.

You can.

 Especially since they are both on the same server.

This is not really relevant, but having them on the same server will
significantly improve performance.

 I installed an Entrust Cert on my Apache webserver and it works fine 
 with https.

Great.

 When I redirect to the Tomcat servlet I get a 404.  If I switch to 
 http everything works fine.

Your configuration must have something missing. Remember that the SSL
configuration of the server is separate from the non-SSL portion. If you
have JkMount or ProxyPass directives in the non-secure configuration,
you'll have to duplicate those in your SSL section.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG314ACgkQ9CaO5/Lv0PCR0QCgw8pTiD7zfYYqI/vtklhqM37e
+LcAnjTIINde3/t29xCQo5MfoyO7cnS5
=SYl9
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Propes, Barry L
Sorry for the delay - supplying both my META-INF/context.xml and 
webapps/WEB-INF/web.xml contents.


Should be noted: for the factory type in the params below, I tried both 
factory=org.apache.commons.dbcp.BasicDataSourceFactory and
factory=org.apache.dbcp.BasicDataSourceFactory, each to no avail.

I removed the commons ref to test out since there's no commons/lib dir in TC 
6.0.24, unlike in TC 4.1.31

Please apprise if the error is glaring here and I just can't see it. That's 
certainly possible!

Thanks, Chuck.


context.xml in META-INF fldr
-?xml version=1.0 encoding=UTF-8?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
Context
  !-- omitting - factory=oracle.jdbc.pool.OracleDataSourceFactory below--  
Resource name=jdbc/myoracle 
auth=Container 
type=javax.sql.DataSource
factory=org.apache.commons.dbcp.BasicDataSourceFactory
 maxActive=125 
 maxIdle=15 
 maxWait=7000
 removeAbandoned=true
 removeAbandonedTimeout=30
 logAbandoned=true
username=user_name 
password=pass_word 
driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@159.177.102.100:1526:MYSID
minEvictableIdleTimeMillis=5000
timeBetweenEvictionRunsMillis = 1
testWhileIdle=true
/ 
/Context


in webapps/WEB-INF/web.xml

resource-ref
descriptionMy Ora datasource/description
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, February 23, 2010 5:53 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

If you don't mind, post your Context element again.  The error message 
indicates something doesn't match between what your JSP/servlet is requesting 
and what's registered via the Resource element.

 - Chuck


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: NioConnector limits and comet requests

2010-02-25 Thread Filip Hanik - Dev Lists

On 02/25/2010 01:26 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

On 2/25/2010 12:47 AM, James Roper wrote:
   

Is there anyone on this list with a detailed knowledge of the NIO
Connector?
 

In spite of his terse reply, Filip is, I believe, quite familiar with
that code. Would you consider writing a patch and submitting it? The
best thing to do it start out by filing a bugzilla enhancement request.
That's the place to attach any patches you might develop. Enhancement
requests with accompanying patches are accepted for inclusion much
faster than those without patches :)
   

I started working on this in trunk, so yes, get setup for trunk

svn co http://svn.apache.org/repos/asf/trunk
cd trunk
ant

it also has the files for eclipse in there, you may have to add some 
stuff to the classpath


it's all handled in NioEndpoint, and I've started by adding a
getKeyCount()
to every poller,

the only thing remaining is

1. When a poller wakes up due to a timeout, get a key count (don't do it 
on an actual even as that will cause performance issues)

2. In the acceptor thread, check all pollers and sum up the key counts
3. decide what to do. You can't simply close connections, but you can 
sleep, and let the backlog pile up for a bit

   or implement some kind of barrier, but this is a bit tricky too

best
Filip


   

Sounds like maybe there's a task to be done in providing limits on
the NIO pools/queues.  I wonder how hard it is to get a tomcat dev
environment setup...
 

Last time I tried, it wasn't too bad. Just be aware that sometimes the
build environment has to be specific even if the runtime environment
isn't (that is, TC6 may require Java 6 to build, but only Java 5 to
run). Check the docs for more information.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG3RAACgkQ9CaO5/Lv0PA72ACghFcr0w7BPB0vZxqZszA5tEFu
DDAAniC0dQYjsp7JcS8CXZAVbWZBshV2
=JtsS
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


   



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: NioConnector limits and comet requests

2010-02-25 Thread Filip Hanik - Dev Lists

svn co http://svn.apache.org/repos/asf/tomcat/trunk



On 02/25/2010 01:48 PM, Filip Hanik - Dev Lists wrote:

On 02/25/2010 01:26 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

On 2/25/2010 12:47 AM, James Roper wrote:

Is there anyone on this list with a detailed knowledge of the NIO
Connector?

In spite of his terse reply, Filip is, I believe, quite familiar with
that code. Would you consider writing a patch and submitting it? The
best thing to do it start out by filing a bugzilla enhancement request.
That's the place to attach any patches you might develop. Enhancement
requests with accompanying patches are accepted for inclusion much
faster than those without patches :)

I started working on this in trunk, so yes, get setup for trunk

svn co http://svn.apache.org/repos/asf/trunk
cd trunk
ant

it also has the files for eclipse in there, you may have to add some 
stuff to the classpath


it's all handled in NioEndpoint, and I've started by adding a
getKeyCount()
to every poller,

the only thing remaining is

1. When a poller wakes up due to a timeout, get a key count (don't do 
it on an actual even as that will cause performance issues)

2. In the acceptor thread, check all pollers and sum up the key counts
3. decide what to do. You can't simply close connections, but you can 
sleep, and let the backlog pile up for a bit

   or implement some kind of barrier, but this is a bit tricky too

best
Filip



Sounds like maybe there's a task to be done in providing limits on
the NIO pools/queues.  I wonder how hard it is to get a tomcat dev
environment setup...

Last time I tried, it wasn't too bad. Just be aware that sometimes the
build environment has to be specific even if the runtime environment
isn't (that is, TC6 may require Java 6 to build, but only Java 5 to
run). Check the docs for more information.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG3RAACgkQ9CaO5/Lv0PA72ACghFcr0w7BPB0vZxqZszA5tEFu
DDAAniC0dQYjsp7JcS8CXZAVbWZBshV2
=JtsS
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Sending request to tomcat failed.....

2010-02-25 Thread Pid

On 25/02/2010 19:49, André Warnier wrote:

Pid wrote:

Maybe you're not seeing any of the answers we're posting?


In which case..
:-)


[cue tumbleweed]


p


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: DB connection error -Tomcat 6 config

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 2/25/2010 3:45 PM, Propes, Barry L wrote:
 Should be noted: for the factory type in the params below, I tried both 
 factory=org.apache.commons.dbcp.BasicDataSourceFactory and
 factory=org.apache.dbcp.BasicDataSourceFactory, each to no avail.

How about either factory=org.apache.tomcat.dbcp.BasicDataSourceFactory
or specifying no factory at all and accepting the default (which is that
shown above)?

 I removed the commons ref to test out since there's no commons/lib
 dir in TC 6.0.24, unlike in TC 4.1.31


Right: common/lib, server/lib, and shared/lib are essentially all merged
into a single /lib in Tomcat 6. You can play with catalina.properties
and make all kinds of ClassLoader hierarchies, but it's usually not
worth it.

 Context
   !-- omitting - factory=oracle.jdbc.pool.OracleDataSourceFactory below-- 
  
 Resource name=jdbc/myoracle 
 auth=Container 
 type=javax.sql.DataSource
 factory=org.apache.commons.dbcp.BasicDataSourceFactory
  maxActive=125 
  maxIdle=15 
  maxWait=7000
  removeAbandoned=true
  removeAbandonedTimeout=30
  logAbandoned=true
 username=user_name 
 password=pass_word 
 driverClassName=oracle.jdbc.OracleDriver
 url=jdbc:oracle:thin:@159.177.102.100:1526:MYSID
 minEvictableIdleTimeMillis=5000
 timeBetweenEvictionRunsMillis = 1
 testWhileIdle=true
 / 
 /Context

All that looks okay to me, although 700ms isn't a long time to wait for
a connection to come back from the pool: my guess is that you'd rather
wait for a while for a connection and give the user a complete, if late,
response rather than just giving them an error screen.

My position is that testWhildIdle isn't really useful: if you test on
borrow, that's usually sufficient unless you want to basically eliminate
the possibility that a connection will have to be re-established during
a user request.

Finally, 30 seconds is a very short abandoned timeout, though only you
can determine what is appropriate in your environment. If you have some
code which executes 3 10-second queries, then your connection is
considered abandoned :(

 in webapps/WEB-INF/web.xml
 
 resource-ref
 descriptionMy Ora datasource/description
 res-ref-namejdbc/myoracle/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref

In my experience, resource-ref is not necessary in web.xml but does
follow the spec.

So, still getting this error, then:
 javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc 
 is not bound in this Context

?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG6v8ACgkQ9CaO5/Lv0PACzQCgjVa3oW+0SH14un73MsEFj5k6
yKwAoKSyLVqESWo4CxgiLOgMqXy+0ZNR
=GAHw
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Propes, Barry L
Also,

After reconfiguring, I seem to be getting this error too, now. For which a 
cursory search on Google seems to reveal many cases of this happening with 
various DB drivers, as well as different versions of Tomcat, from most recent 
to the 5x series.
But no real solution found yet within those posts/forums. Still looking though.



javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create JDBC driver of class '' for connect URL 'null'

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.chngctrl.change_005fctrl_005frslts_005fcondensed3_jsp._jspService(change_005fctrl_005frslts_005fcondensed3_jsp.java:364)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null'

org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

org.apache.jsp.chngctrl.change_005fctrl_005frslts_005fcondensed3_jsp._jspService(change_005fctrl_005frslts_005fcondensed3_jsp.java:183)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

java.lang.NullPointerException
sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
java.sql.DriverManager.getDriver(DriverManager.java:253)

org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

org.apache.jsp.chngctrl.change_005fctrl_005frslts_005fcondensed3_jsp._jspService(change_005fctrl_005frslts_005fcondensed3_jsp.java:183)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 

-Original Message-
From: Propes, Barry L [GCG-NAOT] 
Sent: Thursday, February 25, 2010 2:46 PM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Sorry for the delay - supplying both my META-INF/context.xml and 
webapps/WEB-INF/web.xml contents.


Should be noted: for the factory type in the params below, I tried both 
factory=org.apache.commons.dbcp.BasicDataSourceFactory and 
factory=org.apache.dbcp.BasicDataSourceFactory, each to no avail.

I removed the commons ref to test out since there's no commons/lib dir in TC 
6.0.24, unlike in TC 4.1.31

Please apprise if the error is glaring here and I just can't see it. That's 
certainly possible!

Thanks, Chuck.


context.xml in META-INF fldr
-?xml version=1.0 encoding=UTF-8?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
Context
  !-- omitting - factory=oracle.jdbc.pool.OracleDataSourceFactory below-- 
Resource name=jdbc/myoracle 

Re: [OT] jvm exits without trace

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Taylan,

On 2/24/2010 8:31 AM, Taylan Develioglu wrote:
 We have also had failures with hotspot error files (hs_err) present, and
 the cause specified was indeed SIGSEGV indicating a page fault. But I
 don't know if the two are related.

Just to be clear, a SIGSEGV is a segmentation violation (memory read
outside process space), not a page fault, which is a perfectly normal
thing to occur during execution. The latter is a virtual memory matter
handled by the operating system and should be transparent (other than a
delay) to the application.

http://en.wikipedia.org/wiki/Segmentation_violation
http://en.wikipedia.org/wiki/Page_fault

The Wikipedia page for Page fault does indicate that Invalid page
fault is a term that essentially means null pointer dereference but
I've never heard that term used, ever.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG7UMACgkQ9CaO5/Lv0PAdLgCfUypdTf332QZ6JHyTzPlS4Lu5
4xMAnReYrzhvO9xiSS7qB331Tq5DwPpx
=5cqn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: jvm exits without trace

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Taylann,

On 2/24/2010 8:31 AM, Taylan Develioglu wrote:
 Most memory is commited to tomcat, where a 24G machine would have 18G
 allocated to heap, 128M to permgen and some unspecified amount would get
 used by jni for apr. About 4G remains free after calculating taking into
 account the jvm itsself.
 A 16G machine would have 12G allocated to the heap.

Are you sure the rest of the JVM can fit into this space? I've heard of
JVMs (particularly on Windows) that take a significant chunk of memory
on top of the heap space requested on the command-line.

Definitely check your system logs for OOM killer, here.

What happens if you cut your heap in half? Can each machine in your
(probably) cluster survive with less heap space?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG7cEACgkQ9CaO5/Lv0PDRtgCfd7qBww9EUP9whAf6ZlvSvl02
VnYAoK6f6GTY1vBzw3QW0phnr/53gBYG
=8thi
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: DB connection error -Tomcat 6 config

2010-02-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 2/25/2010 4:26 PM, Propes, Barry L wrote:
 After reconfiguring, I seem to be getting this error too, now. For
 which a cursory search on Google seems to reveal many cases of this
 happening with various DB drivers, as well as different versions of
 Tomcat, from most recent to the 5x series.

 But no real solution found yet within those posts/forums. Still looking 
 though.
 
 javax.servlet.ServletException: 
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
 class '' for connect URL 'null'

Ugh, that's the worst one IMO, because it doesn't offer any help for
what the problem actually is.

When this happens to people, I usually recommend:

1. Quadruple-check that you have your JDBC driver only in one place (in
Tomcat's /lib directory)
2. Remove all unnecessary configuration from your Resource element:
just (simple) URL, driver class, username and password, just to get
things started.

Good luck,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG7toACgkQ9CaO5/Lv0PD/YACgu9h3NO6F8HRwRj8F1k9CRYu/
s4oAnirBRqqMw0S3GYByn6GzHLiRwug5
=9Mzd
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 javax.servlet.ServletException:
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
 driver of class '' for connect URL 'null'

That's symptomatic of the Resource element not being seen by Tomcat.

 root cause
 java.lang.NullPointerException
   sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)

O.k., now you're in very serious trouble.  Nothing other than joke programs 
should ever use the JdbcOdbc bridge - it's pretty much complete junk.  Again, 
you're not using the Resource element you think you are.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Propes, Barry L
I'll totally remove factory. It was necessary in my 4.1 build.

I'll also tweak the other ms time settings, and the WhileIdle - to borrow, like 
you suggest and see if that works better, of if at all.

I'll also try removing the resource-ref and see what occurs.

Thanks, Chris.


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, February 25, 2010 3:26 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 2/25/2010 3:45 PM, Propes, Barry L wrote:
 Should be noted: for the factory type in the params below, I tried 
 both factory=org.apache.commons.dbcp.BasicDataSourceFactory and 
 factory=org.apache.dbcp.BasicDataSourceFactory, each to no avail.

How about either factory=org.apache.tomcat.dbcp.BasicDataSourceFactory
or specifying no factory at all and accepting the default (which is that shown 
above)?

 I removed the commons ref to test out since there's no commons/lib dir 
 in TC 6.0.24, unlike in TC 4.1.31


Right: common/lib, server/lib, and shared/lib are essentially all merged into a 
single /lib in Tomcat 6. You can play with catalina.properties and make all 
kinds of ClassLoader hierarchies, but it's usually not worth it.

 Context
   !-- omitting - factory=oracle.jdbc.pool.OracleDataSourceFactory 
 below-- Resource name=jdbc/myoracle
 auth=Container 
 type=javax.sql.DataSource
 factory=org.apache.commons.dbcp.BasicDataSourceFactory
  maxActive=125 
  maxIdle=15 
  maxWait=7000
  removeAbandoned=true
  removeAbandonedTimeout=30
  logAbandoned=true
 username=user_name 
 password=pass_word 
 driverClassName=oracle.jdbc.OracleDriver
 url=jdbc:oracle:thin:@159.177.102.100:1526:MYSID
 minEvictableIdleTimeMillis=5000
 timeBetweenEvictionRunsMillis = 1
 testWhileIdle=true
 /
 /Context

All that looks okay to me, although 700ms isn't a long time to wait for a 
connection to come back from the pool: my guess is that you'd rather wait for a 
while for a connection and give the user a complete, if late, response rather 
than just giving them an error screen.

My position is that testWhildIdle isn't really useful: if you test on borrow, 
that's usually sufficient unless you want to basically eliminate the 
possibility that a connection will have to be re-established during a user 
request.

Finally, 30 seconds is a very short abandoned timeout, though only you can 
determine what is appropriate in your environment. If you have some code which 
executes 3 10-second queries, then your connection is considered abandoned :(

 in webapps/WEB-INF/web.xml
 
 resource-ref
 descriptionMy Ora datasource/description 
 res-ref-namejdbc/myoracle/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref

In my experience, resource-ref is not necessary in web.xml but does follow 
the spec.

So, still getting this error, then:
 javax.servlet.ServletException: javax.naming.NameNotFoundException: 
 Name jdbc is not bound in this Context

?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG6v8ACgkQ9CaO5/Lv0PACzQCgjVa3oW+0SH14un73MsEFj5k6
yKwAoKSyLVqESWo4CxgiLOgMqXy+0ZNR
=GAHw
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Propes, Barry L
I wondered about that, too, Chuck, because I'm not referencing that anywhere!

I recall a couple of years ago you emphatically stating (to which I wholly 
agree) about the sun driver being total junk, but for the life of me can't 
determine how that's trying to be referenced!

I might have a very old file (servlet) in the webapp package floating around 
that's not even being used. Perhaps it's referencing it through the build 
somehow.

I'll find it and kill it off. 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Thursday, February 25, 2010 3:43 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 javax.servlet.ServletException:
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
 driver of class '' for connect URL 'null'

That's symptomatic of the Resource element not being seen by Tomcat.

 root cause
 java.lang.NullPointerException
   sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)

O.k., now you're in very serious trouble.  Nothing other than joke programs 
should ever use the JdbcOdbc bridge - it's pretty much complete junk.  Again, 
you're not using the Resource element you think you are.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Propes, Barry L
Ok, Chris -- good news and bad news for me, I suppose.

I made a sole reference to the driver source in a standalone JSP, which could 
hit it, so we know the driver is good and valid.

It's just that it's being refused in the DBCP setting within the context.xml 
file in the META-INF fldr, as well as whether I not I put the resource ref in 
the web.xml file of the webapp folder.

That tells me my Oracle jar file works fine, and driver. Just got to shore up 
the conn pool part now.

Thanks, Chris!
 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, February 25, 2010 3:43 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 2/25/2010 4:26 PM, Propes, Barry L wrote:
 After reconfiguring, I seem to be getting this error too, now. For 
 which a cursory search on Google seems to reveal many cases of this 
 happening with various DB drivers, as well as different versions of 
 Tomcat, from most recent to the 5x series.

 But no real solution found yet within those posts/forums. Still looking 
 though.
 
 javax.servlet.ServletException: 
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
 class '' for connect URL 'null'

Ugh, that's the worst one IMO, because it doesn't offer any help for what the 
problem actually is.

When this happens to people, I usually recommend:

1. Quadruple-check that you have your JDBC driver only in one place (in 
Tomcat's /lib directory) 2. Remove all unnecessary configuration from your 
Resource element:
just (simple) URL, driver class, username and password, just to get things 
started.

Good luck,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuG7toACgkQ9CaO5/Lv0PD/YACgu9h3NO6F8HRwRj8F1k9CRYu/
s4oAnirBRqqMw0S3GYByn6GzHLiRwug5
=9Mzd
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Sending request to tomcat failed.....

2010-02-25 Thread André Warnier

Pid wrote:

On 25/02/2010 19:49, André Warnier wrote:

Pid wrote:

Maybe you're not seeing any of the answers we're posting?


In which case..
:-)


[cue tumbleweed]

In the same vein, I got an email message yesterday (from one of our 
watchdog scripts), which was :


quote

Subject: Cron r...@colin /root/bin/miraError
Date: Wed, 24 Feb 2010 08:00:02 +0100
From: r...@.yyy.com (Cron Daemon)
To: r...@xxx.yyy.com

Can't send mail: sendmail process failed


unquote

No kidding.
I'm a bit puzzled.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: What governs a URL connection timeout?

2010-02-25 Thread Stephan van Loendersloot

On 25-02-10 18:37, Chris Mannion wrote:

Very helpful advice.  I can't help but feel a little out of my depth
with this one :-\

   


Hi Chris,

You may want to check if your JVM is started with one of the following
options:

-Dsun.net.client.defaultConnectTimeout=value in milliseconds
-Dsun.net.client.defaultReadTimeout=value in milliseconds

For both of these the default is -1, which means no timeout is set.

For more information:
http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html

Regards,

Stephan.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Sending request to tomcat failed.....

2010-02-25 Thread Pid

On 25/02/2010 22:00, André Warnier wrote:

Pid wrote:

On 25/02/2010 19:49, André Warnier wrote:

Pid wrote:

Maybe you're not seeing any of the answers we're posting?


In which case..
:-)


[cue tumbleweed]


In the same vein, I got an email message yesterday (from one of our
watchdog scripts), which was :

quote

Subject: Cron r...@colin /root/bin/miraError
Date: Wed, 24 Feb 2010 08:00:02 +0100
From: r...@.yyy.com (Cron Daemon)
To: r...@xxx.yyy.com

Can't send mail: sendmail process failed


unquote

No kidding.
I'm a bit puzzled.


... and people wonder why we can't make the interweb tubes run perfectly 
all of the time.



p



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat SSO JSESSIONIDSSO value can't be reset by browser

2010-02-25 Thread Xiaojun Deng
Hello,

I use the Tomcat SSO function, and I found that when I restart my tomcat or the 
session timeout, I refresh the page, the cookie JSESSIONIDSSO keep the old 
value,
so I can't login my application.

And the web application's JSESSIONID works well, they can reset the cookie 
value.

Is there a way to configure for the JSESSIONIDSSO?

server.xml content
Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Realm  className=org.apache.catalina.realm.SSOMultipleDSRealm /
!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html --
Valve className=org.apache.catalina.authenticator.SingleSignOn 
requireReauthentication=false/
/Host

Thanks.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Java programm to Shutdwon the tomcat server

2010-02-25 Thread dBenjamin

Thanks for helping developers…
Can you please help me I am facing problem to shutdown the tomcat server in
windows platform (xp, vista, windows7). 
if you click CTRL+ C in the tomcat console window, server getting shutdown.
Like that is any specific command to send through java program to shutdown
the tomcat server. 

-- 
View this message in context: 
http://old.nabble.com/Java-programm-to-Shutdwon-the-tomcat-server-tp27714568p27714568.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Karthik Nanjangude
Hi

I hope this helps


?xml version=1.0 encoding=UTF-8?
Context
workDir=work/Catalina/localhost/appwar

Resource name=jdbc/OrclDB
  auth=Container
  type=oracle.jdbc.pool.OracleDataSource
  factory=oracle.jdbc.pool.OracleDataSourceFactory
  user=ABCD
  password=WXYZ

driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@IP:1521:SERVICE/
/Context


I have been using this from TC 5.0.18.0 ,5.0.20.0 , 5.0.24.0
And have never any issues with connection pool

With Oracle 10GDB , JDK1.4 /1.5,ojdbc14.jar



With regards
karthik



-Original Message-
From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Sent: Friday, February 26, 2010 2:16 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Sorry for the delay - supplying both my META-INF/context.xml and 
webapps/WEB-INF/web.xml contents.


Should be noted: for the factory type in the params below, I tried both
factory=org.apache.commons.dbcp.BasicDataSourceFactory and
factory=org.apache.dbcp.BasicDataSourceFactory, each to no avail.

I removed the commons ref to test out since there's no commons/lib dir in TC 
6.0.24, unlike in TC 4.1.31

Please apprise if the error is glaring here and I just can't see it. That's 
certainly possible!

Thanks, Chuck.


context.xml in META-INF fldr
-?xml version=1.0 encoding=UTF-8?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
Context
  !-- omitting - factory=oracle.jdbc.pool.OracleDataSourceFactory below--
Resource name=jdbc/myoracle
auth=Container
type=javax.sql.DataSource
factory=org.apache.commons.dbcp.BasicDataSourceFactory
 maxActive=125
 maxIdle=15
 maxWait=7000
 removeAbandoned=true
 removeAbandonedTimeout=30
 logAbandoned=true
username=user_name
password=pass_word
driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@159.177.102.100:1526:MYSID
minEvictableIdleTimeMillis=5000
timeBetweenEvictionRunsMillis = 1
testWhileIdle=true
/
/Context


in webapps/WEB-INF/web.xml

resource-ref
descriptionMy Ora datasource/description
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, February 23, 2010 5:53 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

If you don't mind, post your Context element again.  The error message 
indicates something doesn't match between what your JSP/servlet is requesting 
and what's registered via the Resource element.

 - Chuck


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DB connection error -Tomcat 6 config

2010-02-25 Thread Felix Schumacher
Hi,

have you checked, that no context file for your webapp exists in 
conf/Catalina/localhost? The file would be named like your webapp but ending 
with .xml.
So if your webapp is called foo. The file would be 
conf/Catalina/localhost/foo.xml.
Another thing with filenames. You called your context file META-INF/context.xml 
but your web.xml webapps/WEB-INF/web.xml. beware that both directories META-INF 
and WEB-INF are located inside your webapp. Keeping the foo examples, they 
would be sitting in webapps/foo.

Bye
 Felix


Propes, Barry L barry.l.pro...@citi.com schrieb:

Sorry for the delay - supplying both my META-INF/context.xml and 
webapps/WEB-INF/web.xml contents.


Should be noted: for the factory type in the params below, I tried both 
factory=org.apache.commons.dbcp.BasicDataSourceFactory and
factory=org.apache.dbcp.BasicDataSourceFactory, each to no avail.

I removed the commons ref to test out since there's no commons/lib dir in TC 
6.0.24, unlike in TC 4.1.31

Please apprise if the error is glaring here and I just can't see it. That's 
certainly possible!

Thanks, Chuck.


context.xml in META-INF fldr
-?xml version=1.0 encoding=UTF-8?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
Context
  !-- omitting - factory=oracle.jdbc.pool.OracleDataSourceFactory below--  
Resource name=jdbc/myoracle 
auth=Container 
type=javax.sql.DataSource
factory=org.apache.commons.dbcp.BasicDataSourceFactory
 maxActive=125 
 maxIdle=15 
 maxWait=7000
 removeAbandoned=true
 removeAbandonedTimeout=30
 logAbandoned=true
username=user_name 
password=pass_word 
driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@159.177.102.100:1526:MYSID
minEvictableIdleTimeMillis=5000
timeBetweenEvictionRunsMillis = 1
testWhileIdle=true
/ 
/Context


in webapps/WEB-INF/web.xml

resource-ref
descriptionMy Ora datasource/description
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, February 23, 2010 5:53 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

If you don't mind, post your Context element again.  The error message 
indicates something doesn't match between what your JSP/servlet is requesting 
and what's registered via the Resource element.

 - Chuck


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org