RE: Tomcat configuration on proxy_ajp.conf

2019-02-12 Thread Propes, Barry L
Ok, thanks, Stephane. I'll work on configuring it similarly to what I had on my 
old one.

-Original Message-
From: [External] Stephane Passignat  
Sent: Tuesday, February 12, 2019 4:00 PM
To: Tomcat Users List 
Subject: Re: Tomcat configuration on proxy_ajp.conf

Hello,

Just load ajp module at least one. No matter if it appears in several file. 
Apache raised some warning. I didn't see side effect on tomcat or apache if 
it's loaded several time. Be sure to set it up only once per vhost.

My experience is, my apache servers have mostly standard conf setup by package 
Installers, and then I load (again) additionnal every vhost loads its modules 
(php, amp, proxy, ldap...). These configuration are stored in a central 
versioning system and installed at deployment time. Then I can deploy apps 
regardless of apache initial setup and operating system (works also on windows 
too).


Regards
Stephane

Envoyé par 
BlueMail<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.bluemail.me_r-3Fb-3D14395=DwIGaQ=j-EkbjBYwkAB4f8ZbVn1Fw=GrngNI9-Y1vwka9eiSQJvBjwJtXdM9U9QfF-SCO-iqM=BH2kXS5xOC1tFPOVkFNoY4PoVkagB1vYVRTr6aT95wM=8qIl89Xm7pwcfloXi_Pq5S-oZ9LHBP2hUFLSBpQlEw8=>
Le 12 févr. 2019, à 22:28, "Propes, Barry L " 
mailto:barry.l.pro...@citi.com.invalid>> a 
écrit:

Hi folks,

First I apologize if this seems more like an Apache question rather than a 
Tomcat question. I just got an upgraded Red Hat Linux build from 6 to 7, and 
Apache went from 2.2.15 to 2.4.6.
In my older Red hat 6 build, I've got a tomcat.conf file that handles ProxyPass 
and ProxyPassReverse attributes.

I see something similar in the conf.d directory on the Red Hat 7 Apache build, 
with a file called "proxy_ajp.conf."

It comes with some ProxyPass lines commented out by default. I was just 
wondering if I still need a tomcat.conf file in the new build or if this 
handles this? I looked for some similar messages and threads but couldn't 
discern.
Again, apologies if this was not the right forum. If this is correct, 
affirmation of such would be great!

Thank you!


Barry Propes
Citimortgage



Tomcat configuration on proxy_ajp.conf

2019-02-12 Thread Propes, Barry L
Hi folks,

First I apologize if this seems more like an Apache question rather than a 
Tomcat question. I just got an upgraded Red Hat Linux build from 6 to 7, and 
Apache went from 2.2.15 to 2.4.6.
In my older Red hat 6 build, I've got a tomcat.conf file that handles ProxyPass 
and ProxyPassReverse attributes.

I see something similar in the conf.d directory on the Red Hat 7 Apache build, 
with a file called "proxy_ajp.conf."

It comes with some ProxyPass lines commented out by default. I was just 
wondering if I still need a tomcat.conf file in the new build or if this 
handles this? I looked for some similar messages and threads but couldn't 
discern.
Again, apologies if this was not the right forum. If this is correct, 
affirmation of such would be great!

Thank you!


Barry Propes
Citimortgage



RE: Error in DBCP Connection Pool with tomcat 6.x

2014-07-03 Thread Propes, Barry L
Good to hear.

-Original Message-
From: Vijendra Pachoriya [mailto:vijendra.pachor...@indegene.com] 
Sent: Thursday, July 03, 2014 8:22 AM
To: Tomcat Users List
Subject: RE: Error in DBCP Connection Pool with tomcat 6.x

Thanks everyone !!

Managed to solve the issue. It seems the wait time out for db was less than 
that of configured in tomcat.

Which was leading to close the connection before tomcat does it.
 
Regards,
Vijendra


-Original Message-
From: Phil Steitz [mailto:phil.ste...@gmail.com]
Sent: 02 July 2014 22:33
To: Tomcat Users List
Subject: Re: Error in DBCP Connection Pool with tomcat 6.x

On 7/1/14, 10:48 PM, Vijendra Pachoriya wrote:
 Hi Filip,

 This error comes at some point of time on production, when the server is on 
 load.

 I am using hibernate and not closing any connection manually, its all managed 
 by hibernate and tomcat dbcp connection pool.

Two additional things to check:

1) Check logs to see if abandoned connections are being removed.  If your code 
is closing all connections, you should not need this to be enabled.
2) Make sure that there is no sharing across threads of the Hibernate objects.

Phil

 For me it seems like DBCP is trying to close the connection which is already 
 closed by the database server.

 Please refer below related links.

 https://issues.apache.org/jira/browse/DBCP-329

 http://markmail.org/message/c2gx2xuzum4pv743#query:+page:1+mid:ncvixx4
 ewe7pho2x+state:results


 Regards,
 Vijendra

 -Original Message-
 From: Filip Hanik [mailto:fi...@hanik.com]
 Sent: 01 July 2014 21:06
 To: Tomcat Users List
 Subject: Re: Error in DBCP Connection Pool with tomcat 6.x

 Looks like your code already called java.sql.Connection.close() and 
 then attempts to use the connection again

 Filip



 On Tue, Jul 1, 2014 at 8:09 AM, Propes, Barry L 
 barry.l.pro...@citi.com
 wrote:


 -Original Message-
 From: Vijendra Pachoriya [mailto:vijendra.pachor...@indegene.com]
 Sent: Tuesday, July 01, 2014 2:31 AM
 To: users@tomcat.apache.org
 Cc: Alok Roy
 Subject: Error in DBCP Connection Pool with tomcat 6.x

 Hi Tomcat Team,

 Please help me out in solving below error.

 Below is the details :

 Configuration in my
 context.xml


 Resource name=jdbc/ABC
 auth=Container
 type=javax.sql.DataSource
 maxActive=50
 maxIdle=10
 maxWait=1
 username=ABC
 password=ABC
 removeAbandoned=true
 logAbandoned=true
 testOnBorrow=true
 testWhileIdle=true
 timeBetweenEvictionRunsMillis=3
 validationQuery=SELECT 1 FROM dual
 driverClassName=oracle.jdbc.driver.OracleDriver
 url=jdbc:oracle:thin:@MY_DB /


 ==Error Message 
 

 at
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
 at
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
 at java.lang.Thread.run(Thread.java:679)
 Caused by: org.springframework.transaction.TransactionSystemException:
 Could not roll back JPA transaction; nested exception is
 javax.persistence.PersistenceException: unexpected error when rollbacking
 at
 org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:486)
 at
 org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800)
 at
 org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)
 at
 org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339)
 at
 org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at
 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 at sun.proxy.$Proxy185.selectPharmaUser(Unknown Source)
 at
 com.aptilon.axcelrx.server.service.impl.AuthenticationServiceImpl.login(AuthenticationServiceImpl.java:170)
 at
 com.aptilon.axcelrx.server.ws.endpoint.AuthenticationEndpoint.login_aroundBody0(AuthenticationEndpoint.java:110)
 ... 45 more
 Caused by: javax.persistence.PersistenceException: unexpected error 
 when rollbacking
 at
 org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:88)
 at
 org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:482)
 ... 54 more
 Caused by: org.hibernate.exception.GenericJDBCException: Cannot 
 release connection

RE: Error in DBCP Connection Pool with tomcat 6.x

2014-07-01 Thread Propes, Barry L


-Original Message-
From: Vijendra Pachoriya [mailto:vijendra.pachor...@indegene.com] 
Sent: Tuesday, July 01, 2014 2:31 AM
To: users@tomcat.apache.org
Cc: Alok Roy
Subject: Error in DBCP Connection Pool with tomcat 6.x

Hi Tomcat Team,

Please help me out in solving below error.

Below is the details :

Configuration in my context.xml


Resource name=jdbc/ABC
auth=Container
type=javax.sql.DataSource
maxActive=50
maxIdle=10
maxWait=1
username=ABC
password=ABC
removeAbandoned=true
logAbandoned=true
testOnBorrow=true
testWhileIdle=true
timeBetweenEvictionRunsMillis=3
validationQuery=SELECT 1 FROM dual
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@MY_DB /


==Error Message 


at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
    at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    at java.lang.Thread.run(Thread.java:679)
Caused by: org.springframework.transaction.TransactionSystemException: Could 
not roll back JPA transaction; nested exception is 
javax.persistence.PersistenceException: unexpected error when rollbacking
    at 
org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:486)
    at 
org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800)
    at 
org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)
    at 
org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339)
    at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at sun.proxy.$Proxy185.selectPharmaUser(Unknown Source)
    at 
com.aptilon.axcelrx.server.service.impl.AuthenticationServiceImpl.login(AuthenticationServiceImpl.java:170)
    at 
com.aptilon.axcelrx.server.ws.endpoint.AuthenticationEndpoint.login_aroundBody0(AuthenticationEndpoint.java:110)
    ... 45 more
Caused by: javax.persistence.PersistenceException: unexpected error when 
rollbacking
    at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:88)
    at 
org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:482)
    ... 54 more
Caused by: org.hibernate.exception.GenericJDBCException: Cannot release 
connection
    at 
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    at 
org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:478)
    at 
org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429)
    at 
org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:316)
    at 
org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:248)
    at 
org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:208)
    at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:85)
    ... 55 more
Caused by: java.sql.SQLException: Already closed.
    at 
org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114)
    at 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
    at 
org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97)
    at 
org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)
    ... 60 more


===

Your help in this regard is highly appreciated.


Thanks  Regards,
Vijendra


---
I've also got these attributes in my xml file, FWIW.

name=jdbc/myoracle
timeBetweenEvictionRunsMillis=-1   (you show 3) - I think I had to move 
it to this to avoid some faulty issue, per Konstantin
minEvictableIdleTimeMillis=28800
removeAbandonedTimeout=300
logAbandoned=false


I say this, because I, too, was 

RE: SQLNestedException in Connection Pooling With Tomcat 7.0.39

2014-04-04 Thread Propes, Barry L


-Original Message-
From: Saurabh Saraswat [mailto:ssaras...@pivotalindia.com] 
Sent: Friday, April 04, 2014 7:23 AM
To: Tomcat Users List
Subject: Re: SQLNestedException in Connection Pooling With Tomcat 7.0.39

Dear Dan,

Thanks for your response!

I have cross checked the user / password configuration. All is correct. As i 
mentioned that initially i am getting the object of connection but after some 
time (After few hits to database from application) my web app goes to slow and 
than it stops working i i got the below exception-
*org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool 
error Timeout waiting for idle object*

I searched for this and find that reason is maxWait ms then i set it to
-1 i think which tends to unlimited time. Still i am facing the same problem.

Can you please let me know what others reason can cause this exception.


*Best Regards,*

*Saurabh Sarasvat*

---

FWIW, I also have these attributes in my context.xml file, below or in addition 
to what you have, Saurabh.

maxIdle=30
maxWait=1
maxActive=10
testOnBorrow=true
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false/



 -
 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



Connection pooling issue on Tomcat

2014-03-28 Thread Propes, Barry L
Hi folks,

I'm using Tomcat 6.0.29 for an app I've had in place for years. I run the Java 
app I have on a Windows 2003 server for my production region, but have local 
builds on both my desktop and laptop, both of which are Windows XP Pro. Yes, I 
do realize that the Tomcat version is old, but we'll be retiring the app in a 
few months so there's no need (at this time) to upgrade it.

I use connection pooling, specifically Tomcat's DBCP class.

This app has worked for years, but is suddenly encountering a strange 
connection error and issue to the PROD region only of Oracle 11.
This just started in the last week. I'll include the contents of my context XML 
file and the errors that it's generating.

Even stranger, my development build to the Oracle UAT region works just fine! 
These content.xml files are virtually the same, except one references the 
Oracle PROD region, and the other references the Oracle UAT region. The 
Resource name attributes vary really only slightly, one called myoracle, the 
other called myoracledev.

Context
  Resource
auth=Container
description=changectrlapp
name=jdbc/myoracle
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
username=username
password=password
   url=jdbc:oracle:thin:@servername.dom.net:1648:SVCNAME
maxIdle=30
maxWait=1
maxActive=20
testOnBorrow=true
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false/

The errors I am getting are:

javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or 
shutdown in progress



org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in 
progress


java.sql.SQLRecoverableException: ORA-01033: ORACLE initialization or shutdown 
in progress



This may not be much to go on.

But like I said, with attributes only slightly different, the connection to UAT 
works. By the way, I am connecting successfully to the Oracle PROD DB through 
other avenues: TOAD,SQL Plus, MS Access, etc.



So the DB itself is working.


Both my DEV/UAT and PROD regions use the same DBCP classes. Could something 
have gotten corrupted for one and not the other?

Any feedback is welcomed. Let me know, please, if I neglected to add anything 
pertinent to this.



RE: Connection pooling issue on Tomcat

2014-03-28 Thread Propes, Barry L


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Friday, March 28, 2014 11:13 AM
To: Tomcat Users List
Subject: Re: Connection pooling issue on Tomcat

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Barry,

On 3/28/14, 11:58 AM, Propes, Barry L wrote:
 Hi folks,
 
 I'm using Tomcat 6.0.29 for an app I've had in place for years. I run 
 the Java app I have on a Windows 2003 server for my production region, 
 but have local builds on both my desktop and laptop, both of which are 
 Windows XP Pro. Yes, I do realize that the Tomcat version is old, but 
 we'll be retiring the app in a few months so there's no need (at this 
 time) to upgrade it.
 
 
 The errors I am getting are:
 
 javax.servlet.ServletException:
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFactory (ORA-01033: ORACLE initialization or 
 shutdown in progress
 
 
 
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFactory (ORA-01033: ORACLE initialization or 
 shutdown in progress
 
 
 java.sql.SQLRecoverableException: ORA-01033: ORACLE initialization or 
 shutdown in progress
 
 
 
 This may not be much to go on.
 
 But like I said, with attributes only slightly different, the 
 connection to UAT works. By the way, I am connecting successfully to 
 the Oracle PROD DB through other avenues: TOAD,SQL Plus, MS Access, 
 etc.
 
 
 
 So the DB itself is working.
 
 
 Both my DEV/UAT and PROD regions use the same DBCP classes. Could 
 something have gotten corrupted for one and not the other?
 
 Any feedback is welcomed. Let me know, please, if I neglected to add 
 anything pertinent to this.

Have you been able to connect with any type of Java-based client?
Perhaps the driver is convinced something is wrong when everything is fine?

I suspect that this is not Tomcat or DBCP-related.

- -chris

---
Chris, I got it solved. It was Tomcat related, but my fault.

When stopping and starting the app through the manager console, the conf app 
xml file in question was not getting overwritten. I had to delete it and get 
the changes I made recreated.
It then worked. Oddly, I had made changes to both my dev environments - laptop 
and desktop -- but I discovered it right AFTER I posted this! Ugh!

Thanks!

Consider this closed. 


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



RE: Connection pooling issue on Tomcat

2014-03-28 Thread Propes, Barry L


-Original Message-
From: Mark Shifman [mailto:mark.shif...@yale.edu] 
Sent: Friday, March 28, 2014 12:34 PM
To: Tomcat Users List
Subject: Re: Connection pooling issue on Tomcat


On 03/28/2014 11:58 AM, Propes, Barry L wrote:
 Hi folks,

 I'm using Tomcat 6.0.29 for an app I've had in place for years. I run the 
 Java app I have on a Windows 2003 server for my production region, but have 
 local builds on both my desktop and laptop, both of which are Windows XP Pro. 
 Yes, I do realize that the Tomcat version is old, but we'll be retiring the 
 app in a few months so there's no need (at this time) to upgrade it.

 I use connection pooling, specifically Tomcat's DBCP class.

 This app has worked for years, but is suddenly encountering a strange 
 connection error and issue to the PROD region only of Oracle 11.
 This just started in the last week. I'll include the contents of my context 
 XML file and the errors that it's generating.

 Even stranger, my development build to the Oracle UAT region works just fine! 
 These content.xml files are virtually the same, except one references the 
 Oracle PROD region, and the other references the Oracle UAT region. The 
 Resource name attributes vary really only slightly, one called myoracle, the 
 other called myoracledev.

 Context
Resource
  auth=Container
  description=changectrlapp
  name=jdbc/myoracle
  type=javax.sql.DataSource
  driverClassName=oracle.jdbc.driver.OracleDriver
  username=username
  password=password
 url=jdbc:oracle:thin:@servername.dom.net:1648:SVCNAME
  maxIdle=30
  maxWait=1
  maxActive=20
  testOnBorrow=true
  timeBetweenEvictionRunsMillis=-1
  minEvictableIdleTimeMillis=28800
  poolPreparedStatements=true
  removeAbandoned=true
  removeAbandonedTimeout=300
  logAbandoned=false/

 The errors I am getting are:

 javax.servlet.ServletException: 
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFactory (ORA-01033: ORACLE initialization or 
 shutdown in progress



 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFactory (ORA-01033: ORACLE initialization or 
 shutdown in progress


 java.sql.SQLRecoverableException: ORA-01033: ORACLE initialization or 
 shutdown in progress
For   what its  worth,   I recently got this error which looks like it is an 
ORACLE issue rather than connection pool issue.
When I talked to our db administrator, they were doing some sort of maintenance 
on oracle at exactly the same time I got the error.

mas



 This may not be much to go on.

 But like I said, with attributes only slightly different, the connection to 
 UAT works. By the way, I am connecting successfully to the Oracle PROD DB 
 through other avenues: TOAD,SQL Plus, MS Access, etc.



 So the DB itself is working.


 Both my DEV/UAT and PROD regions use the same DBCP classes. Could something 
 have gotten corrupted for one and not the other?

 Any feedback is welcomed. Let me know, please, if I neglected to add anything 
 pertinent to this.



--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
mark.shif...@yale.edu
=
Thanks, Mark, I got it figured out.

I had changed it a couple of weeks back to point to our COB region, which is up 
only during a specified time, and didn't realize I hadn't changed it back. But 
I also thought that stopping and starting the app in the manager console would 
overwrite the app xml file in the conf folder, and that didn't happen.
I checked it there and discovered the problem.

Thanks, though.

Barry


-
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: What if my database is unavailable at startup?

2013-12-23 Thread Propes, Barry L

-Original Message-
From: Tomcat Random [mailto:tomcat.ran...@gmail.com] 
Sent: Monday, December 23, 2013 2:56 PM
To: Tomcat Users List
Subject: Re: What if my database is unavailable at startup?

Barry,

You have testOnBorrow=true without a validation query. That means the line is 
useless. Or as the docs say:* NOTE - for a true value to have any effect, the 
validationQuery parameter must be set to a non-null string*

Best,
Alec


On Mon, Dec 16, 2013 at 10:07 AM, Propes, Barry L
barry.l.pro...@citi.comwrote:



 -Original Message-
 From: Howard W. Smith, Jr. [mailto:smithh032...@gmail.com]
 Sent: Friday, December 13, 2013 4:23 PM
 To: Tomcat Users List
 Subject: Re: What if my database is unavailable at startup?

 OP,

 On Fri, Dec 13, 2013 at 2:24 PM, Dames, Kristopher J  
 kristopher.da...@mercy.net wrote:

  I use tomcat 6 and have noticed if a database is not available when 
  tomcat starts, tomcat will not try to connect once the database 
  becomes
 available.
  Tomcat must be restarted to establish the database connection. What 
  are best practices regarding this? Is there a way in tomcat to get 
  it to automatically retry so I don't have to restart tomcat? I use 
  DBCP but am willing to try some other pool.


 Barry,

 On Fri, Dec 13, 2013 at 4:59 PM, Propes, Barry L 
 barry.l.pro...@citi.com
 wrote:

  I use DBCP and Oracle as well, and am also on Tomcat 6 - 6.0.26. 
  Take a look at mine, as I have NO trouble with it, and see if you 
  can configure it similarly with success. NOTE - remove those other 
  two parameters that Jose mentions in a prior email.
 
Resource
  auth=Container
  description=mytomcatapp
  name=jdbc/myoracle
  type=javax.sql.DataSource
  driverClassName=oracle.jdbc.driver.OracleDriver
  username=username
  password=password
  url=jdbc:oracle:thin:@cgnrdb1p:1648:SERVNAME
  maxIdle=30
  maxWait=1
  maxActive=10
  testOnBorrow=true
  timeBetweenEvictionRunsMillis=-1
  minEvictableIdleTimeMillis=28800
  poolPreparedStatements=true
  removeAbandoned=true
  removeAbandonedTimeout=300
  logAbandoned=false/
 

 are you suggesting that your (or a correct(ed)) Resource will solve 
 the problem stated in OP (above)?

 can/should we assume that your URL is referencing a database on a 
 different machine, same network/intranet/LAN?

   url=jdbc:oracle:thin:@x.y.com:1521:x

 it seems as though OP is referencing a database somewhere on the 
 'internet'.

 --

 Oh ok. Yes, mine is on the same network, through an intranet. 
 Different machine, but same network. If that helps.




OK, thanks for the heads up. I'll remove that attribute as I really don't need 
it.





 -
 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: Modify content in META-INF/context.xml

2013-12-17 Thread Propes, Barry L


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Tuesday, December 17, 2013 5:27 AM
To: Tomcat Users List
Subject: Re: Modify content in META-INF/context.xml

On 17/12/2013 11:16, Jose María Zaragoza wrote:
 2013/12/17 André Warnier a...@ice-sa.com:
 Hi.
 Without having any idea really of the precise mechanism behind 
 database connections, I can still imagine that with the possibility 
 of pooled connections to said database(s), it may be difficult to 
 detect such a change in the corresponding context.xml and apply them 
 on the fly. Even more so if such connections could be shared between 
 different applications.
 
 
 Thanks, but I didn't said that I neeed to apply changes on the fly.
 Indeed, I said Restart the web application is not a problem
 
 I only wan't to have to redeploy the web application to modify 
 META-INF/context.xml and apply changes.

How do you feel about a Tomcat upgrade?

Automatic deployment has had a bit of an overhaul in Tomcat 8 and those changes 
have been back-ported to 7.0.x for the next release. The behaviour in a number 
of edge cases is now clearly defined:
http://ci.apache.org/projects/tomcat/tomcat8/docs/config/automatic-deployment.html

In your case, you'd want to deploy as a WAR with unpackWARs set to true.
Then, any time you edit the META-INF/context.xml in the unpacked directory the 
web application will be redeployed using the new context.xml

This might work with 6 but I can't remember (it is a long time since I looked 
at the 6.0.x automatic deployment code).

Mark
-


I'm on 6.0.26 and have this setting in my conf/server.xml file.

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


I was thinking it handled this kind of thing, but I may be wrong. 

-
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: What if my database is unavailable at startup?

2013-12-16 Thread Propes, Barry L


-Original Message-
From: Howard W. Smith, Jr. [mailto:smithh032...@gmail.com] 
Sent: Friday, December 13, 2013 4:23 PM
To: Tomcat Users List
Subject: Re: What if my database is unavailable at startup?

OP,

On Fri, Dec 13, 2013 at 2:24 PM, Dames, Kristopher J  
kristopher.da...@mercy.net wrote:

 I use tomcat 6 and have noticed if a database is not available when 
 tomcat starts, tomcat will not try to connect once the database becomes 
 available.
 Tomcat must be restarted to establish the database connection. What 
 are best practices regarding this? Is there a way in tomcat to get it 
 to automatically retry so I don't have to restart tomcat? I use DBCP 
 but am willing to try some other pool.


Barry,

On Fri, Dec 13, 2013 at 4:59 PM, Propes, Barry L barry.l.pro...@citi.comwrote:

 I use DBCP and Oracle as well, and am also on Tomcat 6 - 6.0.26. Take 
 a look at mine, as I have NO trouble with it, and see if you can 
 configure it similarly with success. NOTE - remove those other two 
 parameters that Jose mentions in a prior email.

   Resource
 auth=Container
 description=mytomcatapp
 name=jdbc/myoracle
 type=javax.sql.DataSource
 driverClassName=oracle.jdbc.driver.OracleDriver
 username=username
 password=password
 url=jdbc:oracle:thin:@cgnrdb1p:1648:SERVNAME
 maxIdle=30
 maxWait=1
 maxActive=10
 testOnBorrow=true
 timeBetweenEvictionRunsMillis=-1
 minEvictableIdleTimeMillis=28800
 poolPreparedStatements=true
 removeAbandoned=true
 removeAbandonedTimeout=300
 logAbandoned=false/


are you suggesting that your (or a correct(ed)) Resource will solve the 
problem stated in OP (above)?

can/should we assume that your URL is referencing a database on a different 
machine, same network/intranet/LAN?

  url=jdbc:oracle:thin:@x.y.com:1521:x

it seems as though OP is referencing a database somewhere on the 'internet'.

--

Oh ok. Yes, mine is on the same network, through an intranet. Different 
machine, but same network. If that helps.





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



RE: What if my database is unavailable at startup?

2013-12-13 Thread Propes, Barry L
I've never heard of these or seen these attributes either. What are they for?

-Original Message-
From: Jose María Zaragoza [mailto:demablo...@gmail.com] 
Sent: Friday, December 13, 2013 2:10 PM
To: Tomcat Users List
Subject: Re: What if my database is unavailable at startup?

With testOnBorrow=true ( I think that is the default value in Tomcat
6 ) + validationQuery=SELECT 1 FROM DUAL , that should work

I've never used

maxOpenPreparedStatements=0
accessToUnderlyingConnectionAllowed=false

what are they for ?




-
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: What if my database is unavailable at startup?

2013-12-13 Thread Propes, Barry L


-Original Message-
From: Dames, Kristopher J [mailto:kristopher.da...@mercy.net] 
Sent: Friday, December 13, 2013 1:39 PM
To: Tomcat Users List
Subject: RE: What if my database is unavailable at startup?

Daniel,

I use tomcat 6.0.32. Here is an example Resource tag:

Resource 
accessToUnderlyingConnectionAllowed=false
auth=Container
defaultAutoCommit=true
defaultReadOnly=false 
defaultSchema=x
driverClassName=oracle.jdbc.driver.OracleDriver
factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
initialSize=0 
logAbandoned=false 
maxActive=20
maxIdle=8 
maxOpenPreparedStatements=0 
maxWait=5000
minEvictableIdleTimeMillis=180 
minIdle=5
name=jdbc/x 
numTestsPerEvictionRun=3
password=x 
poolPreparedStatements=false
removeAbandoned=true 
removeAbandonedTimeout=300
testOnBorrow=true 
testOnReturn=false
testWhileIdle=true 
timeBetweenEvictionRunsMillis=180
type=javax.sql.DataSource
url=jdbc:oracle:thin:@x.y.com:1521:x
username=x
validationQuery=SELECT 1 FROM DUAL
/


I use DBCP and Oracle as well, and am also on Tomcat 6 - 6.0.26. Take a look at 
mine, as I have NO trouble with it, and see if you can configure it similarly 
with success. NOTE - remove those other two parameters that Jose mentions in a 
prior email.

  Resource
auth=Container
description=mytomcatapp
name=jdbc/myoracle
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
username=username
password=password
url=jdbc:oracle:thin:@cgnrdb1p:1648:SERVNAME
maxIdle=30
maxWait=1
maxActive=10
testOnBorrow=true
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false/





This email contains information which may be PROPRIETARY IN NATURE OR OTHERWISE 
PROTECTED BY LAW FROM DISCLOSURE and is intended only for the use of the 
addresses(s) named above.  If you have received this email in error, please 
contact the sender immediately.

-
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: What if my database is unavailable at startup?

2013-12-13 Thread Propes, Barry L


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, December 13, 2013 3:59 PM
To: Tomcat Users List
Subject: RE: What if my database is unavailable at startup?

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com] 
 Subject: RE: What if my database is unavailable at startup?

 I've never heard of these or seen these attributes either. What are they for?

 maxOpenPreparedStatements=0
 accessToUnderlyingConnectionAllowed=false

You could look in the doc:
http://commons.apache.org/proper/commons-dbcp/configuration.html

 - Chuck


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




Good enough. Although I'm not the one experiencing the problem. Mine works 
quite well without those two.

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



RE: Connection to ApacheDS LDAP

2013-11-04 Thread Propes, Barry L


-Original Message-
From: Daniel Mikusa [mailto:dmik...@gopivotal.com] 
Sent: Monday, November 04, 2013 9:57 AM
To: Tomcat Users List
Subject: Re: Connection to ApacheDS LDAP

On Nov 4, 2013, at 10:49 AM, Shai Levit redsolar_ecli...@msn.com wrote:

 My apologies in advance for some of the syntax and verbiage - I am a newbie 
 in all of this, but did do my reading / research / and chat on IRC's.
 
 The current setup I have is this:
 Apache DS LDAP version 2.0.0-M14 running on Linux with Port 8660. The 
 server instance works fine and I am able to do a search via Apache API in 
 Java (Eclipse). I bind to this server anonymously via connection.bind() 
 Tomcat  version 7.0.47 running on Mac OS X (Maverick) with Port 8080. The 
 Tomcat instance work fine using the installed default values. I am able to 
 run simple REST API and consume them via any browser.
 
 Issue: I am trying to create a connection to the LDAP server via anonymous 
 binding. I configured the appropriate conf file: server.xml with the REALM as 
 follows:
 
   Realm className=org.apache.catalina.realm.JNDIRealm
   connectionURL=ldap://Integration01.icsl.net:8660; 
 debug=99
   userBase=dc=sumsmail,dc=com
   userSearch=(mail{0})
   userSearch=(userCertificate{0})

Why do you have userSearch specified twice?  That's what's causing the 
exception below.

   userSubtree=true
   roleBase=dc=sumsmail,dc=com
   roleName=cn
   roleSearch=(mail={0})
   roleSearch=(userCertificate={0})

This will likely cause a similar exception, you can only specify these 
attributes one.

Dan

   roleSubtree=true
   /
  /Realm
 
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
 


Not that I'm particularly knowledgeable about configuring LDAP, because I'm not 
but looking at the error I wondered what Dan did - why did you have the 
userSearch attribute listed twice? You also have the roleSearch attribute 
listed twice, though it might not show that error since it spits up at the 
first one.

-
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: Question about usernames being case insensitive

2013-08-27 Thread Propes, Barry L
-Original Message-
From: Daniel Mikusa [mailto:dmik...@gopivotal.com] 
Sent: Tuesday, August 27, 2013 2:22 PM
To: Tomcat Users List
Subject: Re: Question about usernames being case insensitive

On Aug 27, 2013, at 2:52 PM, Michael Spring spr...@pitt.edu wrote:

 I have observed using tomcat 7.027 and 6.026 an issue with BASIC 
 authentication.
 My intent was to have both user names and passwords be case sensitive. 
 I know of nothing
 I did that would change that.  The database table is plain vanilla. 
 Passwords are case sensitive,
 but upper or lower case usernames work.  Is there any way to prevent this? 
 
 Operating systems are windows 7 and windows Server 2008R2 both 64 bit.
 

Have you checked to see if your database is causing this behavior?  Perhaps 
connect directly to the DB and issue the same queries that Tomcat would issue.  
Then check to see if those are case insensitive.

Dan

---

This was my guess as well. Would you have some kind of procedure in the DB that 
forces upper or lower to the username value?

-
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: Question about usernames being case insensitive

2013-08-27 Thread Propes, Barry L


-Original Message-
From: Michael Spring [mailto:spr...@pitt.edu] 
Sent: Tuesday, August 27, 2013 2:35 PM
To: Tomcat Users List
Subject: Re: Question about usernames being case insensitive

All three responses are exactly right.  I checked my script and assumed
-- and we know what happens when you do that -- that since I had made no 
specification for case insensitive that it would be case sensitive.  It wasn't. 
 I will go see why MYSQL is doing that and make the change there.  Thank you 
every so much. 
Teaches me to make sure I check all the possibilities before I start pointing a 
finger in teh wrong direction.  Love those features!

With best wishes,

Michael



I could be wrong here, and am not trying to digress from the topic, but I was 
thinking Oracle and MySQL both came with the default set to being 
case-sensitive.
Not sure, but I thought so. Not sure about DB2, PostgreSQL or others. I thought 
SQL Server's default might be tweaked to being case-insensitive by default.
But since you're using MYSQL that last part really isn't too applicable, unless 
MySQL is also configured that way.




 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: Internal Servlet Error

2013-05-14 Thread Propes, Barry L
Sorry, I must have missed that they had an updated JDk.

 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, May 14, 2013 11:33 AM
To: Tomcat Users List
Subject: Re: Internal Servlet Error

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Barry,

On 5/13/13 1:02 PM, Propes, Barry L wrote:
 Yeah, it's clear from what's typed below his DB driver is way out of 
 whack with this ancient version of Tomcat.
 
 It probably got updated along the way by network sorts while the 
 Tomcat version stayed put.

No, it's probably correct for that time period.

 Go to current, and with current Tomcat, also get a current JDK - I 
 imagine the one you have is ancient as well.

OP reports the Java version is jdk1.7.0_07 - probably 64-bit given the 64-bit 
Windows 7 OS in use.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRkmc0AAoJEBzwKT+lPKRYBOIQAK2gJcD3lCjMXqck9qxi9kjs
0jqpSf4j3Ti4Gl8IKnT+enjuKqEDd8dpB4CShY3qFRNJCbkhnmh9g8DDfCFaxpqV
BmG07nW4zFm76kbGCl/zipRBkSxPWtSpXl5p1x+7r0ud7QH3HKxPkJ75eOtMzlFU
SSHwII9fNy7g5WHrB30LVlsW8pkSn/AuacFjP3hr5/Wqx/T9YmOM7VTJgmc6eucq
ynT5le4bSl0b7vi8eBSB9ImRErdONPgamFyWn+BUMvBV/hNkljHMO6UzpUPU3/lz
XvC/mVsaNwi77DZ9V3xRO6113dY0rnnpES8n4cvfzICU2KTzF/uesZWksye491q+
QJmVnKsM4UUaNBIvSbvJBy22PwYF0SeldTg2HiSmFoKMqw5mneYLy3g9xptfVX6+
d+2sHOj1OfIDb+7bstV5F2LUgk/JuowGps/b4gYA/0DmsRwYjKw9kxUWc75Vehs3
Dv429FO/CeAyN1Cv28N7heszF15M5RbYxNh3Mj605yGFpSpGSBgmzCuyb8jMw5L0
cujXEWh+1H4EXxh9hfM5rU1dLzhK5kwSUsV4uCGMmT8rcqCBZYXYbeLpeLhP7IKz
zS+8TOMGLRXiaPrsVBAIPln1ajUMV/jIwJV0fdZtNQIEK8FrZnWulmC9SdwWuxO0
xU6dMgZJlxz2CHoScO3N
=nQBy
-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: Internal Servlet Error

2013-05-13 Thread Propes, Barry L
Yeah, it's clear from what's typed below his DB driver is way out of whack with 
this ancient version of Tomcat.

It probably got updated along the way by network sorts while the Tomcat version 
stayed put.

Go to current, and with current Tomcat, also get a current JDK - I imagine the 
one you have is ancient as well.

 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, May 13, 2013 11:16 AM
To: Tomcat Users List
Subject: Re: Internal Servlet Error

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeny,

On 5/13/13 2:52 AM, Jeny V wrote:
 I'm having some real issues , running programs in Tomcat on my 
 machine.
 
 I just copied a jakarta folder named jakarta-tomcat-3.3.1a on to my 
 D: drive (Path : D:\Program Files\jakarta-tomcat-3.3.1a) .

I'm going to go ahead and echo the few responses you're already gotten so far 
and tell you that you really need to discard that version of Tomcat. I don't 
care if you have an application that works on it (obviously in some other 
environment) and are afraid to upgrade. That version is so old, we don't even 
have the documentation online anymore for how many unfixed security 
vulnerabilities may or may not be present in that version.

The Java Servlet Specification is nominally backward-compatible, so you should 
be able to download the latest version of Tomcat, configure it properly, and 
run your webapp without too many problems.

 I can run simple jsp programs with no database connection. But 
 whenever I try to execute programs with database connections, 
 following error encounters:
 
 Error: 500
 
 
 Internal Servlet Error:
 
 javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] The 
 specified DSN contains an architecture mismatch between the Driver and 
 Application at [...]

The error is obvious from this message, but if you don't recognize the 
important words (architecture mismatch) then you could be lost.

The problem is that you are using a 32-bit ODBC driver on a 64-bit JVM (or 
maybe a 64-bit ODBC driver on a 32-bit JVM: you didn't specify what kind of JVM 
you were using, though I suspect you have a 64-bit JVM and a hideously old 
driver that you've been lugging-around with your Tomcat 3 install). You need to 
take one of the following actions:

1. Install a 32-bit JVM and use that. This will solve the architecture mismatch 
by switching the JVM. This may have an impact on your webapp (mostly a smaller 
maximum heap size) so you may not want to do this.

2. Install a 32-bit version of your ODBC driver and use that. This will solve 
the architecture mismatch by switching the driver. You may not be able to find 
a compatible 64-bit driver so you may not be able to do this.

3. Discard your ODBC driver entirely and use a pure-Java JDBC driver.
Pretty much every database has one of these things available one way or 
another. This avoids the architecture mismatch entirely and it will likely 
result in better performance and stability of your web application. I highly 
recommend that you take this course of action.

What database are you using?

 Please do reply or help me with this problem as I tried so many times 
 to fix the problem by trying various solutions.

In the future, it would be best to let everyone know what solutions you have 
tried and what the results were (other than just it didn't work).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRkRG6AAoJEBzwKT+lPKRYaaoQAJyFeYHGRmZomqFan7W2jdHv
u7TZwFKlLAfkMfJaQQibprnuLZpW4flC5gdM0Rbj14EtfDauEMCSfe++oo6YlvqQ
F0Mih9ReRt7wSxVLNG58hUqcM6Hg3evEtwWoq9yd5I9YHYdl8Cz0X035/tdUHOUz
2RKBqQbFKr3A8m1k6Q6IYjsRKvPFDwyu0ekRYMrvSdtFZkiYPvzzwW1FpXdQ0Rwh
mHmVPrZzoIjiVXLWzT+kfFfrdrK6yBopieYZvOufEei88ZRvaI6u5LrXEpN6GEhX
DNkFoDWjPYXuKdQS+JBdwFX16DIKl7nIqI5nZ2sZthjPVqK64+r26R5tp+WEX5rp
ADkKyb6iGnwpAxy6l4LBGdanpDug0hC2beeOUtmcQkujJoychlvvF5L69VGpeEU1
JSQR0bQJGJIF9rP/PyAjBLzAUSI9sqh8IUZ+Bm+JrpAgiAWNSmKzeCW2te5r/GcF
Nt5ZpKBqMC2UHPNMRxKjIfuGc0gTApX467tVQ5zaouNbWO/lSOMrhZCgF8SD/OcF
fiQGrfeCDirHKIR6sczu3r07fGShTNCA47svAFV3/K31ou5dZT6SM3IvVqo2ZXog
whHWIXLxGl9SZrJToAJYcjlR2nRSb/yKygiE9Z2csgt34fUj9vQmWFo93ueph+j1
p8A0RhUfe4Kx6KzJ5lmP
=LZlk
-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: Tomcat 7.0.33 manager - 403 Access Denied

2013-04-23 Thread Propes, Barry L
I'm not sure if it's applicable here, but I'll let you know my prior experience 
with this kind of thing on Tomcat 6.0.xx.

I've had to stop the manager app, clear out the work folder and I think maybe 
even delete the manager.xml file out of the conf\Catalina\localhost dir because 
it wasn't getting overwritten.

Not sure if this is happening to you or not. 

-Original Message-
From: Shanti Suresh [mailto:sha...@umich.edu] 
Sent: Tuesday, April 23, 2013 3:20 PM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.33 manager - 403 Access Denied

Hi Jakub,

Thank you for the suggestions.  Appreciate the thoughts.

On Tue, Apr 23, 2013 at 3:33 PM, Jakub 1983 jjaku...@gmail.com wrote:

 try to comment out RemoteAddrValve,
 and check if the error still exists

Yes, I had tried that.  It didn't work.


 have you added role rolename=manager-jmx/ into users.xml ?
 add role rolename=manager-gui/ and try with web page, what is the 
 error ?


Good idea.  Adding a manager-jmx role entry didn't make a difference.
And, yes, I am able to access /manager/html/.  I logged in at the prompt.


 have you tried with bare
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/ - without sha ?

 Passwords work fine.  So SHA is not the issue.




 for me, starting with pure downloaded latest tomcat 7, following 
 configuration enables html manager:
   role rolename=tomcat/
role rolename=manager-gui/
role rolename=admin/
   user username=tomcat password=tomcat
 roles=tomcat,manager-gui,admin/

 HTML manager works for me too.


 download new tomcat,

Yes, I may have to do that.


 check if above conf  works for you, than add manager-jmx, check with 
 jmx and than add RemoteAddrValve, check, and than add sha.


The funny thing is that I gather the JMX metrics in an identical manner on 
Tomcat 7.0.23 and JDK 1.6 on several  other RedHat Linux servers.

Thanks for letting me brainstorm.

-Shanti

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



RE: Question on servlet determination

2013-04-23 Thread Propes, Barry L
I'm tempted to say no.

Because you might be adding a / in front of your servlet mapping.

In other words, changing the path of the folder slightly, with a different 
relative path.


From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
Sent: Tuesday, April 23, 2013 2:29 PM
To: 'Tomcat Users List'
Subject: Question on servlet determination

Running Tomcat 6.0.36, JDK 1.6.0_43

I've an application defined with the following web.xml:

web-app
  security-constraint
web-resource-collection
  web-resource-nameEverything/web-resource-name
  url-pattern*.jsp/url-pattern
  url-pattern*.html/url-pattern
  url-pattern*.js/url-pattern
  url-pattern/Servlet1/url-pattern
  url-pattern/Servlet2/url-pattern
/web-resource-collection
user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
  /security-constraint
  resource-ref
descriptionOracle Universal Connection Pool/description
res-ref-namejdbc/oracleUCPPool/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
  servlet
servlet-nameServlet1/servlet-name
display-nameServlet1/display-name
descriptionControlling servlet for Servlet1/description
servlet-classcom.polydyne.servlet1/servlet-class
load-on-startup1/load-on-startup
  /servlet
  servlet
servlet-nameServlet2/servlet-name
display-nameServlet2/display-name
descriptionControlling servlet for Servlet2/description
servlet-classcom.polydyne.servlet2/servlet-class
load-on-startup1/load-on-startup
  /servlet
  servlet-mapping
servlet-nameServlet1/servlet-name
url-pattern/Servlet1/url-pattern
  /servlet-mapping
  servlet-mapping
servlet-nameServlet2/servlet-name
url-pattern/Servlet2/url-pattern
  /servlet-mapping
  error-page
 error-code404/error-code
 location/Unavailable.jsp/location
  /error-page
/webapp

The issue:  If I connect with the URL: http://myhost/Servlet1 (or Servlet2), I 
get what I expect.  However, if I connect http://myhost/Servlet1/ then I get a 
404.  Actually, I get my 404 page but not all the graphics come over.

Shouldn't the final / be stripped and I get the same behavior either way?

Also willing to entertain critiques on my security-constraint section, but not 
that we don't use Tomcat authentication, so I want any requests for top-level 
files in the Web directory to also force https.

Jeffrey Janner
Sr. Network Administrator
jeffrey.jan...@polydyne.commailto:first.l...@polydyne.com
PolyDyne Software Inc.
Main:   512.343.9100
Direct:  512.583.8930

 [cid:image002.png@01CC0FB7.4FF43CE0]

Speed, Intelligence  Savings in Sourcing



RE: Question on servlet determination

2013-04-23 Thread Propes, Barry L
Is that right? I didn't realize that.

I was about to ask if you had any reference / before any of the welcome 
files. Although I'm not sure the XML file would even allow that would it?
I don't think I've tried it. Maybe it would. 

-Original Message-
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
Sent: Tuesday, April 23, 2013 4:46 PM
To: 'Tomcat Users List'
Subject: RE: Question on servlet determination

 -Original Message-
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Sent: Tuesday, April 23, 2013 4:34 PM
 To: 'Tomcat Users List'
 Subject: RE: Question on servlet determination
 
 I'm tempted to say no.
 
 Because you might be adding a / in front of your servlet mapping.
 
 In other words, changing the path of the folder slightly, with a 
 different relative path.
 

I went back and read the servlet spec for 2.5, and according to it, Tomcat 
should be redirecting the URI ending /Servlet2 to /Servlet2/ and then 
applying welcome files (I do have some defined, just didn't include it below).  
Amazingly, this appears to be what happens.  However, if the ending / already 
exists, it doesn't just go looking for welcome files.
Jeff

 
 From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
 Sent: Tuesday, April 23, 2013 2:29 PM
 To: 'Tomcat Users List'
 Subject: Question on servlet determination
 
 Running Tomcat 6.0.36, JDK 1.6.0_43
 
 I've an application defined with the following web.xml:
 
 web-app
   security-constraint
 web-resource-collection
   web-resource-nameEverything/web-resource-name
   url-pattern*.jsp/url-pattern
   url-pattern*.html/url-pattern
   url-pattern*.js/url-pattern
   url-pattern/Servlet1/url-pattern
   url-pattern/Servlet2/url-pattern
 /web-resource-collection
 user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
   /security-constraint
   resource-ref
 descriptionOracle Universal Connection Pool/description
 res-ref-namejdbc/oracleUCPPool/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
   /resource-ref
   servlet
 servlet-nameServlet1/servlet-name
 display-nameServlet1/display-name
 descriptionControlling servlet for Servlet1/description
 servlet-classcom.polydyne.servlet1/servlet-class
 load-on-startup1/load-on-startup
   /servlet
   servlet
 servlet-nameServlet2/servlet-name
 display-nameServlet2/display-name
 descriptionControlling servlet for Servlet2/description
 servlet-classcom.polydyne.servlet2/servlet-class
 load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
 servlet-nameServlet1/servlet-name
 url-pattern/Servlet1/url-pattern
   /servlet-mapping
   servlet-mapping
 servlet-nameServlet2/servlet-name
 url-pattern/Servlet2/url-pattern
   /servlet-mapping
   error-page
  error-code404/error-code
  location/Unavailable.jsp/location
   /error-page
 /webapp
 
 The issue:  If I connect with the URL: http://myhost/Servlet1 (or 
 Servlet2), I get what I expect.  However, if I connect 
 http://myhost/Servlet1/ then I get a 404.  Actually, I get my 404 page 
 but not all the graphics come over.
 
 Shouldn't the final / be stripped and I get the same behavior either 
 way?
 
 Also willing to entertain critiques on my security-constraint section, 
 but not that we don't use Tomcat authentication, so I want any 
 requests for top-level files in the Web directory to also force https.
 
 Jeffrey Janner
 Sr. Network Administrator
 jeffrey.jan...@polydyne.commailto:first.l...@polydyne.com
 PolyDyne Software Inc.
 Main:   512.343.9100
 Direct:  512.583.8930
 
  [cid:image002.png@01CC0FB7.4FF43CE0]
 
 Speed, Intelligence  Savings in Sourcing



-
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: security-role-ref doesn't work

2013-04-19 Thread Propes, Barry L
What version are you using?

 Mine doesn't contain this attribute pair at all...

security-role-ref 
/security-role-ref

-Original Message-
From: Jakub 1983 [mailto:jjaku...@gmail.com] 
Sent: Thursday, April 18, 2013 8:51 PM
To: Tomcat Users List
Subject: security-role-ref doesn't work

my tomcat users:
  role rolename=tomcat/
  role rolename=role1/
   role rolename=manager-gui/
   role rolename=admin/
  user username=tomcat password=tomcat
roles=tomcat,manager-gui,admin/
  user username=both password=tomcat roles=tomcat,role1/
  user username=role1 password=tomcat roles=role1/

following code fails:
security-constraint
web-resource-collection
web-resource-nameSample Application/web-resource-name
descriptionRequire users to authenticate/description
url-pattern*.jsp/url-pattern
http-methodPOST/http-method
http-methodGET/http-method
/web-resource-collection
auth-constraint
role-nameadminLocal/role-name
/auth-constraint
user-data-constraint
transport-guaranteeNONE/transport-guarantee
/user-data-constraint
/security-constraint
security-role
role-nameadminLocal/role-name
/security-role
security-role-ref
role-nameadmin/role-name
role-linkadminLocal/role-link
/security-role-ref

if I change security-role.role-name to admin, and in auth-constraint.role-name 
also to admin, than I can login,

but why doesnt' it work with security-role-ref  ?

regards
Jakub

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



RE: Tomcat7 - ajax and connection pool : connection closed despite the use of validationQuery and testOnBorrow

2013-04-08 Thread Propes, Barry L
OK, thank you, Jose!

Good to know if I ever go the MySQL route. 

-Original Message-
From: Jose María Zaragoza [mailto:demablo...@gmail.com] 
Sent: Friday, April 05, 2013 5:07 PM
To: Tomcat Users List
Subject: Re: Tomcat7 - ajax and connection pool : connection closed despite 
the use of validationQuery and testOnBorrow

And that's right . You can define any SQL , but you prefer the easiest ( and 
fastest )

Indeed , you could use SELECT 1 FROM DUAL in MySQL, but it's not required by 
using FROM DUAL From MySQL doc

DUAL is purely for the convenience of people who require that all SELECT 
statements should have FROM and possibly other clauses. MySQL may ignore the 
clauses. MySQL does not require FROM DUAL if no tables are referenced.

I think that Oracle requires FROM word in queries ( I think )









2013/4/5 Propes, Barry L barry.l.pro...@citi.com

 Ok, thanks for clarification. I thought it had to be from some faux 
 table or object.


 -Original Message-
 From: Jose María Zaragoza [mailto:demablo...@gmail.com]
 Sent: Friday, April 05, 2013 3:44 PM
 To: Tomcat Users List
 Subject: Re: Tomcat7 - ajax and connection pool : connection closed
 despite the use of validationQuery and testOnBorrow

 'select 1 from dual' works in Oracle DB

 In MySQL, select 1


 2013/4/5 Propes, Barry L barry.l.pro...@citi.com

   I could be wrong, but is that validationQuery attribute correct?
 
  SELECT 1  ? - I have validationQuery=select 1 from dual in mine, 
  and my doc states it has to be a valid SQL statement returning at 
  least
 one row.
 
  That may not factor in at all, just noticed it. Looked maybe out of
 kilter.
 
  -Original Message-
  From: Jean-Claude Haw-King-Chon 
  [mailto:jchaw-king-c...@medifirst.fr]
  Sent: Friday, April 05, 2013 10:38 AM
  To: Tomcat Users List
  Subject: Re: Tomcat7 - ajax and connection pool : connection closed
  despite the use of validationQuery and testOnBorrow
 
  ..
 
  My configuration :
 
  Resource
   name=jdbc/607
   auth=Container
   type=javax.sql.DataSource
   username=x
   password=x
   driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://localhost:3306/X
   removeAbandoned=true
   removeAbandonedTimeout=300
   testOnBorrow=true
   validationQuery=SELECT 1
   logAbandoned=true
  /
  Tomcat 7.0.29
  Linux Fedora Core 12
 
 
 
  
  - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
  
  - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 

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



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



RE: Tomcat7 - ajax and connection pool : connection closed despite the use of validationQuery and testOnBorrow

2013-04-05 Thread Propes, Barry L
 I could be wrong, but is that validationQuery attribute correct?

SELECT 1  ? - I have validationQuery=select 1 from dual in mine, and my doc 
states it has to be a valid SQL statement returning at least one row.

That may not factor in at all, just noticed it. Looked maybe out of kilter.

-Original Message-
From: Jean-Claude Haw-King-Chon [mailto:jchaw-king-c...@medifirst.fr] 
Sent: Friday, April 05, 2013 10:38 AM
To: Tomcat Users List
Subject: Re: Tomcat7 - ajax and connection pool : connection closed despite 
the use of validationQuery and testOnBorrow

..

My configuration :

Resource
 name=jdbc/607
 auth=Container
 type=javax.sql.DataSource
 username=x
 password=x
 driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/X
 removeAbandoned=true
 removeAbandonedTimeout=300
 testOnBorrow=true
 validationQuery=SELECT 1
 logAbandoned=true
/
Tomcat 7.0.29
Linux Fedora Core 12



-
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: Tomcat7 - ajax and connection pool : connection closed despite the use of validationQuery and testOnBorrow

2013-04-05 Thread Propes, Barry L
Ok, thanks for clarification. I thought it had to be from some faux table or 
object.
 

-Original Message-
From: Jose María Zaragoza [mailto:demablo...@gmail.com] 
Sent: Friday, April 05, 2013 3:44 PM
To: Tomcat Users List
Subject: Re: Tomcat7 - ajax and connection pool : connection closed despite 
the use of validationQuery and testOnBorrow

'select 1 from dual' works in Oracle DB

In MySQL, select 1


2013/4/5 Propes, Barry L barry.l.pro...@citi.com

  I could be wrong, but is that validationQuery attribute correct?

 SELECT 1  ? - I have validationQuery=select 1 from dual in mine, 
 and my doc states it has to be a valid SQL statement returning at least one 
 row.

 That may not factor in at all, just noticed it. Looked maybe out of kilter.

 -Original Message-
 From: Jean-Claude Haw-King-Chon [mailto:jchaw-king-c...@medifirst.fr]
 Sent: Friday, April 05, 2013 10:38 AM
 To: Tomcat Users List
 Subject: Re: Tomcat7 - ajax and connection pool : connection closed
 despite the use of validationQuery and testOnBorrow

 ..

 My configuration :

 Resource
  name=jdbc/607
  auth=Container
  type=javax.sql.DataSource
  username=x
  password=x
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/X
  removeAbandoned=true
  removeAbandonedTimeout=300
  testOnBorrow=true
  validationQuery=SELECT 1
  logAbandoned=true
 /
 Tomcat 7.0.29
 Linux Fedora Core 12



 -
 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: JNDI setup oracle 11 g

2013-01-10 Thread Propes, Barry L
Tony,

I have a similar standalone Java app that hits Oracle 11g.

At your line with the DBURL, I have something much more concise.

Where you have
public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = 
(PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT = 1521)) (CONNECT_DATA 
= (SERVER = DEDICATED) (SERVICE_NAME = SAMPLE.WORLD) )  );


I simply have:
 String dbURL = jdbc:oracle:thin:@dbservername.1526:servicename;

I set the rest of that string in my tnsnames.ora file - not sure if you're 
unable to do this or not. I'd think you'd do it there.

Could that be where the error is stemming from?

The rest of it looks correct to me.



-Original Message-
From: tsidhu [mailto:tsidh...@yahoo.com]
Sent: Thursday, January 10, 2013 9:52 AM
To: users@tomcat.apache.org
Subject: JNDI setup oracle 11 g

Hello,

I am able to connect to my database from a stand alone java program, however 
the same connection information throws an exception when used via JNDI.

My stand alone app:

import java.sql.* ;  // for standard JDBC programs

public class TestCon {
public static final String DBDRIVER = oracle.jdbc.OracleDriver ;
public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION = 
(ADDRESS = (PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT = 1521)) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SAMPLE.WORLD) )  );
public static final String DBUSER = user1 ;
public static final String DBPASS = pass1 ;
/**
 * @param args
 */
public static void main(String[] args) {

Connection conn = null ;// DB CONNECTIONS
PreparedStatement pstmt = null ;//  DB  OPERATIONS
ResultSet rs = null ;   //  save the query result

try {
Class.forName(DBDRIVER) ;

conn = DriverManager.getConnection(DBURL,DBUSER,DBPASS) 
;
String sql = select abc from xyz ;   //sample query
Statement stmt = conn.createStatement() ;   // execute 
the query and save
the result
rs = stmt.executeQuery(sql);

rs.close();
stmt.close();
conn.close();

} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}   // Load the ORACLE DRIVER
catch(SQLException sql)
 {
// TODO Auto-generated catch block
sql.printStackTrace();
}
}
}

MY JNDI / Context.xml configuration

Resource name=jdbc/myoracle auth=Container
  type=javax.sql.DataSource
description=Oracle Datasource
driverClassName=oracle.jdbc.OracleDriver

url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abc-def-scan.corp.xyz.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SAMPLE.WORLD)))
username=user1 password=pass1 maxActive=20 maxIdle=10 maxWait=-1
validationQuery = SELECT 1 FROM DUAL /

The error I get when trying to run the following code from a servlet:

try {
Context initContext = new InitialContext();
Context envContext = (Context) 
initContext.lookup(java:/comp/env);
DataSource ds = (DataSource) 
envContext.lookup(jdbc/myoracle);
Connection conn = ds.getConnection();

conn.close();
conn = null;
}

ERROR

Jan 10, 2013 10:47:25 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1249 ms
java.sql.SQLSyntaxErrorException: ORA-00911: invalid character

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
at
oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:
873)
at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStateme
nt.java:1167)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1289)
at
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.ja
va:1909)
at
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871)

at
oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrap
per.java:318)
at
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingSta

RE: add database resource

2013-01-10 Thread Propes, Barry L
Did you remove the contents from the server.xml? Or just paste the same 
contents to the META-INF/context.xml file?

You might want to add the contents of the context.xml file to the thread 
message.

-Original Message-
From: Leon [mailto:leon.m...@hccnet.nl]
Sent: Thursday, January 10, 2013 11:53 AM
To: Tomcat Users List
Subject: Re: add database resource

Unfortunately still same error

Regards,

Léon

Op 10 jan. 2013 om 04:29 heeft Christopher Schultz 
ch...@christopherschultz.net het volgende geschreven:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Leon,

 On 1/9/13 5:37 PM, leon.m...@hccnet.nl wrote:
 Op Wo, 9 januari, 2013 10:37 pm schreef Christopher Schultz: Tried to
 creat a context.xml in META-INF/context.xml, however, not sure about
 the full conten.

 Are you able to provide met a contect.xml with example code, where i
 can adjust variables? ould help a lot!

 Just take your Context element out of server.xml and put the whole
 thing into META-INF/context.xml.

 I know nothing about Hibernate, but you may have to post your
 Hibernate configuration in order to get any further, here.

 If needed not a problem, but hopefully a correct context.xml will do

 A proper context.xml is unlikely to have any bearing on your problem.
 I'm just trying to get other noise out of the way.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with undefined - http://www.enigmail.net/

 iEYEAREIAAYFAlDuNZoACgkQ9CaO5/Lv0PBuQQCgiTgdJbzjtiJDKf8mIV/N7fo1
 Pj4AnjBp/2ZhkzFNUHjlcoF+gO+B+7cJ
 =i+2h
 -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: JNDI setup oracle 11 g

2013-01-10 Thread Propes, Barry L
I might add, Tony, one other thing I noticed in my JNDI config.

I'd removed the validationQuery attribute. It might have been regarding this, 
but I'd writtten a comment right below it that per Konstantin, there was a 
memory leak regarding the Eviction  Timer.

Try removing that attribute (validationQuery = SELECT 1 FROM DUAL) and 
running it -

Barry

-Original Message-
From: tsidhu [mailto:tsidh...@yahoo.com]
Sent: Thursday, January 10, 2013 9:52 AM
To: users@tomcat.apache.org
Subject: JNDI setup oracle 11 g

Hello,

I am able to connect to my database from a stand alone java program, however 
the same connection information throws an exception when used via JNDI.

My stand alone app:

import java.sql.* ;  // for standard JDBC programs

public class TestCon {
public static final String DBDRIVER = oracle.jdbc.OracleDriver ;
public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION = 
(ADDRESS = (PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT = 1521)) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SAMPLE.WORLD) )  );
public static final String DBUSER = user1 ;
public static final String DBPASS = pass1 ;
/**
 * @param args
 */
public static void main(String[] args) {

Connection conn = null ;// DB CONNECTIONS
PreparedStatement pstmt = null ;//  DB  OPERATIONS
ResultSet rs = null ;   //  save the query result

try {
Class.forName(DBDRIVER) ;

conn = DriverManager.getConnection(DBURL,DBUSER,DBPASS) 
;
String sql = select abc from xyz ;   //sample query
Statement stmt = conn.createStatement() ;   // execute 
the query and save
the result
rs = stmt.executeQuery(sql);

rs.close();
stmt.close();
conn.close();

} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}   // Load the ORACLE DRIVER
catch(SQLException sql)
 {
// TODO Auto-generated catch block
sql.printStackTrace();
}
}
}

MY JNDI / Context.xml configuration

Resource name=jdbc/myoracle auth=Container
  type=javax.sql.DataSource
description=Oracle Datasource
driverClassName=oracle.jdbc.OracleDriver

url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abc-def-scan.corp.xyz.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SAMPLE.WORLD)))
username=user1 password=pass1 maxActive=20 maxIdle=10 maxWait=-1
validationQuery = SELECT 1 FROM DUAL /

The error I get when trying to run the following code from a servlet:

try {
Context initContext = new InitialContext();
Context envContext = (Context) 
initContext.lookup(java:/comp/env);
DataSource ds = (DataSource) 
envContext.lookup(jdbc/myoracle);
Connection conn = ds.getConnection();

conn.close();
conn = null;
}

ERROR

Jan 10, 2013 10:47:25 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1249 ms
java.sql.SQLSyntaxErrorException: ORA-00911: invalid character

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
at
oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:
873)
at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStateme
nt.java:1167)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1289)
at
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.ja
va:1909)
at
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871)

at
oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrap
per.java:318)
at
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingSta
tement.java:264)
at
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingSta
tement.java:264)
at
com.xyz.collections.controller.TestConnection.doGet(TestConnection.ja
va:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at 

RE: add database resource

2013-01-10 Thread Propes, Barry L
Right! Like Chuck says, Leon, that is invalid. Within the context file itself 
(context.xml) you need the Resource attributes sandwiched between 
Content/Content  XML tags and no other attributes in the context tag itself.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, January 10, 2013 12:47 PM
To: Tomcat Users List
Subject: RE: add database resource

 From: leon.m...@hccnet.nl [mailto:leon.m...@hccnet.nl]
 Subject: RE: add database resource


 Herewith the content of META-INF/context.xml

 Context=/atvd

Well, that's invalid right off the bat, so the rest of it probably doesn't 
matter.  Read the Context doc again.

 - 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: JNDI setup oracle 11 g

2013-01-10 Thread Propes, Barry L
Hmmm. I didn't know that, I guess.

Well, I wonder if that long string requires some kind of escape character to be 
inserted in it?


-Original Message-
From: tsidhu [mailto:tsidh...@yahoo.com]
Sent: Thursday, January 10, 2013 1:22 PM
To: users@tomcat.apache.org
Subject: Re: JNDI setup oracle 11 g

Thanks Barry,

The reason for the long dburl string is that this is an Oracle RAC (Clustered 
database). My understanding is that the simple dburl cannot be used for RAC 
databases.

Also, I tried removing/adding the  validationQuery  from the context.xml, 
however that did not work either :(.

When I researched the ORA-00911 error, it typically is thrown when you haven an 
invalid character in the query. However I get this error when trying to get a 
connection via the JNDI reference to the pool.

The strange thing is that this works via a simple java program that directly 
uses the JDBC/Oracle driver.

I can work around the issue by not using JNDI in the web app, however I am not 
then able to use pooling I guess.

Tony



 From: Propes, Barry L [via Tomcat] ml-node+s10n4992228...@n6.nabble.com
To: tsidhu tsidh...@yahoo.com
Sent: Thursday, January 10, 2013 1:09 PM
Subject: RE: JNDI setup oracle 11 g


Tony,

I have a similar standalone Java app that hits Oracle 11g.

At your line with the DBURL, I have something much more concise.

Where you have
public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = 
(PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT = 1521)) (CONNECT_DATA 
= (SERVER = DEDICATED) (SERVICE_NAME = SAMPLE.WORLD) )  );


I simply have:
 String dbURL = jdbc:oracle:thin:@dbservername.1526:servicename;

I set the rest of that string in my tnsnames.ora file - not sure if you're 
unable to do this or not. I'd think you'd do it there.

Could that be where the error is stemming from?

The rest of it looks correct to me.



-Original Message-
From: tsidhu [mailto:[hidden email]]
Sent: Thursday, January 10, 2013 9:52 AM
To: [hidden email]
Subject: JNDI setup oracle 11 g

Hello,

I am able to connect to my database from a stand alone java program, however 
the same connection information throws an exception when used via JNDI.

My stand alone app:

import java.sql.* ;  // for standard JDBC programs

public class TestCon {
public static final String DBDRIVER = oracle.jdbc.OracleDriver ;
public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION = 
(ADDRESS = (PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT = 1521)) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SAMPLE.WORLD) )  );
public static final String DBUSER = user1 ;
public static final String DBPASS = pass1 ;
/**
 * @param args
 */
public static void main(String[] args) {

Connection conn = null ;// DB CONNECTIONS
PreparedStatement pstmt = null ;//  DB  OPERATIONS
ResultSet rs = null ;   //  save the query result

try {
Class.forName(DBDRIVER) ;

conn = DriverManager.getConnection(DBURL,DBUSER,DBPASS) 
;
String sql = select abc from xyz ;   //sample query
Statement stmt = conn.createStatement() ;   // execute 
the query and save
the result
rs = stmt.executeQuery(sql);

rs.close();
stmt.close();
conn.close();

} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}   // Load the ORACLE DRIVER
catch(SQLException sql)
 {
// TODO Auto-generated catch block
sql.printStackTrace();
}
}
}

MY JNDI / Context.xml configuration

Resource name=jdbc/myoracle auth=Container
  type=javax.sql.DataSource
description=Oracle Datasource
driverClassName=oracle.jdbc.OracleDriver

url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abc-def-scan.corp.xyz.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SAMPLE.WORLD)))
username=user1 password=pass1 maxActive=20 maxIdle=10 maxWait=-1
validationQuery = SELECT 1 FROM DUAL /

The error I get when trying to run the following code from a servlet:

try {
Context initContext = new InitialContext();
Context envContext = (Context) 
initContext.lookup(java:/comp/env);
DataSource ds = (DataSource) 
envContext.lookup(jdbc/myoracle);
Connection conn = ds.getConnection();

conn.close();
conn = null;
}

ERROR

Jan 10, 2013 10:47:25 AM

RE: add database resource

2013-01-10 Thread Propes, Barry L
YES! Duh! Forgive me! LOL.

Context!!

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, January 10, 2013 1:35 PM
To: Tomcat Users List
Subject: RE: add database resource

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: add database resource

 attributes sandwiched between Content/Content XML tags

Make that Context/Context...

 - 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: JNDI setup oracle 11 g

2013-01-10 Thread Propes, Barry L
I was going to ask this, too.

Which oracle jar are you using for this?


-Original Message-
From: Marco de Booij [mailto:marco.develo...@debooy.eu]
Sent: Thursday, January 10, 2013 2:24 PM
To: users@tomcat.apache.org
Subject: Re: JNDI setup oracle 11 g

If you get an error when you provide a wrong username or password then the 
connection works. Also the ORA-00911 indicates to a connection with the 
database.

Oracle works through JNDI (I use JNDI with Weblogic) and through JDBC. I do not 
know why you say that the simple URL cannot be used for RAC databases. There 
is even a simpler way (I will check tomorrow at work) in which you only use the 
alias (no port or servername) but then you need to use the own Oracle JDBC 
drivers.

Perhaps here lies your problem. Do you use the right JDBC drivers with Tomcat? 
Oracle has multiple versions depending on your database version and even the 
JDK. Check their website.

Marco

Op 10-01-13 20:57, tsidhu schreef:
 So the string works in that it connects to the DB. I just get an error when I 
 try and use the connection.

 I tested by providing an invalid password, and I did get a password invalid 
 error from oracle in the stack trace.

 I think the issue is in the get connection call it must make some call to the 
 db, that oracle does not like when used via JNDI but works fine when used via 
 JDBC.

 Tony


 
   From: Propes, Barry L [via Tomcat]
 ml-node+s10n499223...@n6.nabble.com
 To: tsidhu tsidh...@yahoo.com
 Sent: Thursday, January 10, 2013 2:32 PM
 Subject: RE: JNDI setup oracle 11 g


 Hmmm. I didn't know that, I guess.

 Well, I wonder if that long string requires some kind of escape character to 
 be inserted in it?


 -Original Message-
 From: tsidhu [mailto:[hidden email]]
 Sent: Thursday, January 10, 2013 1:22 PM
 To: [hidden email]
 Subject: Re: JNDI setup oracle 11 g

 Thanks Barry,

 The reason for the long dburl string is that this is an Oracle RAC (Clustered 
 database). My understanding is that the simple dburl cannot be used for RAC 
 databases.

 Also, I tried removing/adding the  validationQuery  from the context.xml, 
 however that did not work either :(.

 When I researched the ORA-00911 error, it typically is thrown when you haven 
 an invalid character in the query. However I get this error when trying to 
 get a connection via the JNDI reference to the pool.

 The strange thing is that this works via a simple java program that directly 
 uses the JDBC/Oracle driver.

 I can work around the issue by not using JNDI in the web app, however I am 
 not then able to use pooling I guess.

 Tony


 
   From: Propes, Barry L [via Tomcat] [hidden email]
 To: tsidhu [hidden email]
 Sent: Thursday, January 10, 2013 1:09 PM
 Subject: RE: JNDI setup oracle 11 g


 Tony,

 I have a similar standalone Java app that hits Oracle 11g.

 At your line with the DBURL, I have something much more concise.

 Where you have
 public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT =
 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =
 SAMPLE.WORLD) )  );


 I simply have:
   String dbURL = jdbc:oracle:thin:@dbservername.1526:servicename;

 I set the rest of that string in my tnsnames.ora file - not sure if you're 
 unable to do this or not. I'd think you'd do it there.

 Could that be where the error is stemming from?

 The rest of it looks correct to me.

 -Original Message-
 From: tsidhu [mailto:[hidden email]]
 Sent: Thursday, January 10, 2013 9:52 AM
 To: [hidden email]
 Subject: JNDI setup oracle 11 g

 Hello,

 I am able to connect to my database from a stand alone java program, however 
 the same connection information throws an exception when used via JNDI.

 MY JNDI / Context.xml configuration

 Resource name=jdbc/myoracle auth=Container
type=javax.sql.DataSource
  description=Oracle Datasource
  driverClassName=oracle.jdbc.OracleDriver
 url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abc-def-scan.corp.xyz.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SAMPLE.WORLD)))
 username=user1 password=pass1 maxActive=20 maxIdle=10 maxWait=-1
  validationQuery = SELECT 1 FROM DUAL /

 The query runs fine when used in a stand alone java app, and I have tried all 
 things in the Context.XML to resolve.
 I know it connects fine to the DB, however the getConnection from the JNDI 
 datasource is causing that error to be thrown.

 Tony







-
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

RE: JNDI setup oracle 11 g

2013-01-10 Thread Propes, Barry L
And FWIW, Tony, I'm using this oracle jar.

ojdbc6.jar

-Original Message-
From: Marco de Booij [mailto:marco.develo...@debooy.eu]
Sent: Thursday, January 10, 2013 2:24 PM
To: users@tomcat.apache.org
Subject: Re: JNDI setup oracle 11 g

If you get an error when you provide a wrong username or password then the 
connection works. Also the ORA-00911 indicates to a connection with the 
database.

Oracle works through JNDI (I use JNDI with Weblogic) and through JDBC. I do not 
know why you say that the simple URL cannot be used for RAC databases. There 
is even a simpler way (I will check tomorrow at work) in which you only use the 
alias (no port or servername) but then you need to use the own Oracle JDBC 
drivers.

Perhaps here lies your problem. Do you use the right JDBC drivers with Tomcat? 
Oracle has multiple versions depending on your database version and even the 
JDK. Check their website.

Marco

Op 10-01-13 20:57, tsidhu schreef:
 So the string works in that it connects to the DB. I just get an error when I 
 try and use the connection.

 I tested by providing an invalid password, and I did get a password invalid 
 error from oracle in the stack trace.

 I think the issue is in the get connection call it must make some call to the 
 db, that oracle does not like when used via JNDI but works fine when used via 
 JDBC.

 Tony


 
   From: Propes, Barry L [via Tomcat]
 ml-node+s10n499223...@n6.nabble.com
 To: tsidhu tsidh...@yahoo.com
 Sent: Thursday, January 10, 2013 2:32 PM
 Subject: RE: JNDI setup oracle 11 g


 Hmmm. I didn't know that, I guess.

 Well, I wonder if that long string requires some kind of escape character to 
 be inserted in it?


 -Original Message-
 From: tsidhu [mailto:[hidden email]]
 Sent: Thursday, January 10, 2013 1:22 PM
 To: [hidden email]
 Subject: Re: JNDI setup oracle 11 g

 Thanks Barry,

 The reason for the long dburl string is that this is an Oracle RAC (Clustered 
 database). My understanding is that the simple dburl cannot be used for RAC 
 databases.

 Also, I tried removing/adding the  validationQuery  from the context.xml, 
 however that did not work either :(.

 When I researched the ORA-00911 error, it typically is thrown when you haven 
 an invalid character in the query. However I get this error when trying to 
 get a connection via the JNDI reference to the pool.

 The strange thing is that this works via a simple java program that directly 
 uses the JDBC/Oracle driver.

 I can work around the issue by not using JNDI in the web app, however I am 
 not then able to use pooling I guess.

 Tony


 
   From: Propes, Barry L [via Tomcat] [hidden email]
 To: tsidhu [hidden email]
 Sent: Thursday, January 10, 2013 1:09 PM
 Subject: RE: JNDI setup oracle 11 g


 Tony,

 I have a similar standalone Java app that hits Oracle 11g.

 At your line with the DBURL, I have something much more concise.

 Where you have
 public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT =
 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =
 SAMPLE.WORLD) )  );


 I simply have:
   String dbURL = jdbc:oracle:thin:@dbservername.1526:servicename;

 I set the rest of that string in my tnsnames.ora file - not sure if you're 
 unable to do this or not. I'd think you'd do it there.

 Could that be where the error is stemming from?

 The rest of it looks correct to me.

 -Original Message-
 From: tsidhu [mailto:[hidden email]]
 Sent: Thursday, January 10, 2013 9:52 AM
 To: [hidden email]
 Subject: JNDI setup oracle 11 g

 Hello,

 I am able to connect to my database from a stand alone java program, however 
 the same connection information throws an exception when used via JNDI.

 MY JNDI / Context.xml configuration

 Resource name=jdbc/myoracle auth=Container
type=javax.sql.DataSource
  description=Oracle Datasource
  driverClassName=oracle.jdbc.OracleDriver
 url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abc-def-scan.corp.xyz.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SAMPLE.WORLD)))
 username=user1 password=pass1 maxActive=20 maxIdle=10 maxWait=-1
  validationQuery = SELECT 1 FROM DUAL /

 The query runs fine when used in a stand alone java app, and I have tried all 
 things in the Context.XML to resolve.
 I know it connects fine to the DB, however the getConnection from the JNDI 
 datasource is causing that error to be thrown.

 Tony







-
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: JNDI setup oracle 11 g

2013-01-10 Thread Propes, Barry L
Oh ok, very good!

-Original Message-
From: tsidhu [mailto:tsidh...@yahoo.com]
Sent: Thursday, January 10, 2013 3:20 PM
To: users@tomcat.apache.org
Subject: Re: JNDI setup oracle 11 g



Thank you all for the help. I manged to resolve it.

It was actually human error :(. I was initially deploying the Oracle JAR file 
via Eclipse, and then switched to put it in the containers lib directory.

Well Eclipse thought I was still trying to deploy the Oracle JAR which was nio 
longer in the path and it basically broke the build. Every time I exported the 
classed were not being compiled, instead it included the previously built 
classes.

Once I removed the export of the Oracle Jar from Eclipse, the code worked fine.

Thanks again for help.

Tony


 From: Propes, Barry L [via Tomcat] ml-node+s10n4992246...@n6.nabble.com
To: tsidhu tsidh...@yahoo.com
Sent: Thursday, January 10, 2013 3:36 PM
Subject: RE: JNDI setup oracle 11 g


And FWIW, Tony, I'm using this oracle jar.

ojdbc6.jar

-Original Message-
From: Marco de Booij [mailto:[hidden email]]
Sent: Thursday, January 10, 2013 2:24 PM
To: [hidden email]
Subject: Re: JNDI setup oracle 11 g

If you get an error when you provide a wrong username or password then the 
connection works. Also the ORA-00911 indicates to a connection with the 
database.

Oracle works through JNDI (I use JNDI with Weblogic) and through JDBC. I do not 
know why you say that the simple URL cannot be used for RAC databases. There 
is even a simpler way (I will check tomorrow at work) in which you only use the 
alias (no port or servername) but then you need to use the own Oracle JDBC 
drivers.

Perhaps here lies your problem. Do you use the right JDBC drivers with Tomcat? 
Oracle has multiple versions depending on your database version and even the 
JDK. Check their website.

Marco

Op 10-01-13 20:57, tsidhu schreef:

 So the string works in that it connects to the DB. I just get an error when I 
 try and use the connection.

 I tested by providing an invalid password, and I did get a password invalid 
 error from oracle in the stack trace.

 I think the issue is in the get connection call it must make some call to the 
 db, that oracle does not like when used via JNDI but works fine when used via 
 JDBC.

 Tony


 
   From: Propes, Barry L [via Tomcat]
 [hidden email]
 To: tsidhu [hidden email]
 Sent: Thursday, January 10, 2013 2:32 PM
 Subject: RE: JNDI setup oracle 11 g


 Hmmm. I didn't know that, I guess.

 Well, I wonder if that long string requires some kind of escape character to 
 be inserted in it?


 -Original Message-
 From: tsidhu [mailto:[hidden email]]
 Sent: Thursday, January 10, 2013 1:22 PM
 To: [hidden email]
 Subject: Re: JNDI setup oracle 11 g

 Thanks Barry,

 The reason for the long dburl string is that this is an Oracle RAC (Clustered 
 database). My understanding is that the simple dburl cannot be used for RAC 
 databases.

 Also, I tried removing/adding the  validationQuery  from the context.xml, 
 however that did not work either :(.

 When I researched the ORA-00911 error, it typically is thrown when you haven 
 an invalid character in the query. However I get this error when trying to 
 get a connection via the JNDI reference to the pool.

 The strange thing is that this works via a simple java program that directly 
 uses the JDBC/Oracle driver.

 I can work around the issue by not using JNDI in the web app, however I am 
 not then able to use pooling I guess.

 Tony


 
   From: Propes, Barry L [via Tomcat] [hidden email]
 To: tsidhu [hidden email]
 Sent: Thursday, January 10, 2013 1:09 PM
 Subject: RE: JNDI setup oracle 11 g


 Tony,

 I have a similar standalone Java app that hits Oracle 11g.

 At your line with the DBURL, I have something much more concise.

 Where you have
 public static final String DBURL = jdbc:oracle:thin:@(DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = abc-def-scan.corp.xyz.com)(PORT =
 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =
 SAMPLE.WORLD) )  );


 I simply have:
   String dbURL = jdbc:oracle:thin:@dbservername.1526:servicename;

 I set the rest of that string in my tnsnames.ora file - not sure if you're 
 unable to do this or not. I'd think you'd do it there.

 Could that be where the error is stemming from?

 The rest of it looks correct to me.

 -Original Message-
 From: tsidhu [mailto:[hidden email]]
 Sent: Thursday, January 10, 2013 9:52 AM
 To: [hidden email]
 Subject: JNDI setup oracle 11 g

 Hello,

 I am able to connect to my database from a stand alone java program, however 
 the same connection information throws an exception when used via JNDI.

 MY JNDI / Context.xml configuration

 Resource name=jdbc/myoracle auth=Container
type=javax.sql.DataSource
  description=Oracle Datasource
  driverClassName=oracle.jdbc.OracleDriver
 url

RE: DB Connection Pool

2012-11-21 Thread Propes, Barry L
I use 6.0.29, and there was a setting I had to change to keep some connections 
from hanging or timing out.

Although I use Tomcat's DBCP, and not OracleDataSource.

I think it was this first line here.

 timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false

If you can go back to DBCP, check that...and why did you need to cast to 
Oracle's connection?

-Original Message-
From: Daniel Mikusa [mailto:dmik...@vmware.com]
Sent: Wednesday, November 21, 2012 9:11 AM
To: Tomcat Users List
Subject: Re: DB Connection Pool

On Nov 21, 2012, at 9:45 AM, Milan Tomic wrote:



 That's a really old version, you should strongly consider upgrading to the 
 latest Tomcat 6.0.x or 7.0.x release.
 My SSO (old JOSSO version) works only with 6.0.18.

 How are you determining this? Are you looking at open connections from your 
 database?  Are you looking at JMX stats for the connection pool?
 I'm using JavaMelody monitoring system.

Can you verify this through your database?  Perhaps the monitoring tool is not 
showing the correct information?


 These don't really seem to be indicating any sort of problem.  The first 
 looks like it is reading data from a socket, the second is simply waiting 
 for something to do.
 Yes, but why there are 50 open old (some almost a month) DB connections (and 
 still raising) on low traffic app?

This sounds like an application issue.  Check to make sure it is not storing 
connections retrieved from the connection pool and check to make sure that you 
are properly closing connection (i.e. correctly using try..catch..finally).

If possible, maybe run FindBugs.  That's a good way to catch errors like these.

 That is strange. There should be some parameter to auto close old 
 connections. I have tried tunning many parameters, but without success.

Can't really say with OracleDataSource.  With DBCP there is removeAbandoned / 
removeAbandonedTimeout / logAbandoned which can be used to reclaim 
connections that have been held by the application for too long.


 This looks fairly normal with the exception that you are using an 
 OracleDataSource.  Not sure how much this list will be able to help you if 
 the problem is with the connection pool.  You'd probably need to contact 
 Oracle.
 I was using DBCP, but I couldn't cast in my Java servlet code from DBCP to 
 OracleConnection once when I get DBCP datasource from JNDI 
 (getInnerConnection() also didn't helped), so I swithced from DBCP to 
 OracleDataSource.

The documentation for DBCP say to do this...

1.) Set  accessToUnderlyingConnectionAllowed to true (it defaults to false)

2.) Use this construct to get the connection.  Do NOT close the underlying 
connection, only the original one!

Connection conn = ds.getConnection();
Connection dconn = ((DelegatingConnection) conn).getInnermostDelegate();
...
conn.close()

https://commons.apache.org/dbcp/configuration.html

I have not done this though, so I cannot be sure it will work for you.

Dan




-
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: tomcat and DB oracle problem - only in higher versions

2012-08-17 Thread Propes, Barry L
 Yes, I believe you do. I had to change to that -- odbc6 -- upon moving to JDK 
1.6.

Which I swore I had or needed to do when moving from Tomcat 4.1.3, but maybe I 
don't recall that part correctly.

-Original Message-
From: Busfy,Peter [mailto:peter.bu...@drei.com]
Sent: Friday, August 17, 2012 2:11 AM
To: Tomcat Users List
Subject: RE: tomcat and DB oracle problem - only in higher versions

Hi Jeffrey,

actually we use ojdbc14.jar.  And it is version 10.2.0.2.0.
Maybe I should really try ojdbc6.jar because ojdbc4.jar is for jdk4.
I will try it and let you know.

Peter Busfy
3 Portal

Hutchison 3G Austria GmbH
Gasometer C
Guglgasse 12/10/3
1110 Vienna
Mobil: +43-660-7313346
mailto:peter.bu...@drei.com
http://www.drei.at


-Original Message-
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
Sent: Thursday, August 16, 2012 4:33 PM
To: 'Tomcat Users List'
Subject: RE: tomcat and DB oracle problem - only in higher versions

Peter -
I'm not a complete expert, but it appears to me that the error is saying it 
needs the Oracle JDBC drivers to do LOB work.
What is the version of ojdbc6.jar do you have in your classpath?
You really want the 11.2.0.3 version, particularly with that version of Java.
Jeff


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



RE: tomcat and DB oracle problem - only in higher versions

2012-08-16 Thread Propes, Barry L
Are the DBCP references different in these? In either the xml files or the jar 
itself?



-Original Message-
From: cjder...@gmail.com [mailto:cjder...@gmail.com] On Behalf Of chris derham
Sent: Thursday, August 16, 2012 9:59 AM
To: Tomcat Users List
Subject: Re: tomcat and DB oracle problem - only in higher versions


 I found following problem when java application is trying save xml
 data into xml column to database. 

 I found a problem with tomcat which is happening in the version 6.0.32
 and
 6.0.35 (maybe also in other version), but working really fine with
 version
 6.0.26.

 ** **

 My configuration:

 ** **

 OS: windows 7 enterprise

 IDE: Eclipse EE 3.7.1

 Java: 1.6.0_33

 Tomcat: 6.0.26, 6.0.32, 6.0.35

 DB: Oracle Database 11g Enterprise Edition 11.2.0.3.0

 Other technologies: Spring 3.1.1 + Hibernate 3 + Struts 1.1



Can you provide details of how you create your connection to the database?
Config file or code? This should shed some light on the issue. I recall that I 
hit this in the past, and it is to do with how the connection pool is setup. 
Perhaps with the details, it might ring some bells for me or somebody else.

Thanks

Chris

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



RE: JDBC Connection over VPN

2012-05-07 Thread Propes, Barry L
Could the VPN connection be utlizing the same port Tomcat or Oracle usually 
does? Like something at 8080?

Not sure if that's the case; or conversely, does going into VPN block those 
ports?


-Original Message-
From: Sanjeev Sharma [mailto:sanjeev.sha...@buchanan-edwards.com]
Sent: Monday, May 07, 2012 2:36 PM
To: Tomcat Users List
Subject: JDBC Connection over VPN

Hi,

Not sure if this is a Tomcat issue.  When I connect directly to a network and 
startup my tomcat 7, my JDBC connection to an Oracle 11g network works just 
fine, but if I tunnel into the same network, JDBC fails to connect to the 
database.  At the same time I'm able to make a connection to the same database 
using SQL Developer/SQL Plus.  My network people tell me that all ports are 
open to me and when they try to capture packets coming from me, they see 
nothing if I'm starting up my tomcat.  I'm not a Network or VPN expert, but as 
far as I know, at the application level it should behave just as if I'm 
connected directly to the network and shouldn't have to worry about which 
network adapter to use (built in or VPN), and shouldn't have to worry about 
routing.  I'm at a complete loss, so I'm just hoping there is magical tomcat 
setting which will fix my problem.  Any help would be appreciated .

Thanks.

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



RE: jdbc pool properties

2012-04-04 Thread Propes, Barry L
There are some databases that do go in and periodically kill off connections, 
aside from the Tomcat settings.

In addition to testOnBorrow=true, I also had two other attributes, but not sure 
if Tomcat 7.0 uses them or not, as I'm on 6.0.29.

testOnBorrow=true
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800



-Original Message-
From: Daniel Mikusa [mailto:dmik...@vmware.com]
Sent: Wednesday, April 04, 2012 7:46 AM
To: Tomcat Users List
Subject: Re: jdbc pool properties



- Original Message -
 My db connections seem to be lost after an extended period of
 inactivity

There could be a number of reasons that this occurs.  Perhaps a network issue 
is causing them to be disconnected or the database may be timing them out.  At 
any rate, it's not likely that the problem would be caused by the 
removeAbandoned / abandonedTimeout settings, unless you application is not 
properly returning connections to the connection pool.

  
https://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html#Preventing_database_connection_pool_leaks


 (for a web application).  And the only way to get the connections to
 work again is to restart tomcat.

 My tomcat.jdbc.pool.Datasource settings have:

  property name=maxActive value=100/
 property name=maxIdle value=30/
 property name=maxWait value=1000/
 property name=defaultAutoCommit value=true/
 property name=removeAbandoned value=true/
 property name=removeAbandonedTimeout value=60/


You probably want to add testOnBorrow=true and validationQuery=SELECT 1  
(or some other valid query for your DB).  See the following link for an 
explanation of those properties.

  https://commons.apache.org/dbcp/configuration.html

This will cause your connections to be validated prior to their use by your 
application.  Stale connections will be removed and replaced with new, working 
connections.


 Is it the removedAbonded and abandonedTimeout?  Does it mean after 60
 seconds, remove the connection from the pool?

No.  See either of the links I've referenced above for an explanation of these 
settings.


 I guess what I need is a minActive setting then?


There's no minActive setting.  You have minIdle, but I don't think that 
would help here.

Dan





-
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: Tomcat-DB Connection problem

2012-02-27 Thread Propes, Barry L
I run 6.0.26   and have a very similar configuration on my container setting.

I removed validationQuery=SELECT 1 FROM DUAL  from mine, although I'm running 
connection pooling on mine.

Are you attempting that at all with yours?

I also have this attribute in mine.

timeBetweenEvictionRunsMillis=-1

-Original Message-
From: Anjib Mulepati [mailto:anji...@hotmail.com]
Sent: Monday, February 27, 2012 9:28 AM
To: Tomcat Users List
Subject: Tomcat-DB Connection problem

Hi All,
I have DB and application in two different machine. My DB is Oracle Database 
11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production.
And my applciation is in Tomcat 6.0.20.
I have following in resource
Resource auth=Container
 driverClassName=oracle.jdbc.driver.OracleDriver
 maxActive=20
 maxIdle=10
 maxWait=1
 name=jdbc/myApp
 password=myPassword
 testOnBorrow=true
 type=javax.sql.DataSource
 url=jdbc:oracle:thin:@//localhost:4001/myDB
 username=myUser
 validationQuery=SELECT 1 FROM DUAL / My problem is every time I 
restart DB machine I have to restart the tomcat to get application running. I 
am getting error
 java.sql.SQLRecoverableException: No more data to read from socket






-
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 6.0.26 stopped logging

2012-02-13 Thread Propes, Barry L
Hello Tomcat users and developers.

I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of them, and 
Windows Server 2003 on the production machine.
Also using jdk1.6.0_18 and was on Ora10g, now 111g.

Today, Tomcat stopped logging on two of the machines, and my servlet that 
submits to the Oracle DB now fails.

Our IT group upgrade Oracle from 10g to 11g this weekend.

What is odd to me is that I use a Context object for connection on this 
servlet, as well as a few other JSPs.

The JSPs connect with no issue. The servlet fails. But either way, would this 
upgrade inhibit Tomcat from logging? That seems strange to me.

My Context object is as follows.

 Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup(java:comp/env);
   // Look up our data source
   DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);
   // Allocate and use a connection from the pool
   connection = ds.getConnection();

I'm inporting the following:

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;

FYI, this has worked for years prior to this upgrade.

But if anyone sees anyhing amiss out of this, please enlighten me.



RE: Tomcat 6.0.26 stopped logging

2012-02-13 Thread Propes, Barry L
Application log, yes...error log.

-Original Message-
From: Pid [mailto:p...@pidster.com]
Sent: Monday, February 13, 2012 2:37 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.26 stopped logging

On 13/02/2012 18:16, Propes, Barry L wrote:
 Hello Tomcat users and developers.

 I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of them, and 
 Windows Server 2003 on the production machine.
 Also using jdk1.6.0_18 and was on Ora10g, now 111g.

 Today, Tomcat stopped logging on two of the machines, and my servlet that 
 submits to the Oracle DB now fails.

Hi Barry,

I'm not quite clear on what the problem is.  What is logging and what about 
that is not working?  Application log? Server log?

Where is the database in this picture?


p

 Our IT group upgrade Oracle from 10g to 11g this weekend.

 What is odd to me is that I use a Context object for connection on this 
 servlet, as well as a few other JSPs.

 The JSPs connect with no issue. The servlet fails. But either way, would this 
 upgrade inhibit Tomcat from logging? That seems strange to me.

 My Context object is as follows.

  Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);
// Allocate and use a connection from the pool
connection = ds.getConnection();

 I'm inporting the following:

 import java.io.IOException;
 import java.io.PrintWriter;
 import java.sql.Connection;
 import java.sql.Date;
 import java.sql.DriverManager;
 import java.sql.CallableStatement;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;

 import javax.servlet.RequestDispatcher; import
 javax.servlet.ServletException; import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;

 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.sql.DataSource;

 FYI, this has worked for years prior to this upgrade.

 But if anyone sees anyhing amiss out of this, please enlighten me.




--

[key:62590808]


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



RE: Tomcat 6.0.26 stopped logging

2012-02-13 Thread Propes, Barry L
Well this was odd. To me.

I'm sure some of you will tell me about logging with Log4j or some other 
logger, or even the use of the Tomcat app manager.

My web.xml file got deleted. I thought, (probably wrongly) that Tomcat's web 
manager console would alert to such, but it didn't.

Took me a little bit to discover that the darn thing was missing entirely!

Ugh! Got that fixed, and many other ills like this logging thing resumed as 
they should!

It's ALL working again!

Thank you all!

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Monday, February 13, 2012 3:28 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.26 stopped logging

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 2/13/12 1:16 PM, Propes, Barry L wrote:
 I am using Tomcat 6.0.26 on a few machines - Win XP Pro on two of
 them, and Windows Server 2003 on the production machine. Also using
 jdk1.6.0_18 and was on Ora10g, now 111g.

That's quite an upgrade :)

 Today, Tomcat stopped logging on two of the machines, and my servlet
 that submits to the Oracle DB now fails.

Fails in what way? Is an exception thrown? If so, what is the stack trace (or 
the message if no stack trace is generated)?

 What is odd to me is that I use a Context object for connection on
 this servlet, as well as a few other JSPs.

 The JSPs connect with no issue. The servlet fails. But either way,
 would this upgrade inhibit Tomcat from logging? That seems strange to
 me.

Tomcat's logging should not have anything to do with the upgrade of your RDBMS. 
Did they upgrade anything else along with it?

 My Context object is as follows.

 Context initCtx = new InitialContext(); Context envCtx = (Context)
 initCtx.lookup(java:comp/env); // Look up our data source DataSource
 ds = (DataSource) envCtx.lookup(jdbc/myoracle); // Allocate and use
 a connection from the pool connection = ds.getConnection();

That looks fairly standard. Do you have the exact same code in both your JSPs 
(that work) and your servlets (that don't work)? Again, how do you know they 
don't work?

Is there anything in the logs (hah) that suggests anything is amiss at any 
point? Funny things start to happen after an OOME, for instance.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk85gHkACgkQ9CaO5/Lv0PBolwCbBSzTpTgfXCHEcc2g/ZV0vr8l
V68AoJB0vq32cuTvA4T9xlh/dmxyRzV3
=eTLa
-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: Tomcat 6.0.26 stopped logging

2012-02-13 Thread Propes, Barry L
Alright, thanks, Konstantin.

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: Monday, February 13, 2012 3:50 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.26 stopped logging

2012/2/14 Propes, Barry L barry.l.pro...@citi.com:
 Well this was odd. To me.

 I'm sure some of you will tell me about logging with Log4j or some other 
 logger, or even the use of the Tomcat app manager.

 My web.xml file got deleted. I thought, (probably wrongly) that Tomcat's web 
 manager console would alert to such, but it didn't.

 Took me a little bit to discover that the darn thing was missing entirely!

 Ugh! Got that fixed, and many other ills like this logging thing resumed as 
 they should!

 It's ALL working again!

 Thank you all!


FYI: a web application is valid even if there is no web.xml file.
E.g.: consider the case if you want to publish some static files.

The default conf/web.xml is used in this situation.

Best regards,
Konstantin Kolinko

-
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

2012-01-09 Thread Propes, Barry L
Are you getting any kind of error in the logs?


-Original Message-
From: Anjib Mulepati [mailto:anji...@hotmail.com] 
Sent: Monday, January 09, 2012 9:22 AM
To: Tomcat Users List
Subject: Re: DB Connection error

I did change my config.xml to

Context antiJARLocking=true path=/myApp
Resource auth=Container
 driverClassName=oracle.jdbc.driver.OracleDriver
 maxActive=20
 maxIdle=10
 maxWait=-1
 name=jdbc/myName
 password=myPassword
 testOnBorrow=true
 type=javax.sql.DataSource
 url=jdbc:oracle:thin:@//localhost:8080/MYDBS
 username=myUsername
 validationQuery=SELECT 1 FROM DUAL /
/Context

And this morning when DB restart I had to restart the tomcat to get 
connection. What can be other solutions?

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



RE: DB Connection error

2012-01-09 Thread Propes, Barry L
I think some Oracle desktop installations, like Oracle XE, come with 8080 as 
the out-of-the-box default port.


-Original Message-
From: Chema [mailto:demablo...@gmail.com] 
Sent: Monday, January 09, 2012 12:03 PM
To: Tomcat Users List
Subject: Re: DB Connection error

 Caused by: oracle.net.ns.NetException: The Network Adapter could not
 establish the connection
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:375)
    at
 oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:678)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:238)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1054)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)
    ... 30 more
 Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:209)
    at oracle.net.nt.ConnOption.connect(ConnOption.java:123)
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:353)
    ... 35 more


I see that database is on the same machine than Tomcat , right ?

It's important, for me at least ,  to know if this error

Caused by: java.net.ConnectException: Connection refused: connect

occurs while restarting database server or just after that ?

One question : after restarting database , can you make a telnet to
localhost:8080 from the same machine ?
By the way, 8080 is a curious port for a database ...is it the real
port for listening incoming connections ?

-
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

2012-01-09 Thread Propes, Barry L
Oh ok, thanks for the clarification.


-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Monday, January 09, 2012 1:51 PM
To: Tomcat Users List
Subject: Re: DB Connection error

2012/1/9 Propes, Barry L barry.l.pro...@citi.com:
 I think some Oracle desktop installations, like Oracle XE, come with 8080 as 
 the out-of-the-box default port.

AFAIK 8080 was used by Oracle XE for its web-based management console.
Using it as a database URL is something new. I'd expect 1521 there.

By the way, using infinite timeout on the pool (maxWait=-1) is a bad
option. I would recommend something more realistic.



 -Original Message-
 From: Chema [mailto:demablo...@gmail.com]
 Sent: Monday, January 09, 2012 12:03 PM
 To: Tomcat Users List
 Subject: Re: DB Connection error

 Caused by: oracle.net.ns.NetException: The Network Adapter could not
 establish the connection
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:375)
    at
 oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:678)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:238)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1054)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)
    ... 30 more
 Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:209)
    at oracle.net.nt.ConnOption.connect(ConnOption.java:123)
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:353)
    ... 35 more


 I see that database is on the same machine than Tomcat , right ?

 It's important, for me at least ,  to know if this error

 Caused by: java.net.ConnectException: Connection refused: connect

 occurs while restarting database server or just after that ?

 One question : after restarting database , can you make a telnet to
 localhost:8080 from the same machine ?
 By the way, 8080 is a curious port for a database ...is it the real
 port for listening incoming connections ?


-
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

2012-01-03 Thread Propes, Barry L
I also have the following attributes in mine, for what it's worth.

maxIdle=30
maxWait=1
maxActive=10
testOnBorrow=true
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false

-Original Message-
From: Daniel Mikusa [mailto:dmik...@vmware.com] 
Sent: Tuesday, January 03, 2012 1:10 PM
To: Tomcat Users List
Subject: Re: DB Connection error

On Tue, 2012-01-03 at 10:47 -0800, Chema wrote:
  But in my application I have context.xml with following
 
  Context antiJARLocking=true path=/myApp
  Resource auth=Container
 driverClassName=oracle.jdbc.driver.OracleDriver
 maxActive=20
 maxIdle=10
 maxWait=-1
 name=jdbc/myName
 password=myPassword
 type=javax.sql.DataSource
 url=jdbc:oracle:thin:@//localhost:8080/MYDBS
 username=myUsername
  /
  /Context
 
 Well, you can use validationQuery parameter with SELECT 1 FROM
 DUAL;. 

+1

Try adding validationQuery=SELECT 1 FROM DUAL and testOnBorrow=true.

When you restart the DB, it's going to disconnect all of the connections
in your pool.  If you add a validation query and one of the testOn*
options (testOnBorrow is my personal favorite) then the pool will catch
the bad connections, remove them and assuming your DB is back online,
create new ones.

Dan


RE: Cannot create JDBC driver tomcat-6.0.26

2011-11-14 Thread Propes, Barry L


And maybe use a different driver? Or ensure you have the correct one?

Okay, I'm going to ignore your first report, then, since this one seems more 
plausible.

 Caused by: java.lang.NullPointerException at
 sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
 at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
 at
 sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307) at
 java.sql.DriverManager.getDriver(DriverManager.java:253) at
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicData
 Source.java:1143)

...

-
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: ODBC jar files

2011-10-25 Thread Propes, Barry L
Thanks a bunch, Jeff!

This helps. I just downloaded ojdbc6.jar, but have been running  ojdbc14.jar, 
and it's still in the lib folder.

I did not take it out, but simply added the new ojdbc6.jar, to the lib, which 
from the sounds of things sounds like a bad idea (to add and have both in 
there).

I am running Tomcat 6.0.29. I'll try removing the other older ojdbc jar file 
and replace it with the newer one -  ojdbc6.jar.

I will go get the other documentation, too, Jeff!

Thanks for the tips!

Barry



-Original Message-
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
Sent: Tuesday, October 25, 2011 8:52 AM
To: 'Tomcat Users List'
Subject: RE: ODBC jar files

Barry -

I run an Oracle mixed environment and I can assure you that you will run into 
problems running ojdbc14.jar and connecting to your 11g database.  In 
particular, you will see some odd errors related to bind peek on the server 
side - but that is supposedly fixed in 11.2.0.2.  I can't say for sure as I 
haven't been able to schedule an upgrade, yet.  If you want to talk to 11g, you 
really should use the 11.2.0.2 ojdbc jar file.  You can get that directly from 
the Oracle website.

It should be mostly backwards compatible for connecting to 10g, but there are a 
few improvements that might come back to bite you.  In particular, they have 
added additional mappings to handle the Native Language string columns (NCHAR, 
NVARCHAR, etc.).  Before switching to that jar in your legacy app, you need to 
insure that it won't be a problem, or you may need to make some quick changes 
to the code.

Also, according to Oracle, make sure you grab the ojdbc file that matches the 
Java version you are running.  If your Tomcat runs under Java 5, you need the 
ojdbc5.jar.  The ojdbc6.jar is only for using with Java 6.  They are the same 
code, but compiled for those java versions, and I assume optimized for them.

If you don't know what version of the ojdbc file you have, you can always look 
it up.  Using your favorite unzip tool, extract the MANIFEST.MF file from the 
META-INF directory of the ojdbcx.jar file.  It's a simple text file and 
contains the release number of the jar file.

And while you're on the Oracle JDBC website, download the documentation that 
goes along with it.  Read it thoroughly and see what other changes they've made 
that might be useful and/or detrimental to your implementation.

Jeff

 -Original Message-
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Sent: Monday, October 24, 2011 3:36 PM
 To: Tomcat Users List
 Subject: RE: ODBC jar files

 Ok, thanks for that explanation. I'll test putting one in the WEB-
 INF/lib and see if I can connect to it that way. If so, I'll see where
 I need to go from there.


 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Thursday, October 20, 2011 4:14 PM
 To: Tomcat Users List
 Subject: RE: ODBC jar files

  From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
  Subject: RE: ODBC jar files

  I had web app A with a context file in its META-INF directory and
  web app B with a (different) context file in its META-INF directory.

 That's not related to the classloader being used here.  There's a
 separate one for Tomcat's lib directory, and that's the only one that
 sees the jars in that location.  You can put a JDBC jar in
 WEB-INF/lib, but then the webapp has to do its own DB connection pooling.

 - 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


__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


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

RE: ODBC jar files

2011-10-25 Thread Propes, Barry L
Yikes!

I'll fix that right away.

Thanks, Chris!

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, October 25, 2011 9:49 AM
To: Tomcat Users List
Subject: Re: ODBC jar files

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 10/25/2011 10:04 AM, Propes, Barry L wrote:
 I did not take it out, but simply added the new ojdbc6.jar, to the
 lib, which from the sounds of things sounds like a bad idea (to add
 and have both in there).

Yes, it is a bad idea. Classes will be loaded arbitrarily from one JAR or the 
other (but at least consistently, one of them should trump the
other) and you may get an updated class that conflicts with an old class. If 
you've ever been in XML hell, it's the same thing: fighting libraries.

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

iEYEARECAAYFAk6mzEQACgkQ9CaO5/Lv0PDCBQCgsrB6FrREV9q5t5fdwZDgXlz5
NqEAn0ieun/8hir+tiysgN/LkQXZsuSv
=Thny
-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: ODBC jar files

2011-10-24 Thread Propes, Barry L
Ok, thanks for that explanation. I'll test putting one in the WEB-INF/lib and 
see if I can connect to it that way. If so, I'll see where I need to go from 
there.


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, October 20, 2011 4:14 PM
To: Tomcat Users List
Subject: RE: ODBC jar files

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: ODBC jar files

 I had web app A with a context file in its META-INF directory and web
 app B with a (different) context file in its META-INF directory.

That's not related to the classloader being used here.  There's a separate one 
for Tomcat's lib directory, and that's the only one that sees the jars in that 
location.  You can put a JDBC jar in WEB-INF/lib, but then the webapp has to do 
its own DB connection pooling.

- 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



ODBC jar files

2011-10-20 Thread Propes, Barry L

Question. Will it hurt to have two different odbc jar files in the lib folder?

I've been connecting to a production server on Oracle10g for some time, and 
have had my context.xml file in the META-INF directory of one web app 
configured to hit this Oracle server.

Our group just got a new development server on Oracle11g, and while I can 
connect to it via Toad or SQL Plus (thereby assuring the tnsnames file is 
properly configured) I cannot connect at all from the web app in Tomcat.

I've been using the drivers in the ojdbc14_g.jar file for some time but I think 
I may need ojdbc6.jar for the new Oracle server. I wasn't sure if these two 
would conflict or not.

FWIW, I'm using:
Tomcat Version 6.0.26
JDK 1.6.0_18
Win XP is my OS for the test machine.

The above mentioned .jar files. I just added the second one, ojdbc6.jar, then 
deleted the work folder contents and restarted the web app.

My context.xml file is configured in the following manner:

--
Context
  Resource
auth=Container
description=changectrlappdev
name=jdbc/myoracledev
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
username=usernm
password=password
url=jdbc:oracle:thin:@croesm6734:2504:LANDMVJ
maxIdle=30
maxWait=1
maxActive=10
testOnBorrow=true
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false/


Realm className=org.apache.catalina.realm.DataSourceRealm
localDataSource=true
   dataSourceName=jdbc/myoracledev
   userTable=users userNameCol=user_name userCredCol=user_pass
   userRoleTable=user_roles roleNameCol=role_name/!--using --

/Context

I've also tried the following:
--
Context
  Resource
auth=Container
description=changectrlappdev
name=jdbc/myoracledev
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
username=usernm
password=password
url=jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC )(KEY = LANDMVJ))
(ADDRESS = (PROTOCOL = TCP )(HOST = croesm6734.specserver.net)(PORT = 
2504)))
   (CONNECT_DATA =  (SID = OPSDEV)  (SERVICE_NAME = LANDMVJ)
maxIdle=30
maxWait=1
maxActive=10
testOnBorrow=true
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false/

Realm className=org.apache.catalina.realm.DataSourceRealm
localDataSource=true
   dataSourceName=jdbc/myoracledev
   userTable=users userNameCol=user_name userCredCol=user_pass
   userRoleTable=user_roles roleNameCol=role_name/

/Context
--
with the same error message getting logged.

SEVERE: Servlet.service() for servlet jsp threw exception
java.sql.SQLException: Io exception: Connection 
refused(DESCRIPTION=(TMP=)(VSNNUM=185599744)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)


I feel this is mostly a driver error, but related to Tomcat in terms of the way 
the jar files are housed in the lib directory and perhaps if one set of driver 
classes takes precedent over another?

I really wasn't sure if those two jar files would conflict and cause issues.

If anyone can enlighten me on this it would be appreciated!

Thanks,

Barry

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



RE: ODBC jar files

2011-10-20 Thread Propes, Barry L
Sorry for any confusion there - I meant tomcat/lib, not WEB-INF/lib.

Ok, I imagine that is a problem  then. I haven't perused both jars, but I 
imagine there's some redundancy in there!

Thanks.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, October 20, 2011 12:46 PM
To: Tomcat Users List
Subject: RE: ODBC jar files

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: ODBC jar files

 Will it hurt to have two different odbc jar files in the lib folder?

Which lib folder are you referring to?  Tomcat's lib folder, or WEB-INF/lib of 
the webapp?

If any class names are common to both jars, you *will* run into trouble.

 - 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: ODBC jar files

2011-10-20 Thread Propes, Barry L
I had kind of thought that might be the case, but wasn't sure.

I had web app A with a context file in its META-INF directory and  web app B 
with a (different) context file in its META-INF directory.

But just because the jars have different names, I suppose doesn't' even mean 
the package path is different, let alone the class name.

I'll check those very carefully.

Thanks!

-Original Message-
From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com]
Sent: Thursday, October 20, 2011 2:07 PM
To: Tomcat Users List
Subject: Re: ODBC jar files

If there are common classes it will be very hard to tell which one will be 
loaded by class loader

check this document,
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html



On Thu, Oct 20, 2011 at 3:00 PM, Propes, Barry L barry.l.pro...@citi.comwrote:

 Sorry for any confusion there - I meant tomcat/lib, not WEB-INF/lib.

 Ok, I imagine that is a problem  then. I haven't perused both jars,
 but I imagine there's some redundancy in there!

 Thanks.

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Thursday, October 20, 2011 12:46 PM
 To: Tomcat Users List
 Subject: RE: ODBC jar files

  From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
  Subject: ODBC jar files

  Will it hurt to have two different odbc jar files in the lib folder?

 Which lib folder are you referring to?  Tomcat's lib folder, or
 WEB-INF/lib of the webapp?

 If any class names are common to both jars, you *will* run into trouble.

  - 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




--
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com

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



RE: JNDI configuration with 6.0.29

2011-09-09 Thread Propes, Barry L
I had something similar but referenced the Connection object right with it, 
essentially.

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);
// Allocate and use a connection from the pool
Connection connection = ds.getConnection();

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Thursday, September 08, 2011 4:11 PM
To: Tomcat Users List
Subject: Re: JNDI configuration with 6.0.29

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Anjib,

On 9/8/2011 4:51 PM, Anjib Mulepati wrote:
 DataSource ds = null; try { 40.   Context initCtx = new
 InitialContext(); 41.Context envCtx = (Context)
 initCtx.lookup(java:comp/env); 42.   ds = (DataSource)
 envCtx.lookup(jdbc/dynic);

Odd to use a local variable for this, but I guess you could do that.

I've seen java:comp/env and java:/comp/env, but both seem to work.

Try running this JSP. It's a bit fragile, but it should get the job done.

- -chris

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
%@page pageEncoding=UTF-8
   session=false
   language=Java
   import=
javax.naming.InitialContext,
javax.naming.Binding,
javax.naming.Context,
javax.naming.NamingEnumeration,
javax.naming.NamingException
   
%
%
  String path = java:/comp/env;

  String pathParam = request.getParameter(path);
  if(null != pathParam  !.equals(pathParam.trim()))
path = pathParam.trim();

  int pos = path.lastIndexOf('/');
  String parent = pos  0 ? path.substring(0, pos) : java:comp/env; % html 
xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head
  titleJNDI Browser: %= path %/title /head body
  h1JNDI Browser: %= path %/h1

  pa href=?path=%= parent %%= parent %/a/p %
  InitialContext ctx = null;
  NamingEnumeration e = null;
  try
  {
ctx = new InitialContext();
e = ctx.listBindings(path);

if(e.hasMoreElements())
{
%
  ul
%
  while(e.hasMoreElements())
  {
Binding b = (Binding)e.next();
%
li
%
if(b.getObject() instanceof Context)
{
%
  a href=?path=%= path %/%= b.getName() %%=
b.getName() %/a
%
}
else
{
%
   %= b.getName() % (%= b.getClassName() %) %
}
%
/li
%
  }
%
  /ul
%
}
else
{
%
  pJNDI context is empty/p
%
}
  }
  catch (NamingException ne)
  {
%
  pError: %= ne.getMessage() %pre
  %
java.io.PrintWriter myout = new java.io.PrintWriter(out);
ne.printStackTrace(myout);
myout.flush();
  %
  /pre/p
%
  }
  finally
  {
if(null != e) try { e.close(); } catch (NamingException ne)
  { %p%= ne.getMessage() %/p% }

if(null != ctx) try { ctx.close(); } catch (NamingException ne)
  { %p%= ne.getMessage() %/p% }
  }//foo
%
/body
/html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5pL3gACgkQ9CaO5/Lv0PBLAQCglRlAcKBZa5Gtrg494FfcvA2c
/hIAoIu0fj/5ejz3+C3Pk/S8i1PeQG50
=F0ZW
-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: JNDI configuration with 6.0.29 Reformatted

2011-09-08 Thread Propes, Barry L
And do you have an instance of the jdbc driver in more than one place?

-Original Message-
From: Felix Schumacher [mailto:felix.schumac...@internetallee.de]
Sent: Thursday, September 08, 2011 2:01 PM
To: Tomcat Users List
Subject: Re: JNDI configuration with 6.0.29 Reformatted

Am Donnerstag, den 08.09.2011, 14:49 -0400 schrieb Anjib Mulepati:
 yes after changing to
  ds = (DataSource) envCtx.lookup(jdbc/dummy_value);

 i am getting

 javax.naming.NameNotFoundException: Name dummy_value is not bound in this 
 Context
   org.apache.naming.NamingContext.lookup(NamingContext.java:770)
   org.apache.naming.NamingContext.lookup(NamingContext.java:140)
   org.apache.naming.NamingContext.lookup(NamingContext.java:781)
   org.apache.naming.NamingContext.lookup(NamingContext.java:153)
   com.anjib.factory.DynICFactory.init(DynICFactory.java:41)
   com.anjib.actions.CommonAction.execute(CommonAction.java:42)
   
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
   
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
   org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Ok, strange...

Do you have any other error messages, you are not showing us? :)

Where have you put your jdbc-driver for oracle?

Bye
 Felix


 On 9/8/2011 2:43 PM, Felix Schumacher wrote:
  Am Mittwoch, den 07.09.2011, 10:22 -0500 schrieb Anjib Mulepati:
  Yes I am positive
  So, your error message changes, if you change your factory code?
 
  Say, if you change your code like this
 
 ds = (DataSource) envCtx.lookup(jdbc/no_such_name);
 
  Do you see a message like NameNotFoundException: Name no_such_name
  is not bound...?
 
  Felix
 
  Anjib Man Mulepati
 
  409-225-6216
 
 
 
 
  Subject: Re: JNDI configuration with 6.0.29Reformatted
  From: felix.schumac...@internetallee.de
  Date: Wed, 7 Sep 2011 17:17:21 +0200
  To: users@tomcat.apache.org
 
 
 
  Anjib Mulepatianji...@hotmail.com  schrieb:
 
  Hi All,
 
  I am trying to setup JNDI mapping for oracle JDBC Connection
  Pooling with Tomcat 6.0.29. This is giving me following error
 
  javax.naming.NameNotFoundException: Name dynic is not bound in
  this
   From your code and configuration I would have expected jdbc/dynic 
  instead of just dynic. Are you sure that you are using the code you 
  showed us?
 
  Bye
Felix
  Context
   org.apache.naming.NamingContext.lookup(NamingContext.java:770)
   org.apache.naming.NamingContext.lookup(NamingContext.java:140)
   org.apache.naming.NamingContext.lookup(NamingContext.java:781)
   org.apache.naming.NamingContext.lookup(NamingContext.java:153)
   
  org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97)
   javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
   org.apache.naming.NamingContext.lookup(NamingContext.java:793)
   org.apache.naming.NamingContext.lookup(NamingContext.java:140)
   org.apache.naming.NamingContext.lookup(NamingContext.java:781)
   org.apache.naming.NamingContext.lookup(NamingContext.java:153)
   com.anjib.factory.DynICFactory.init(DynICFactory.java:41)
   com.anjib.actions.CommonAction.execute(CommonAction.java:42)
   
  org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
   
  org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
   org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 
  I ran same program with Tomcat 7.0.12 and it works fine.
 
  Here are my configurations:
 
  1. In META-INF/context.xml
 
  Context antiJARLocking=true path=/ClientDAOTest
Resource name=jdbc/dynic
   auth=Container
   type=oracle.jdbc.pool.OracleDataSource
   driverClassName=oracle.jdbc.driver.OracleDriver
   factory=oracle.jdbc.pool.OracleDataSourceFactory
   url=jdbc:oracle:thin:@//localhost:4001/SAIDIT
   user=sfed_schema
   password=sfed_schema
   maxActive=20
   maxIdle=10
   maxWait=-1 /
  /Context
 
  2. In WEB-INF/web.xml
 
   resource-ref
   res-ref-namejdbc/dynic/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
res-sharing-scopeShareable/res-sharing-scope
 /resource-ref
 
  3. In factory class I have
 
   public class DynICFactory implements JNDIInterface{
 
private DataSource dataSource;
 
   @Overridepublic DataSource getDataSource() {return
  dataSource;}
 
   @Overridepublic AgencyInterface createAgencyManager() {
 

RE: Tomcat behind Apache and security-constraint

2011-07-21 Thread Propes, Barry L
Sounds like Tomcat is running at port 8080 and not port 80?

You don't show 8080 in your second Firefox navigator example. I've not heard 
of FF Navigator for the record, but I guess it's a flavor of their browsers or 
a euphemism for it.


-Original Message-
From: Adrián Córdoba [mailto:adr.cord...@gmail.com]
Sent: Thursday, July 21, 2011 11:25 AM
To: users@tomcat.apache.org
Subject: Tomcat behind Apache and security-constraint

Hi!

If I try to access to some file within internal directory, directly in Tomcat 
(*http://localhost:8080/...*), username and password are required, and I can 
reach the file (if username and password are wright). That's wright!

But, *if I try to access the same file within internal directory, through 
Apache web server* (*http://localhost/...*), username and password are 
required, but *a blank page is displayed on Firefox navigator*.
(If I delete the security constraint, the web application works fine.)

Do you have any idea?

--
[Adrián Córdoba]

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



RE: Passing user id from web page to tomcat webapp

2011-07-14 Thread Propes, Barry L
Looks like ASP code.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Thursday, July 14, 2011 9:01 AM
To: Tomcat Users List
Subject: Re: Passing user id from web page to tomcat webapp

Savoy, Melinda wrote:
 David,

 You might try the following, instead of getRemoteUser, as we use this to get 
 the USERID from IIS.  I inherited this code so I really can't speak to it a 
 lot but it's working.

 Regards.


 '  get user ID from header **

   XUserID = Request.ServerVariables(AUTH_USER)

   L=Len(XUserID)

   if L  0 then
  Pos = InStr( XUserID,\)

  if Pos  0 then
 ID = Right(XUserID,(L-Pos) )
 strUserID = ID
  end if
   else
   strUserID = XUserID
   end if

 isUserID = strUserID


Melinda,

*where* is that thing working ?
It doesn't look like any Java code to me ..


-
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: Question on WORK directory of tomcat container

2011-06-09 Thread Propes, Barry L
It might be helpful to know if you deleted items out of your work directory or 
if you are implying you have to leave cached JSPs there without touching them, 
but you altered something else?

I guess like Chuck suggested, we'd be guessing at this, but it almost sounds 
like you are afraid to dump the contents of the work directory because you want 
some things left to be easily accessed through cache, while you made some 
changes in the web app?

I'd restart it.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, June 09, 2011 2:29 PM
To: Tomcat Users List
Subject: RE: Question on WORK directory of tomcat container

 From: Savoy, Melinda [mailto:melindasa...@texashealth.org]
 Subject: Question on WORK directory of tomcat container

 Due to a conflict between the cached JSPs in the work directory of a
 tomcat container on our app's QA Windows
 2003 server, does the tomcat service have to be restarted?

What?

Please ask someone unfamiliar with whatever problem you're having take a look 
at the above and see if it makes any sense to them.  After you explain it to 
them, send the explanation to the mailing list so we'll have some idea of what 
you're talking about.

In general, a problem in a single webapp does not require restarting Tomcat, 
but might need a restart or redeploy of the webapp.  I have no idea if that 
applies in your case.

 - 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: default document doesnot work with IIS

2011-05-03 Thread Propes, Barry L
Maybe you have to set the index.cfm in a welcome attribute in the web.xml file 
in the conf folder?



-Original Message-
From: Asha K S [mailto:a...@adobe.com]
Sent: Tuesday, May 03, 2011 6:01 AM
To: tomcat-u...@jakarta.apache.org
Subject: default document doesnot work with IIS

HI,

Though default document is set in IIS ,it doesn't seem to pick it up when IIS 
connector is configured with tomcat.
When we provide the path like http://localhost/test it doesn't automatically 
add index.cfm and it return 404,but if I access the full url like 
http://localhost/test/index.cfm it works fine.


Thanks,
Asha

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



RE: default document doesnot work with IIS

2011-05-03 Thread Propes, Barry L
Oh, ok. Well then I'm not sure. Maybe in IIS you have to make the index.cfm the 
first choice in the default queue. As opposed to default.htm or index.htm.

Maybe you also have to set both index.cfm and index.cfml ?

-Original Message-
From: Asha K S [mailto:a...@adobe.com]
Sent: Tuesday, May 03, 2011 8:43 AM
To: Tomcat Users List
Subject: RE: default document doesnot work with IIS

HI,

Thanks a lot for the reply. Tried that too but doesn't seem to work :(

Thanks,
Asha

-Original Message-
From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Sent: Tuesday, May 03, 2011 7:05 PM
To: Tomcat Users List
Subject: RE: default document doesnot work with IIS

Maybe you have to set the index.cfm in a welcome attribute in the web.xml file 
in the conf folder?



-Original Message-
From: Asha K S [mailto:a...@adobe.com]
Sent: Tuesday, May 03, 2011 6:01 AM
To: tomcat-u...@jakarta.apache.org
Subject: default document doesnot work with IIS

HI,

Though default document is set in IIS ,it doesn't seem to pick it up when IIS 
connector is configured with tomcat.
When we provide the path like http://localhost/test it doesn't automatically 
add index.cfm and it return 404,but if I access the full url like 
http://localhost/test/index.cfm it works fine.


Thanks,
Asha

-
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: How safe is using Tomcat code outside of normal distribution (from contributors)?

2011-04-21 Thread Propes, Barry L
Dunlow, do you also have the oracle jar?

ojdbc14_g.jar?
 

-Original Message-
From: dunnlow [mailto:dunn...@yahoo.com] 
Sent: Thursday, April 21, 2011 10:20 AM
To: users@tomcat.apache.org
Subject: How safe is using Tomcat code outside of normal distribution (from 
contributors)?


Hi,

(This questions spun off of my old question 
http://old.nabble.com/Why-can%27t-Tomcat-find-class-org.apache.tomcat.jdbc.pool-DataSourceFactory--td31441243.html).
  

The jar tomcat-jdbc.jar (from http://people.apache.org/~fhanik/jdbc-pool/)
seems to be what I need.  HOWEVER, I am concerned that this .jar is outside the 
normal apache tomcat distribution.  

The jar seems very useful, so I assume there is some reason it is not rolled 
into the distribution.

Question: How safe (/common) is it to use code from contributors apache sites 
in a production system?

Thanks for any insight.
--
View this message in context: 
http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal-distribution-%28from-contributors%29--tp31450463p31450463.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: How safe is using Tomcat code outside of normal distribution (from contributors)?

2011-04-21 Thread Propes, Barry L
Is that more current than the 14_g version?

 

-Original Message-
From: dunnlow [mailto:dunn...@yahoo.com] 
Sent: Thursday, April 21, 2011 11:56 AM
To: users@tomcat.apache.org
Subject: RE: How safe is using Tomcat code outside of normal distribution (from 
contributors)?


yes (ojdbc6.jar to be exact)


Propes, Barry L wrote:
 
 Dunlow, do you also have the oracle jar?
 
 ojdbc14_g.jar?
  
 
 -Original Message-
 From: dunnlow [mailto:dunn...@yahoo.com]
 Sent: Thursday, April 21, 2011 10:20 AM
 To: users@tomcat.apache.org
 Subject: How safe is using Tomcat code outside of normal distribution 
 (from contributors)?
 
 
 Hi,
 
 (This questions spun off of my old question 
 http://old.nabble.com/Why-can%27t-Tomcat-find-class-org.apache.tomcat.jdbc.pool-DataSourceFactory--td31441243.html).
 
 The jar tomcat-jdbc.jar (from 
 http://people.apache.org/~fhanik/jdbc-pool/)
 seems to be what I need.  HOWEVER, I am concerned that this .jar is 
 outside the normal apache tomcat distribution.
 
 The jar seems very useful, so I assume there is some reason it is not 
 rolled into the distribution.
 
 Question: How safe (/common) is it to use code from contributors 
 apache sites in a production system?
 
 Thanks for any insight.
 --
 View this message in context:
 http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal-
 distribution-%28from-contributors%29--tp31450463p31450463.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
 
 
 

--
View this message in context: 
http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal-distribution-%28from-contributors%29--tp31450463p31451108.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: How safe is using Tomcat code outside of normal distribution (from contributors)?

2011-04-21 Thread Propes, Barry L
And you've been able to use it so far, and are trying to get away from it to 
the tomcat jdbc one? 

-Original Message-
From: dunnlow [mailto:dunn...@yahoo.com] 
Sent: Thursday, April 21, 2011 12:44 PM
To: users@tomcat.apache.org
Subject: RE: How safe is using Tomcat code outside of normal distribution (from 
contributors)?


Yes, it's the thin client for jdk 1.6


Propes, Barry L wrote:
 
 Is that more current than the 14_g version?
 
  
 
 -Original Message-
 From: dunnlow [mailto:dunn...@yahoo.com]
 Sent: Thursday, April 21, 2011 11:56 AM
 To: users@tomcat.apache.org
 Subject: RE: How safe is using Tomcat code outside of normal 
 distribution (from contributors)?
 
 
 yes (ojdbc6.jar to be exact)
 
 
 Propes, Barry L wrote:
 
 Dunlow, do you also have the oracle jar?
 
 ojdbc14_g.jar?
  
 
 -Original Message-
 From: dunnlow [mailto:dunn...@yahoo.com]
 Sent: Thursday, April 21, 2011 10:20 AM
 To: users@tomcat.apache.org
 Subject: How safe is using Tomcat code outside of normal distribution 
 (from contributors)?
 
 
 Hi,
 
 (This questions spun off of my old question 
 http://old.nabble.com/Why-can%27t-Tomcat-find-class-org.apache.tomcat.jdbc.pool-DataSourceFactory--td31441243.html).
 
 The jar tomcat-jdbc.jar (from
 http://people.apache.org/~fhanik/jdbc-pool/)
 seems to be what I need.  HOWEVER, I am concerned that this .jar is 
 outside the normal apache tomcat distribution.
 
 The jar seems very useful, so I assume there is some reason it is not 
 rolled into the distribution.
 
 Question: How safe (/common) is it to use code from contributors 
 apache sites in a production system?
 
 Thanks for any insight.
 --
 View this message in context:
 http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal
 - distribution-%28from-contributors%29--tp31450463p31450463.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
 
 
 
 
 --
 View this message in context:
 http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal-
 distribution-%28from-contributors%29--tp31450463p31451108.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
 
 
 

--
View this message in context: 
http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal-distribution-%28from-contributors%29--tp31450463p31451382.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: How safe is using Tomcat code outside of normal distribution (from contributors)?

2011-04-21 Thread Propes, Barry L
Just FYI dunlow, while I have the oracle jar, I do use Tomcat's dbcp jar. 
You're not looking to use that are you? 

-Original Message-
From: dunnlow [mailto:dunn...@yahoo.com] 
Sent: Thursday, April 21, 2011 1:15 PM
To: users@tomcat.apache.org
Subject: RE: How safe is using Tomcat code outside of normal distribution (from 
contributors)?


Barry, let's move this conversation to the other thread (the initial one) I was 
hoping to get feedback here regarding using code from Apache for tomcat outside 
of the normal delivery.  (and yes, I'd like to start using the tomcat 
connection pool instead of oracle's).  thanks.


Propes, Barry L wrote:
 
 And you've been able to use it so far, and are trying to get away from 
 it to the tomcat jdbc one?
 
 -Original Message-
 From: dunnlow [mailto:dunn...@yahoo.com]
 Sent: Thursday, April 21, 2011 12:44 PM
 To: users@tomcat.apache.org
 Subject: RE: How safe is using Tomcat code outside of normal 
 distribution (from contributors)?
 
 
 Yes, it's the thin client for jdk 1.6
 
 
 Propes, Barry L wrote:
 
 Is that more current than the 14_g version?
 
  
 
 -Original Message-
 From: dunnlow [mailto:dunn...@yahoo.com]
 Sent: Thursday, April 21, 2011 11:56 AM
 To: users@tomcat.apache.org
 Subject: RE: How safe is using Tomcat code outside of normal 
 distribution (from contributors)?
 
 
 yes (ojdbc6.jar to be exact)
 
 
 Propes, Barry L wrote:
 
 Dunlow, do you also have the oracle jar?
 
 ojdbc14_g.jar?
  
 
 -Original Message-
 From: dunnlow [mailto:dunn...@yahoo.com]
 Sent: Thursday, April 21, 2011 10:20 AM
 To: users@tomcat.apache.org
 Subject: How safe is using Tomcat code outside of normal 
 distribution (from contributors)?
 
 
 Hi,
 
 (This questions spun off of my old question 
 http://old.nabble.com/Why-can%27t-Tomcat-find-class-org.apache.tomcat.jdbc.pool-DataSourceFactory--td31441243.html).
 
 The jar tomcat-jdbc.jar (from
 http://people.apache.org/~fhanik/jdbc-pool/)
 seems to be what I need.  HOWEVER, I am concerned that this .jar is 
 outside the normal apache tomcat distribution.
 
 The jar seems very useful, so I assume there is some reason it is 
 not rolled into the distribution.
 
 Question: How safe (/common) is it to use code from contributors 
 apache sites in a production system?
 
 Thanks for any insight.
 --
 View this message in context:
 http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-norma
 l
 - distribution-%28from-contributors%29--tp31450463p31450463.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
 
 
 
 
 --
 View this message in context:
 http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal
 - distribution-%28from-contributors%29--tp31450463p31451108.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
 
 
 
 
 --
 View this message in context:
 http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal-
 distribution-%28from-contributors%29--tp31450463p31451382.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
 
 
 

--
View this message in context: 
http://old.nabble.com/How-safe-is-using-Tomcat-code-outside-of-normal-distribution-%28from-contributors%29--tp31450463p31451605.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: Why can't Tomcat find class org.apache.tomcat.jdbc.pool DataSourceFactory?

2011-04-20 Thread Propes, Barry L
Dunlow, I have this in mine (driver attribute)

 driverClassName=oracle.jdbc.driver.OracleDriver

But also, it could be that you've got the oracle jdbc jar file in more than one 
directory.

That happened to me and I was getting very unstable error messages I could not 
account for, and it was related to this.

Earlier Tomcat versions were more forgiving, but not the 6.0. series.

Try that and let us know.

-Original Message-
From: dunnlow [mailto:dunn...@yahoo.com] 
Sent: Wednesday, April 20, 2011 8:38 AM
To: users@tomcat.apache.org
Subject: Why can't Tomcat find class org.apache.tomcat.jdbc.pool 
DataSourceFactory?


So, I'm investigating moving away from an oracleconnectionpool and using the 
tomcat connection pool.  I followed the myriad of examples for configuring the 
Resource in the server.xml.  Found great info here
(http://people.apache.org/~fhanik/tomcat/jdbc-pool.html) However, when I start 
tomcat, I get the following error: 

javax.naming.NamingException: Could not load resource factory class [Root 
exception is java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool 
DataSourceFactory] 

I'm using Tomcat 6.0 

My config in server.xml is
Resource auth=Container driverClassName=oracle.jdbc.OracleDriver
factory=org.apache.tomcat.jdbc.pool.DataSourceFactory name=jdbc/myds
password=mypasswd type=javax.sql.DataSource
url=jdbc:oracle:thin:@10.10.10.33:1234:myds user=myuname / 

I get it, tomcat can't find the class.  But WHY?  I don't see anything in the 
documentation about adding extra .jar files.  I've looked in the distrib and 
can find the golden .jar anyway. 

Can anyone tell me what I am doing wrong? 

Thanks!
--
View this message in context: 
http://old.nabble.com/Why-can%27t-Tomcat-find-class-org.apache.tomcat.jdbc.pool-DataSourceFactory--tp31441243p31441243.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: Working of Tomcat with MS Access

2011-04-15 Thread Propes, Barry L
I know from previous experience that driver you show is horribly outdated, and 
horrible in general.

I assume no credentials are needed to access the DB in the Connection  object, 
con?

Maybe I'm reading that incorrectly.

Does the JDBC program connect to MS Access at all?


-Original Message-
From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
Sent: Friday, April 15, 2011 5:05 AM
To: users@tomcat.apache.org
Subject: Working of Tomcat with MS Access

Hello,
 I am working on  building a jsp website with MS Access as database. When 
my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the 
following error:

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not 
found and no default driver specified.

The jdbc program alone is working perfectly, So There might not be problems due 
to  Driver, Data source name, Database Tables or any other software version 
compatibilities.

OS: Windows Vista Home Basic
Tomcat Version: 5.5.x
jdk version: 1.6
MS Access 2010


code is given below:

%@ page language=java import=java.sql.* %  html  body  form 
method=post  p Enter your username :  input type=text name=username/ 
/p  p Enter your password :  input type=text name=password/ /p  
input type=submit value=Login/  %
String usn = request.getParameter(username);
String pass = request.getParameter(password);

try{
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
 String url = jdbc:odbc:rahul;
 Connection con = DriverManager.getConnection(url, , );
 Statement s = con.createStatement();

 ResultSet rs = s.executeQuery(select * from customers);
 while(rs.next())
 {
   String u = rs.getString(1);
   String p = rs.getString(2);
   if(usn.equals(u)  pass.equals(p))
   {
  out.println(login successfull);
  }
   else
   {
  out.println(login failed);
 }
   }
}

catch(Exception e)
{
   out.println(Error+e);
   }

 %
 /form
 /body
 /html

-
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: Working of Tomcat with MS Access

2011-04-15 Thread Propes, Barry L
Jeff has some really good points here, Rahul.

I'm a guy who spent several years doing ASP development with both MS Access and 
SQL Server over the web before getting into Java.
Even still, I didn't fathom trying to mess with MS Access with Java when I was 
making that transition. I started with mySQL on my Windows desktop to get 
started, but when I got access to our Oracle servers, went that route.

Like Jeff says, you can do this basically for no cost using both Tomcat and 
mySQL.

Sure, it's command line, unlike MS Access, but you shouldn't have too much 
trouble with it. Jeff, if he's using MS Access, he's probably not on Linux, is 
he?


-Original Message-
From: Jeff Hubbs [mailto:jhubbsl...@att.net]
Sent: Friday, April 15, 2011 12:46 PM
To: Tomcat Users List
Subject: Re: Working of Tomcat with MS Access

A beginner needs to at least begin with workable platforms and software.  
PostgreSQL on Linux has a total software license cost of $0.00; your barrier to 
entry with inappropriate software is considerably higher.

On 4/15/11 1:35 PM, RAHUL RAJ wrote:
 Since I am a beginner, I have to start with some trial projects,
 right? I know this is nothing! and help me...pls answer to the question..

 On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbsjhubbsl...@att.net  wrote:

 You do realize, I hope, that what you're proposing is akin to
 sourcing parts for your jet engine from Fisher-Price?

 IMHO MS Access is not and never has been useful as a professional
 database product.  I'm not even sure if what you are proposing even
 holds up in the looking-through-binoculars-from-the-big-end sense.

 MS Access is a desktop application that accesses files on disk.  Java
 apps running on Tomcat typically access an RDBMS over a network
 connection via SQL statements and their responses.  AFAIK there is
 not a server instantiation of MS Access; in fact, part of the whole
 point of MS Access as an ongoing product is that it acts as a
 gateway drug to MS' SQL Server product, the transition to which
 would be triggered by the inherent limitations (and, in my past
 experience, persistent unaddressed bugs) of Access.

 I think you need to back up a bit and work toward getting your data
 liberated from MS Access and ported into a proper RDBMS like
 PostgreSQL or one of MS SQL Server, Oracle, IBM DB2, etc. if you feel
 that money must be continually spent on software licenses for such.
 Then you will be facing Java apps and Tomcat in a far more conventional way.

 So, to sum up this and earlier responses: 1) Learn to code Java 2)
 Understand real RDBMSses.

 - Jeff


 On 4/15/11 6:04 AM, RAHUL RAJ wrote:

 Hello,
   I am working on  building a jsp website with MS Access as
 database. When my login page is loaded on tomcat
 (localhost:8080/login.jsp), it shows the following error:

 java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
 name not found and no default driver specified.

 The jdbc program alone is working perfectly, So There might not be
 problems due to  Driver, Data source name, Database Tables or any
 other software version compatibilities.

 OS: Windows Vista Home Basic
 Tomcat Version: 5.5.x
 jdk version: 1.6
 MS Access 2010


 code is given below:

 %@ page language=java import=java.sql.* %
   html
   body
   form method=post
   p   Enter your username :input type=text name=username/   /p
   p   Enter your password :input type=text name=password/   /p
   input type=submit value=Login/
   %
  String usn = request.getParameter(username);
 String pass = request.getParameter(password);

 try{
  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  String url = jdbc:odbc:rahul;
  Connection con = DriverManager.getConnection(url, , );
  Statement s = con.createStatement();

  ResultSet rs = s.executeQuery(select * from customers);
  while(rs.next())
  {
String u = rs.getString(1);
String p = rs.getString(2);
if(usn.equals(u)   pass.equals(p))
{
   out.println(login successfull);
   }
else
 {
out.println(login failed);
   }
 }
  }

 catch(Exception e)
 {
out.println(Error+e);
}

   %
   /form
   /body
   /html

 
 - 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: 

RE: Working of Tomcat with MS Access

2011-04-15 Thread Propes, Barry L
Oh, ok - that's good. Although I'm not familiar with it, but will take it under 
advisement.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Friday, April 15, 2011 2:03 PM
To: Tomcat Users List
Subject: Re: Working of Tomcat with MS Access

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 4/15/2011 1:56 PM, Propes, Barry L wrote:
 Like Jeff says, you can do this basically for no cost using both
 Tomcat and mySQL.

Even better, use JavaDB: it comes with Java and is pretty much guaranteed to 
work.

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

iEYEARECAAYFAk2olmwACgkQ9CaO5/Lv0PAFOwCgigjZqt/9QyFXXCg68L1A2cHk
PpYAoKK3VzrDZhRZiKlbFiqsmurJHd2l
=4sLQ
-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] Working of Tomcat with MS Access

2011-04-15 Thread Propes, Barry L
Oh, ok, that explains it better.

I've had to deal w/ MS Access, more than I'd like, or out of pure cheapness 
on my part sometimes, but have amply dealt with Oracle (best IMO) and SQL 
Server.

And no it's usually not.

I absolutely have to have MS Access solutions here, based in our corp. world, 
for quick reporting modules for people. They're always tethered to our Oracle 
ODBC connections, and lately I've been dealing with one that's not really that 
nice! : (

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Friday, April 15, 2011 2:40 PM
To: Tomcat Users List
Subject: Re: [OT] Working of Tomcat with MS Access

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 4/15/2011 3:11 PM, Propes, Barry L wrote:
 Oh, ok - that's good. Although I'm not familiar with it, but will take
 it under advisement.

You could think of it as Java's answer to Access, except that I wouldn't want 
to be that demeaning of JavaDB (aka Apache Derby). It's transactional, which is 
I think more than you can say about MS Access files, but also file-based 
meaning that I think you can just copy a single file around and move the 
database. It's not usually that simple in the larger RDBMS world.

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

iEYEARECAAYFAk2onyoACgkQ9CaO5/Lv0PDgnACguZpmDV0+OLpe5poz7R8uhMS8
weIAn244//QAT/DvHhpEn3976U7cZJ7J
=Gsw6
-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: Tomcat manager fails and can't tell why.

2011-04-12 Thread Propes, Barry L
Most don't, and XML is typically very picky about all that. I learned that 
lesson several years ago trying to pass along characters in some XSL documents 
and files, and it balks at many special characters. I wouldn't even think of 
attempting that for a password embedded in XML, but that's me.

-Original Message-
From: David kerber [mailto:dcker...@verizon.net]
Sent: Tuesday, April 12, 2011 10:29 AM
To: Tomcat Users List
Subject: Re: Tomcat manager fails and can't tell why.

On 4/12/2011 11:17 AM, Yucca Nel wrote:
 Indeed :D,

 Seems to be an issue when I add an ampersand to the password!

That doesn't surprise me a bit.  I don't think I've run into any password 
system that will accept that character, though I guess there must be some since 
you're using it.

D



 -Original Message- From: David kerber Sent: Tuesday, April 12,
 2011 5:07 PM To: Tomcat Users List Subject: Re: Tomcat manager fails and
 can't tell why.
 On 4/12/2011 11:04 AM, Yucca Nel wrote:
 I do.. :) It confuses the heck out of me.

 Seems to fail because I change to alphanumeric password that is longer
 than 4 chars long. I also make sure to close all browser tabs so that I

 Do you close the entire browser? I don't think just closing tabs will
 clear the session.

 D

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


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




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


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



RE: Problem with too many open db connections on Tomcat

2011-04-01 Thread Propes, Barry L
Are you able to insert these attributes in the Resource tag?

timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=5000
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300

I have these attributes nested in my Resource element - I never used 5.5 but 
use 6.0.29 and I believe it helps with potential rogue connections.


-Original Message-
From: Claus Hausberger [mailto:chausber...@gmx.de]
Sent: Friday, April 01, 2011 7:38 AM
To: Tomcat Users List
Subject: Re: Problem with too many open db connections on Tomcat


 Original-Nachricht 
 Datum: Fri, 01 Apr 2011 12:44:28 +0100
 Von: Mark Thomas ma...@apache.org
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: Problem with too many open db connections on Tomcat

 On 01/04/2011 12:36, Claus Hausberger wrote:
  Hello,
 
  I have a problem with Tomcat and open connections to an Oracle 11g
 database.
 
  I use Tomcat 5.5, DBCP 1.2 and Hibernate 3.3 + Spring for DB
 connections.
  For political reasons I can not upgrade to new Tomcat versions at
  the
 moment.
 
  I have 7 deployed apps on the Tomcat. 4 user a datasource configured
  for
 Tomcat itself (in context.xml) with a setting of maxActiv=20. This
 datasource is used by Hibernate via JNDI.

 Which context.xml file? Exactly where is it located?

 Mark


Hi Mark,

the file is in the Tomcat folder under:

conf/context.xml

this is the config:

Resource name=jdbc/myDS auth=Container
type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@my-oracle-host:mysid username=xxx
password=XXX maxActive=20 maxIdle=10 maxWait=-1
/


regards,

Claus




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


--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis 
zu 50,- Euro! https://freundschaftswerbung.gmx.de

-
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: manager app problem

2011-03-30 Thread Propes, Barry L
Yes, I didand while it was getting replaced with the new one, for whatever 
reason, the web.xml file in the manager/WEB-INF sub-dir got deleted. I replaced 
it and VOILA, it all worked again!

Thanks, Chris.

However, I guess I thought it a bit odd this didn't seem to log, but maybe 
that's the way it works?
It did not log though. 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, March 30, 2011 10:21 AM
To: Tomcat Users List
Subject: Re: manager app problem

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 3/28/2011 11:43 AM, Propes, Barry L wrote:
 Here's the content of my context.xml in the /webapps/manager/META-INF 
 directory.

FWIW, Chuck asked for server.xml, though context.xml is probably more relevant.

Did you check for any manager.xml in your conf/Catalina/localhost/ directory? 
It's possible that an old deployment descriptor is being used...

 ?xml version=1.0 encoding=UTF-8?
 !-- Apache disclaimer commented out here-- Context 
 antiResourceLocking=false debug=0 privileged=true Valve 
 className=org.apache.catalina.valves.RemoteAddrValve 
 allow=10\.120\.5\.53/ /Context

So, is that your new IP address? What happens if you completely comment-out the 
Valve declaration?

 And yes, I did check all the logs and it doesn't include a reference 
 to this.
 
 Upon stopping and then restarting Tomcat, this context.xml file 
 properly gets copied out to the conf/Catalina/localhost directory 
 titled manager.xml, with the same contents.

That's good.

Uhh... sure about the IP?

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

iEYEARECAAYFAk2TSngACgkQ9CaO5/Lv0PB2IgCgsDa9cEPWmDLKY9leHaY8+qP7
k9wAn0z3Tb2KOTnbN7g1mWugogDyjYZ1
=msmj
-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: manager app problem

2011-03-30 Thread Propes, Barry L
I didn't know that was the case, but I'd probably not even attempt such a feat! 
Yikes! 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, March 30, 2011 1:55 PM
To: Tomcat Users List
Subject: RE: manager app problem

 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: manager app problem

 It's (strangely) not an error for a web-app not to have a 
 WEB-INF/web.xml file: defaults will be used.

 However, for anything but static-only webapps, it will render the 
 webapp somewhat inert.

JSP-only webapps can also get away without a WEB-INF/web.xml (but I probably 
wouldn't want to maintain such a beast, if it does anything useful at all).

 - 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: Please Help

2011-03-29 Thread Propes, Barry L
If you can get to your Manager app in Tomcat, you should be able to reload, or 
at least stop and start the webapp there.

-Original Message-
From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com]
Sent: Tuesday, March 29, 2011 2:12 PM
To: Tomcat Users List
Subject: Re: Please Help

Actually, I am using Tomcat from last 15 days only..One thing worked is if I 
restart PC, then it works fine..so it looks like restarting Tomcat works..
The problem on given link is excatly what I am facing..Thanx a ton for this..
but still can U tell me exactly how to restart Tomcat without restarting PC as 
one green signal is not appearing in my taskbar and I am using Windows7 as well 
as what do you mean by restarting webapp?




From: Joseph Morgan joseph.mor...@ignitesales.com
To: Tomcat Users List users@tomcat.apache.org; Jinal Dhruv 
dhruv.ji...@yahoo.com
Sent: Wednesday, 30 March 2011 12:36 AM
Subject: Re: Please Help

You can 1) Restart Tomcat or your web app, or 2) read this:

http://stackoverflow.com/questions/415520/how-do-i-make-tomcat-stop-caching-my-servlet-responses


-Original Message-
From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com]
Sent: Tuesday, March 29, 2011 1:47 PM
To: Tomcat Users List
Subject: Re: Please Help

I am having problem particularly with running Servlets programs..
Though I clear browser history, delete .class file and comile .java file again, 
it shows old results..So from where it come? Is Tomcat is storing it at 
somewhere?




From: Joseph Morgan joseph.mor...@ignitesales.com
To: Tomcat Users List users@tomcat.apache.org; Jinal Dhruv 
dhruv.ji...@yahoo.com
Sent: Wednesday, 30 March 2011 12:08 AM
Subject: Re: Please Help

So. *what* is it not showing?  Is it a JSP?  If so, what is the time on 
your tomcat server compared to the time of the JSP.  We have this sometimes 
when we deploy and find we have to update a JSP within a very short period of 
time, and our Tomcat server in our COLO is 2 time zones off.  The JSP gets the 
local time, and if the server has compiled it, then it thinks the new JSP has 
already been compiled.

-Original Message-
From: Jinal Dhruv [mailto:dhruv.ji...@yahoo.com]
Sent: Tuesday, March 29, 2011 1:32 PM
To: Tomcat
Subject: Please Help

One problem I am having Using Tomcat 6.0 is it doesn't reflect the change what 
I made instantaneously..
I mean it keep showing old results though I have disabled option of 
'Remembering History' in browser..
What I feel is it is fetching old results from somewhere and now it's not by 
browser..
So how to configure Tomcat 6.0 so that it never remember anything and do 
process entirely new every time when it comes the execution part..

Regards,Jinal Dhruv


-
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: manager app problem

2011-03-28 Thread Propes, Barry L
Hi, Chuck.

Thanks.

Here's the content of my context.xml in the /webapps/manager/META-INF directory.

?xml version=1.0 encoding=UTF-8?
!-- Apache disclaimer commented out here--
Context antiResourceLocking=false debug=0 privileged=true
Valve className=org.apache.catalina.valves.RemoteAddrValve 
allow=10\.120\.5\.53/
/Context

And yes, I did check all the logs and it doesn't include a reference to this.

Upon stopping and then restarting Tomcat, this context.xml file properly gets 
copied out to the conf/Catalina/localhost directory titled manager.xml, with 
the same contents.


The catalina log shows the following:
NFO: Deploying configuration descriptor host-manager.xml
Mar 28, 2011 10:36:01 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Mar 28, 2011 10:36:01 AM org.apache.catalina.startup.HostConfig deployWAR

To me this is all that seems applicable, but maybe it means more.
Manager.log is blank. As are the stderr and stdout logs.

The manager directory appears to have all the contents there, including the 
WEB-INF and META-INF directories.

Thanks.



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, March 25, 2011 4:55 PM
To: Tomcat Users List
Subject: RE: manager app problem

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: manager app problem

 I'm using Tomcat 6.0.26 on Win XP Pro, and JDK 1.6.0_18.
 Hope I included everything here that's needed.

Not quite; let's see your actual server.xml (without comments), rather than 
just a description of what you think is in there.  Also need to know the exact 
(complete) URL you're trying to use.

Are you sure you looked in *all* of the Tomcat logs?

 - 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: manager app problem

2011-03-28 Thread Propes, Barry L
Ok, very strangefigured it out. Must have somehow accidentally deleted my 
web.xml file in the manager/WEB-INF directory.

How? Dunno. But it's fixed now!

Thanks guys!


-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: Friday, March 25, 2011 6:05 PM
To: Tomcat Users List
Subject: Re: manager app problem

2011/3/26 Propes, Barry L barry.l.pro...@citi.com:
 Hello Tomcat community,

 I'm again experiencing an oddity with the manager app.

 I'm using Tomcat 6.0.26 on Win XP Pro, and JDK 1.6.0_18. Hope I included 
 everything here that's needed.

 I'm not getting an error generated to the logs out of this, just the generic 
 requested resource (/manager/status) is not available. message in the 
 browser window.

My first guess would be that the manager app is not running.

 I've since taken the address off entirely, tried the new IP address, all the 
 while deleting the manager contents (and sub dir, too) out of the work 
 folder, deleting the manager.xml file out of the  conf/Catalina/localhost 
 directory, after having stopped Tomcat and prior to a restart.

I guess that maybe your manager.xml or
webapps/manager/META-INF/context.xml  is broken (like a typo somewhere:  a 
stray '' or a nested comment ('--' is not allowed inside comments)).  There 
should be errors logged somewhere.
As Chuck wrote:

 Are you sure you looked in *all* of the Tomcat logs?

Best regards,
Konstantin Kolinko

-
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



manager app problem

2011-03-25 Thread Propes, Barry L
Hello Tomcat community,

I'm again experiencing an oddity with the manager app.

I'm using Tomcat 6.0.26 on Win XP Pro, and JDK 1.6.0_18. Hope I included 
everything here that's needed.

I'm not getting an error generated to the logs out of this, just the generic 
requested resource (/manager/status) is not available. message in the browser 
window.

Our PCs got moved the other day at work and I had the RemoteAddrValve allow 
attribute configured to my current (at the time) IP address.

I've since taken the address off entirely, tried the new IP address, all the 
while deleting the manager contents (and sub dir, too) out of the work folder, 
deleting the manager.xml file out of the  conf/Catalina/localhost directory, 
after having stopped Tomcat and prior to a restart.

I've probably asked questions of this topic before, but couldn't find anything 
specific about it in either my old emails, OR even on the Nabble forum, which I 
perused for a while, trying to find the answer.

If someone can please refresh my memory on if there's a step I'm missing, 
omitting or forgetting, that's involved to fix this, I'd greatly appreciate it!

I've also rebooted the PC, to no avail.

Thanks!

Barry


RE: tomcat issue with DBCP connection pool

2011-03-21 Thread Propes, Barry L
And to thisis it absolutely necessary to use the SYS_REFCURSOR in Oracle? I 
use several packages and procesures and never use this! Granted, I may have 
many less records than you in your DB table, but I was just wondering. Perhaps 
it is.


 BTW, my application calls a stored procedure which in turn uses an
 oracle SYS_REFCURSOR. As I know ref cursor can not be closed through code.

How are you supposed to close that cursor, then? Did you mean you can't close 
it through Java code, or you can't even close it through PL/SQL?

 Once the error is encountered the application is not recovering until
 the application is restarted.

Sounds like closing the connection and re-initializing it would probably do the 
job, too. Is it possible for you to detect the kinds of requests that will 
allocate these SYS_REFCURSORs and use a one-time connection instead of going 
through the pool?

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

iEYEARECAAYFAk2HYRkACgkQ9CaO5/Lv0PAOpQCfWY5OKJoRo1C8Ld//bOTpCC3x
t/QAn2qdGxo0uXDU01rf6A+IElsrLDTq
=40df
-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: Issue with JNDI datasources in Tomcat 6

2011-02-18 Thread Propes, Barry L
You said you set that up exactly as done in the link below, and the link below 
shows this near the top:

Figure: Tomcat 5.5 directory structure
DB_Driver.jar

Question - if you're on Tomcat 6 series, why are you configuring to the 5.5 
specs? I'm thinking they're done a bit differently.

Maybe Chris, Pid or Chuck could verify this, but I think I'm correct here.

Do you have the proper .jar file in the correct folder?

-Original Message-
From: pablo.a.saave...@gmail.com [mailto:pablo.a.saave...@gmail.com]
Sent: Thursday, February 17, 2011 3:35 PM
To: users@tomcat.apache.org
Subject: Issue with JNDI datasources in Tomcat 6

Hi,

I'm trying to use JNDI datasources in Tomcat 6, using global naming resources. 
My setup is identical to this one:

http://pro-programmers.blogspot.com/2008/07/spring-datasource-jndi-lookup-from.html

But I keep getting null when doing the lookup. I debugged the code a little and 
the problem seems to be that the entry for the datasource  in the naming 
context does not have an address element. Any tip as to what I might be doing 
wrong?

Thanks.

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



RE: [ANN] New Tomcat committer: Christopher Schultz (schultz)

2010-11-22 Thread Propes, Barry L
Congrats, Chris!!


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Monday, November 22, 2010 1:17 PM
To: Tomcat Users List; Tomcat Developers List
Subject: [ANN] New Tomcat committer: Christopher Schultz (schultz)

On behalf of the Tomcat committers I am pleased to announce that Christopher 
Schultz (schultz) has been voted in as a new Tomcat committer.

Please join me in welcoming him.

Mark

-
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: DBCP abandoned trace - unable to understand the leak

2010-11-04 Thread Propes, Barry L
Not sure if it matters or not, but in your   SponserSummaryDAO method, it 
appears you establish the rs as null, but don't ever close it? You might 
specifically try that.

And is it necessary to reassign all those variables (connection, rs, pstmt) to 
null again in those catch blocks?


-Original Message-
From: sasidhar prabhakar [mailto:sasidhar1...@gmail.com]
Sent: Thursday, November 04, 2010 7:05 AM
To: Tomcat Users List
Subject: Re: DBCP abandoned trace - unable to understand the leak

*
* @author oracle
*/
public class SponserSummaryDAO {
...


public SponserSummaryDAO(){
log.info(^Cretion of SponserSummaryDAO :
+Calendar.getInstance().getTime().toString());
dataSource = ConnectionUtil.getDataSource(); }

public void updateClicks(int sid){
Connection connection = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try{
connection = dataSource.getConnection();

pstmt = connection.prepareStatement(updateClicksQuery);
pstmt.setInt(1, sid );
int updated = pstmt.executeUpdate();
log.info( sponser clicks updated val : +updated); }catch(Exception ex){ 
ex.printStackTrace(); log.error(ex.getMessage()); }finally{ try {if( pstmt != 
null)pstmt.close();} catch (SQLException ex) {ex.printStackTrace();} try {if( 
connection != null)connection.close();} catch (SQLException ex) 
{ex.printStackTrace();} connection = null; pstmt = null; } }

}

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



RE: Connection Leak

2010-11-03 Thread Propes, Barry L
Maybe try adding this, too as an attribute in the Resource tag.

timeBetweenEvictionRunsMillis=-1 

-Original Message-
From: Jason Britton [mailto:jbritto...@gmail.com] 
Sent: Wednesday, November 03, 2010 9:05 AM
To: Tomcat Users List
Subject: Re: Connection Leak

Since you're using an Oracle database - another way to identify areas in your 
code that aren't closing connections.  In the sql below substitute YOURDBUSER 
with the name of the database user your connections connect to your database 
with and YOURWEBSERVER with the name of your webserver.  The results of the sql 
query will give you the last executed sql for each of the open connections.  
Then search your code for where this sql is being executed and double check you 
are closing the connection appropriately.

SELECT username, machine, oc.sql_text, COUNT(*) open_statements FROM v$session 
vs, v$open_cursor oc WHERE username = 'YOURDBUSER' AND machine = 
'YOURWEBSERVER' AND oc.sid = vs.sid GROUP BY username, machine, oc.sql_text 
ORDER BY open_statements DESC



On Wed, Nov 3, 2010 at 6:44 AM, Ziggy zigg...@gmail.com wrote:

 Hi All,

 Resource name=myConn auth=Container
  type=javax.sql.DataSource
 driverClassName=oracle.jdbc.driver.OracleDriver
  url=jdbc:oracle:thin:@10.10.10.10.:1521:mydb
  username=username password=password maxActive=500
 maxIdle=50
  maxWait=-1 removeAbandoned=true
 removeAbandonedTimeout=60 logAbandoned=true
 accessToUnderlyingConnectionAllowed=true
 /

 I am trying to find out areas of the application where connections are 
 NOT being closed. I added the removeAbandoned and logAbandoned clauses 
 in my context file but if i check v$session on oracle it is still 
 showing the same number of connections active even after 60 seconds. 
 Is there something wrong in the configuration above?


 How exactly does it abandone the connections? what triggers it?


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



RE: Connection Leak

2010-11-03 Thread Propes, Barry L
I had a bit of a leak, and it stopped them...actually an error coupled with a 
leak.

You might check with some of the other users -- I think they've recommended 
Lamda Probe and some other tools to track down leaks.

-Original Message-
From: Ziggy [mailto:zigg...@gmail.com] 
Sent: Wednesday, November 03, 2010 11:19 AM
To: Tomcat Users List
Subject: Re: Connection Leak

Does that show cached queries?



On Wed, Nov 3, 2010 at 4:02 PM, Propes, Barry L barry.l.pro...@citi.comwrote:

 Maybe try adding this, too as an attribute in the Resource tag.

 timeBetweenEvictionRunsMillis=-1

 -Original Message-
 From: Jason Britton [mailto:jbritto...@gmail.com]
 Sent: Wednesday, November 03, 2010 9:05 AM
 To: Tomcat Users List
 Subject: Re: Connection Leak

 Since you're using an Oracle database - another way to identify areas 
 in your code that aren't closing connections.  In the sql below 
 substitute YOURDBUSER with the name of the database user your 
 connections connect to your database with and YOURWEBSERVER with the 
 name of your webserver.  The results of the sql query will give you 
 the last executed sql for each of the open connections.  Then search 
 your code for where this sql is being executed and double check you are 
 closing the connection appropriately.

 SELECT username, machine, oc.sql_text, COUNT(*) open_statements FROM 
 v$session vs, v$open_cursor oc WHERE username = 'YOURDBUSER' AND 
 machine = 'YOURWEBSERVER' AND oc.sid = vs.sid GROUP BY username, 
 machine, oc.sql_text ORDER BY open_statements DESC



 On Wed, Nov 3, 2010 at 6:44 AM, Ziggy zigg...@gmail.com wrote:

  Hi All,
 
  Resource name=myConn auth=Container
   type=javax.sql.DataSource
  driverClassName=oracle.jdbc.driver.OracleDriver
   url=jdbc:oracle:thin:@10.10.10.10.:1521:mydb
   username=username password=password maxActive=500
  maxIdle=50
   maxWait=-1 removeAbandoned=true
  removeAbandonedTimeout=60 logAbandoned=true
  accessToUnderlyingConnectionAllowed=true
  /
 
  I am trying to find out areas of the application where connections 
  are NOT being closed. I added the removeAbandoned and logAbandoned 
  clauses in my context file but if i check v$session on oracle it is 
  still showing the same number of connections active even after 60 seconds.
  Is there something wrong in the configuration above?
 
 
  How exactly does it abandone the connections? what triggers it?
 

 -
 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 manager

2010-10-26 Thread Propes, Barry L
Hello all, running Tomcat 6.0.26 on jdk1.6.0_18 on a Win XP Pro box.

I think I'd asked before, but can't find reference to a fix here.

Issue is I'm trying to alter the context.xml file within the manager webapp 
folder, for an IP restriction with the RemoteAddrValve, like so.

In webapps/manager/META-INF/context.xml:
!-- Valve added to prevent access to this webapp from public computers 
--
Context antiResourceLocking=false debug=0 privileged=true
Valve className=org.apache.catalina.valves.RemoteAddrValve 
allow=100\.111\.111\.23 /
/Context

In trying to overwrite the current setting to allow for the filter, do I need 
to delete the manager.xml file in Tomcat\conf\Catalina\localhost ?
Doing so doesn't allow the manager.xml file to be recreated, upon starting and 
stopping the Tomcat service, unlike other webapp context.xml files.

Shouldn't it do so? My other context.xml file (from 
tomcat\webapps\webapp1\META-INF\context.xml recreates webapp1.xml file in the 
Catalina\localhost folder upon being deleted, and then restarting the service. 
But not the manager.xml file.

Please advise to if I'm doing something incorrectly here or need to supply more 
information.

Thanks,

Barry

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



RE: Tomcat manager

2010-10-26 Thread Propes, Barry L
Ok, so it ( webapps/manager/META-INF/context.xml) doesn't necessarily get 
copied out to the Catalina folder then? Is that correct?

I mean, upon stopping the Tomcat service, and restarting it? Am I understanding 
that correctly?

I hope I'm understanding you correctly.

Thanks, Chuck.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, October 26, 2010 1:18 PM
To: Tomcat Users List
Subject: RE: Tomcat manager

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: Tomcat manager

 In trying to overwrite the current setting to allow for the filter, do
 I need to delete the manager.xml file in
 Tomcat\conf\Catalina\localhost ?

Yes.

 Doing so doesn't allow the manager.xml file to be recreated, upon
 starting and stopping the Tomcat service, unlike other webapp
 context.xml files.

I don't remember the rules for when the Context element is copied, but as 
long as either conf/Catalina/[host]/manager.xml doesn't exist or is an exact 
copy of webapps/manager/META-INF/context.xml, it will be fine.

 - 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: Tomcat manager

2010-10-26 Thread Propes, Barry L
Ok, thanks, Chuck!

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, October 26, 2010 1:42 PM
To: Tomcat Users List
Subject: RE: Tomcat manager

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: Tomcat manager

 Ok, so it ( webapps/manager/META-INF/context.xml) doesn't necessarily
 get copied out to the Catalina folder then?

Correct.  The rules for when Tomcat chooses to copy the Context element have 
changed over time; the current 6.0 doc says If the web application is packaged 
as a WAR then /META-INF/context.xml will be copied to 
$CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to match the 
application's context path.

 - 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: javax.naming.NamingException: Cannot create resource instance

2010-10-21 Thread Propes, Barry L
Not sure, but I don't think you need all those attributes separated like that.

 In TC4 you had to do that -- but not so after 5.0, or at least 5.5

And on top of that, you've got two ResourceLink name attributes pointing to the 
same class with different names.

Not sure, but is that allowed?

-Original Message-
From: Aparna1 V [mailto:aparna...@tcs.com]
Sent: Thursday, October 21, 2010 10:25 AM
To: users@tomcat.apache.org
Subject: javax.naming.NamingException: Cannot create resource instance


ResourceLink name=jdbc/sql_2005 global=jdbc/sql_2005
type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/
ResourceLink name=jdbc/global05 global=jdbc/global05
type=com.microsoft.pool.PoolDataSource/
ResourceLink name=jdbc/sql_05 global=jdbc/sql_05
type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/
ResourceLink name=jdbc/fbrae05 global=jdbc/fbrae05
type=com.microsoft.pool.PoolDataSource/
/Context

  /Host

I am getting the following error:


PoolName = 2005pool PoolJndiRef = jdbc/global05
Init Param: jdbc/global05
javax.naming.NamingException: Cannot create resource instance
 at

Please advise as to what could be wrong since im using the server.xml that
i was using with the tomcat 4.

Thanks,
Aparna


=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you



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



RE: javax.naming.NamingException: Cannot create resource instance

2010-10-21 Thread Propes, Barry L
I know it's allowed in TC 4. I was saying not allowed in 5, or after 5.0 or 5.5.

-Original Message-
From: Aparna1 V [mailto:aparna...@tcs.com]
Sent: Thursday, October 21, 2010 10:55 AM
To: Tomcat Users List
Subject: RE: javax.naming.NamingException: Cannot create resource instance

Hi Barry,

 That is allowed in TC 4.



From:
Propes, Barry L  barry.l.pro...@citi.com
To:
Tomcat Users List users@tomcat.apache.org
Date:
10/21/2010 09:21 PM
Subject:
RE: javax.naming.NamingException: Cannot create resource instance



Not sure, but I don't think you need all those attributes separated like that.

 In TC4 you had to do that -- but not so after 5.0, or at least 5.5

And on top of that, you've got two ResourceLink name attributes pointing to the 
same class with different names.

Not sure, but is that allowed?

-Original Message-
From: Aparna1 V [mailto:aparna...@tcs.com]
Sent: Thursday, October 21, 2010 10:25 AM
To: users@tomcat.apache.org
Subject: javax.naming.NamingException: Cannot create resource instance


ResourceLink name=jdbc/sql_2005 global=jdbc/sql_2005
type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/
ResourceLink name=jdbc/global05 global=jdbc/global05
type=com.microsoft.pool.PoolDataSource/
ResourceLink name=jdbc/sql_05 global=jdbc/sql_05
type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/
ResourceLink name=jdbc/fbrae05 global=jdbc/fbrae05
type=com.microsoft.pool.PoolDataSource/
/Context

  /Host

I am getting the following error:


PoolName = 2005pool PoolJndiRef = jdbc/global05 Init Param: jdbc/global05
javax.naming.NamingException: Cannot create resource instance
 at

Please advise as to what could be wrong since im using the server.xml that i 
was using with the tomcat 4.

Thanks,
Aparna


=-=-=
Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information. If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited. If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments. Thank you



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



=-=-=
Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information. If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited. If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments. Thank you



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



RE: clear text keystore password in server.xml

2010-08-27 Thread Propes, Barry L
I was told by my company we're not supposed to have passwords stored in clear 
text. I explained to them the architecture of Tomcat, and didn't get a clear 
answer on whether or not it's ok, though I think it is.

I don't know what kind  of DB you're using, Vijay, but the Oracle DBA told me 
he could open the wallet, I could reference in my server.xml file the OCI 
driver reference instead of thin driver, and omit using the password, as it 
would be encrypted in the DB column, then decrypted when called.

I have not yet tried this out, but am thinking about going down that road.

What DB are you using, and is this an option for you?

-Original Message-
From: Vijay [mailto:amirisetty.vijayaragha...@gmail.com]
Sent: Friday, August 27, 2010 7:20 AM
To: Tomcat Users List
Subject: Re: clear text keystore password in server.xml

Hi Mark,
I guess I am getting the point you are trying to make .. As long as 
the password or (the encrypted password and the secret key) are present at some 
location (file system / database/ etc) .. there is a security gap ..
I agree with this ..

This said, I am trying to find a way to get tomcat work with an encrypted 
password. [given the fact there is no way anyone can get to the  secret key for 
decrypting the password]

Thanks!
Vijay


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



RE: DB configuration and socket error

2010-08-13 Thread Propes, Barry L
I will send that on shortly, but if I'm just trying to pass basic params (for 
the DB conn) through the JSP, wouldn't it be ignoring the context.xml info?
If I'm not referencing it? (I commented it out for the short term).

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, August 13, 2010 3:14 PM
To: Tomcat Users List
Subject: RE: DB configuration and socket error

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: DB configuration and socket error

 I'm trying to connect to a second one (different context info and
 credentials) in the midwest.

 Regions aside, for simple connectivity testing purposes at the moment,
 I'm not worrying about the context.xml info - I'll address that later.

What's in your webapp's Context element (or rather the nested Resource 
element therein) may well be the problem.  Post that, and we'll see if we can 
help.

 - 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 configuration and socket error

2010-08-13 Thread Propes, Barry L
I also did a thread dump with some info -- should I include that in a reply?



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, August 13, 2010 3:43 PM
To: Tomcat Users List
Subject: RE: DB configuration and socket error

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB configuration and socket error

 I will send that on shortly, but if I'm just trying to pass basic
 params (for the DB conn) through the JSP, wouldn't it be ignoring the
 context.xml info?

There's clearly an attempt to establish a connection to the DB; if the 
credentials or other attributes are incorrect, the attempt will fail - that's 
what we're seeing in the stack trace.  What's triggering the connection attempt 
is visible in the stack trace.

 - 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 configuration and socket error

2010-08-13 Thread Propes, Barry L
Yeah, sorry, Chris...it probably is moreso Oracle related in nature than 
Tomcat. I just thought I'd make sure about that before I addressed it with the 
one set of Oracle personnel in the midwest location.

I'm hardly an Oracle expert, but the only difference to my knowledge on these 
two different servers is that one is on an HP Solaris and the other running on 
an IBM AIX, I think it is.

They have different types of auditing software, but nothing that should 
specifically inhibit connectivity like this.

I'll try to address it on Oracle's forum and see if anyone can shed light on 
the 12505 error.

Thanks!



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Friday, August 13, 2010 4:28 PM
To: Tomcat Users List
Subject: Re: DB configuration and socket error

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 8/13/2010 4:07 PM, Propes, Barry L wrote:
 ug 13, 2010 2:58:03 PM org.apache.catalina.core.StandardWrapperValve
 invoke
 SEVERE: Servlet.service() for servlet jsp threw exception
 java.sql.SQLException: Io exception: Connection
 refused(DESCRIPTION=(TMP=)(VSNNUM=169870336)(ERR=12505)(ERROR_STACK=(E
 RROR=(CODE=12505)(EMFI=4

Does Oracle have any information on what error 12505 means?

If you're calling DriverManager.getConnection() and passing a URL plus username 
and password, then Tomcat has nothing at all to do with this, unless you're 
running under a SecurityManager, in which case you'd be getting 
SecurityExceptions also.

That doesn't necessarily mean we can't help. It just makes it off-topic ;)

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

iEYEARECAAYFAkxluPkACgkQ9CaO5/Lv0PApbQCfUoCMQXlVedNxRBPPGA8pbADO
jgIAoJu3c/4nMjWFCgO8/rIXRaXQvZwt
=efLQ
-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 configuration and socket error

2010-08-13 Thread Propes, Barry L
BTW, Chris, I did happen to be calling DriverManager.getConnection() passing 
the user/pwd params -- in this instance.

And 12505, according to the Oracle forums, seems to be some kind of listener 
problem.

I had reckoned that the problem might be with their (the midwest center's) 
Oracle server's ports, and what its server would allow, or be listening to. 
Seemed to make sense to me since I could get an ODBC conn via MS Acces and that 
Ora driver, as well as TNSPING it from the machine in question making the call.

I'm likely going off topic greatly with this, so forgive me if that's the case, 
but if anyone can affirm this, that's also very helpful.

Thanks, folks!

Barry

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Friday, August 13, 2010 4:28 PM
To: Tomcat Users List
Subject: Re: DB configuration and socket error

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 8/13/2010 4:07 PM, Propes, Barry L wrote:
 ug 13, 2010 2:58:03 PM org.apache.catalina.core.StandardWrapperValve
 invoke
 SEVERE: Servlet.service() for servlet jsp threw exception
 java.sql.SQLException: Io exception: Connection
 refused(DESCRIPTION=(TMP=)(VSNNUM=169870336)(ERR=12505)(ERROR_STACK=(E
 RROR=(CODE=12505)(EMFI=4

Does Oracle have any information on what error 12505 means?

If you're calling DriverManager.getConnection() and passing a URL plus username 
and password, then Tomcat has nothing at all to do with this, unless you're 
running under a SecurityManager, in which case you'd be getting 
SecurityExceptions also.

That doesn't necessarily mean we can't help. It just makes it off-topic ;)

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

iEYEARECAAYFAkxluPkACgkQ9CaO5/Lv0PApbQCfUoCMQXlVedNxRBPPGA8pbADO
jgIAoJu3c/4nMjWFCgO8/rIXRaXQvZwt
=efLQ
-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: Tomcat 6.0.18/ IIS 6.0 /SSL

2010-08-06 Thread Propes, Barry L
I had this same issue at my workplace, and was actually able to strong arm them 
and force them to let me use 6.0.26! : )

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, August 06, 2010 10:40 AM
To: Tomcat Users List
Subject: RE: Tomcat 6.0.18/ IIS 6.0 /SSL

 From: Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
 [mailto:jason.t.hansel@navy.mil]
 Subject: RE: Tomcat 6.0.18/ IIS 6.0 /SSL

 Well I'd like to but 6.0.18 is the most recent version approved on our
 network.

You might want the powers that be to review the fixes that have gone in over 
the last two years - including some significant security-related ones.  6.0.18 
is rather sadly out of date.

 - 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: Tomcat 6.0.18/ IIS 6.0 /SSL

2010-08-06 Thread Propes, Barry L
Alright!

-Original Message-
From: Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00 
[mailto:jason.t.hansel@navy.mil]
Sent: Friday, August 06, 2010 10:45 AM
To: Tomcat Users List
Subject: RE: Tomcat 6.0.18/ IIS 6.0 /SSL

Well good news, 6.0.28 was JUST approved...WooHOO!!!

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, August 06, 2010 11:40 AM
To: Tomcat Users List
Subject: RE: Tomcat 6.0.18/ IIS 6.0 /SSL

 From: Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
 [mailto:jason.t.hansel@navy.mil]
 Subject: RE: Tomcat 6.0.18/ IIS 6.0 /SSL

 Well I'd like to but 6.0.18 is the most recent version approved on our
 network.

You might want the powers that be to review the fixes that have gone in over 
the last two years - including some significant security-related ones.
6.0.18 is rather sadly out of date.

 - 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: Connecting Tomcat to a database

2010-07-09 Thread Propes, Barry L
 Not totally sure if this matters, maybe it doesn't, but I notice this line on 
the error:

Failed to resolved external DataSource at java :comp/env/jdbc/TestDB.

I have a similar reference, while using Oracle, but reference as

Context envCtx = (Context) initCtx.lookup(java:comp/env);   
no space.yours has a space.

Maybe the space would cause an error?



-Original Message-
From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
Sent: Friday, July 09, 2010 2:02 AM
To: Tomcat Users List
Subject: Re: Connecting Tomcat to a database

Hi.

Am 08.07.2010 23:36, schrieb Caldarale, Charles R:
 From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
 Subject: Re: Connecting Tomcat to a database

 Sorry was in a haste, forgot much more than this. :-/
 - Tomcat 7.0.0
 - Java 1.6 Update 20
 - Windows XP SP3
 - Wanted to use DB for Apache ODE 2.0 Beta

 That's how it was shown here:
 http://ode.apache.org/war-deployment.html

 Most unfortunate that they're suggesting very, very out of date practices.  
 Put the MySQL JDBC driver in Tomcat's lib directory, not common/lib (that was 
 changed quite some time ago).  Place the followingContext  element in 
 webapps/ode/META-INF/context.xml:

 Context reloadable=true crossContext=true
Resource name=jdbc/ODEDB auth=Container type=javax.sql.DataSource
  maxActive=100 maxIdle=30 maxWait=1
  username=root password= 
 driverClassName=com.mysql.jdbc.Driver

 url=jdbc:mysql://localhost:3306/ode?autoReconnect=true/
 /Context

I did and modified it to my database:


?xml version=1.0 encoding=UTF-8?
Context reloadable=true crossContext=true
   Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
 maxActive=100 maxIdle=30 maxWait=1
 username=test_dab password=moep
driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://mysqlhost.uni-koblenz.de:3306/TestDB?autoReconnect=true/
/Context


I also edited ode-axis2.properties to


ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/TestDB


after this, I get the this error log:


09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
09.07.2010 08:59:04 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
ra ndom [true].
09.07.2010 08:59:05 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1235 ms 09.07.2010 08:59:05 
org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
09.07.2010 08:59:05 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0 09.07.2010 08:59:05 
org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ode.war DEBUG - GeronimoLog.debug(66) | 
Loading properties DEBUG - GeronimoLog.debug(66) | Initializing transaction 
manager DEBUG - GeronimoLog.debug(66) | Initializing transaction manager using 
org.apach e.ode.il.EmbeddedGeronimoFactory DEBUG - GeronimoLog.debug(66) | 
Creating data source.
ERROR - GeronimoLog.error(108) | Failed to resolved external DataSource at 
java :comp/env/jdbc/TestDB.
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
 at org.apache.naming.NamingContext.lookup(NamingContext.java:774)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:144)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:785)
 at org.apache.naming.NamingContext.lookup(NamingContext.java:157)
 at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
 at javax.naming.InitialContext.lookup(InitialContext.java:392)
 at
org.apache.ode.il.dbutil.Database.lookupInJndi(Database.java:244)
 at
org.apache.ode.il.dbutil.Database.initExternalDb(Database.java:159)
 at
org.apache.ode.il.dbutil.Database.initDataSource(Database.java:144)
 at org.apache.ode.il.dbutil.Database.start(Database.java:99)
 at
org.apache.ode.axis2.ODEServer.initDataSource(ODEServer.java:218)
 at org.apache.ode.axis2.ODEServer.init(ODEServer.java:157)
 at org.apache.ode.axis2.ODEServer.init(ODEServer.java:116)
 at
org.apache.ode.axis2.hooks.ODEAxisServlet.init(ODEAxisServlet.java:53
)
 at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.
java:1164)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1118)
 at

RE: HTTP Status 400 - Invalid direct reference to form login page!

2010-06-03 Thread Propes, Barry L
I had that happen periodically for years with my version of TC 4.1.31.

With some folks, we could get it to go away, by cleaning out browser cache. 
With others, it was the same people that incurred it all the time. They could 
access other protected areas, but not the one.
I ended up making a duplicate non-protected piece for them. For me it wasn't a 
big deal, because they already were -- in a sense -- in a protected piece to 
begin with. But it would have been better if it'd worked. 

-Original Message-
From: Gheorghe Pucea [mailto:george.pu...@gmail.com] 
Sent: Thursday, June 03, 2010 9:30 AM
To: users@tomcat.apache.org
Subject: HTTP Status 400 - Invalid direct reference to form login page!

Hello,



 I have a problem with my Tomcat instance, I'm using:


Tomcat 6.0.26
Java jdk 1.5.0_17
Windows XP SP3


   I have implemented a JAAS login module for my application and everything 
goes fine except from one thing.

Here are the steps that I am doing:


1)Request a protected resource  - the login form show's up and I enter my 
username and password
2) I get into the application and everything looks fine but when I get back to 
the login page and enter my username/password again I get the message:
(If I refresh the login page immediately when I hit the logout button 
everything goes weel) HTTP Status 400 - Invalid direct reference to form login 
page
--

*type* Status report

*message* *Invalid direct reference to form login page*

*description* *The request sent by the client was syntactically incorrect 
(Invalid direct reference to form login page)*

*
*

*
*

*
*

*Thank you very much!*

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



  1   2   3   4   5   6   7   >