Re: DB Connection error

2012-01-09 Thread Anjib Mulepati

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?


On 1/3/2012 3:33 PM, Propes, Barry L wrote:

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



-
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 Chema
2012/1/9 Anjib Mulepati anji...@hotmail.com:
 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


Can you attach error trace ?

-
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 Anjib Mulepati

com.anjib.exceptions.ICDAOException: Error in your database.
at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:71)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:151)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

at java.lang.Thread.run(Thread.java:619)
Caused by: com.anjib.exceptions.ICDAOException: No more data to read 
from socket

at com.anjib.dao.oracle.Table1DAO.getAll(Table1DAO.java:206)
at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:65)
... 20 more
Caused by: java.sql.SQLRecoverableException: No more data to read from 
socket

at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1142)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1099)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:288)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at 
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
at 
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
at 
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
at 
oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1477)
at 
oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:392)
at 
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)

at com.anjib.dao.oracle.Table1DAO.getAll(Table1DAO.java:197)
... 21 more

On 1/9/2012 10:33 AM, Chema wrote:

2012/1/9 Anjib Mulepatianji...@hotmail.com:

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


Can you attach error trace ?

-
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 Anjib Mulepati

I have following log
com.anjib.exceptions.DAOException: Error in your database.
at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:71)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)

at java.lang.Thread.run(Thread.java:662)
Caused by: com.anjib.exceptions.DAOException: Cannot create 
PoolableConnectionFactory (IO Error: The Network Adapter could not 
establish the connection)

at com.anjib.dao.DAOFactory.createConnection(DAOFactory.java:118)
at com.anjib.dao.oracle.Table1DAO.getAll(Table1DAO.java:195)
at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:65)
... 18 more
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (IO Error: The Network Adapter could not 
establish the connection)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

at com.anjib.dao.DAOFactory.createConnection(DAOFactory.java:116)
... 20 more
Caused by: java.sql.SQLRecoverableException: IO Error: The Network 
Adapter could not establish the connection

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:536)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:228)
at 
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at 
org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)

... 22 more
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
On 1/9/2012 12:03 PM, Propes, Barry L wrote:

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

Re: DB Connection error

2012-01-09 Thread Chema
 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



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 Konstantin Kolinko
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



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-09 Thread Ron McNulty

Hi Anjib

Port 8080 looks very odd. For an Oracle XE database, this is an HTTP 
connection to the database admin console, but you need a TNS connection 
direct to the database.


Try telnet localhost 1521 from the command line. If this connects, you 
probably have a standard Oracle database on its default port.


I would expect something like url=jdbc:oracle:thin:@localhost:1521/XE to 
connect to a local XE installation (the only supported schema name is XE). 
This works fine on my local installation. Else 
url=jdbc:oracle:thin:@localhost:1521/MYDBS if you have a full local Oracle 
installation and MYDBS is the schema name. Note that the double slashes have 
gone in the URL.


You will also need to put a copy of ojdb6.jar in the Tomcat shared libs 
directory.


You can easily test the connection string by using a simple SQL client like 
SQuirrel SQL.


Hope that helps.

Regards

Ron



- Original Message - 
From: Anjib Mulepati anji...@hotmail.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, January 04, 2012 7:26 AM
Subject: Re: DB Connection error



On 1/3/2012 1:12 PM, Chema wrote:

2012/1/3 Anjib Mulepatianji...@hotmail.com:

Hi All,

One simple question If I have JINDI configuration in my application will 
my

application reconnect to the DB whenever my DB gets restart.
I am having DB connection problem every Monday since our DB get 
restarted on

weekends which we don't have control of.
I am using Tomcat 6.0.20

Hi:

can you attach yourResource/  element in server.xml file ( except
sensible data )?


I haven't change anythign in server.xml so i have default in it
GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved

factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
/GlobalNamingResources

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

-
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 Chema
2012/1/3 Anjib Mulepati anji...@hotmail.com:
 Hi All,

 One simple question If I have JINDI configuration in my application will my
 application reconnect to the DB whenever my DB gets restart.
 I am having DB connection problem every Monday since our DB get restarted on
 weekends which we don't have control of.
 I am using Tomcat 6.0.20

Hi:

can you attach your Resource/ element in server.xml file ( except
sensible data )?

-
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 Anjib Mulepati

On 1/3/2012 1:12 PM, Chema wrote:

2012/1/3 Anjib Mulepatianji...@hotmail.com:

Hi All,

One simple question If I have JINDI configuration in my application will my
application reconnect to the DB whenever my DB gets restart.
I am having DB connection problem every Monday since our DB get restarted on
weekends which we don't have control of.
I am using Tomcat 6.0.20

Hi:

can you attach yourResource/  element in server.xml file ( except
sensible data )?


I haven't change anythign in server.xml so i have default in it
GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
/GlobalNamingResources

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

-
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 Chema
 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;. I'v never used it but you can test it
And take a look at http://commons.apache.org/dbcp/configuration.html

If you can send us what is the exact error that your web app returns ...

Bye

-
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 Daniel Mikusa
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: 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: DB Connection error

2012-01-03 Thread Chema
 Try adding validationQuery=SELECT 1 FROM DUAL and testOnBorrow=true.

testOnBorrow is true by default   :-)

-
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 Pid
On 03/01/2012 17:08, Anjib Mulepati wrote:
 Hi All,
 
 One simple question If I have JINDI configuration in my application will
 my application reconnect to the DB whenever my DB gets restart.
 I am having DB connection problem every Monday since our DB get
 restarted on weekends which we don't have control of.
 I am using Tomcat 6.0.20

In addition to the other advice, upgrade your Tomcat: that one is
extremely old.


p


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: DB connection error and broken images while changing webapp context path

2010-08-13 Thread Estanislao Gonzalez

Hi Astghik,

I don't really have a clue on your problem as I think you are creating a 
virtual host within your tomcat installation.


What I do when I want to have myapp at the root directory of server (so 
you access it with http://myip:8080) is to install your application in 
webapps/ROOT instead of webaps/myapp.


But maybe you wanted to achieve something else... In any case I think 
you should check your images are being properly accessed (use firebug or 
something alike) and see if the path being resolved for them make sense 
(note you have set www.myip.com as host pointing to myapp, localhost 
won't work as expected as it still points at webapps)


Hope this helps... a little mabe :-)

Cheers,
Estani

Astghik wrote:

Hello All.

I have Apache Tomcat 6 server running on Ubuntu 9.10. . I've changed my
application context path http://myip:8080/myapp to http://myip:8080 by
making changes in server.xml.

Engine name=Catalina defaultHost=localhost
Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/
Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Context path= docBase=myapp debug=0/
/Host
Host name=www.myip.com appBase=/var/lib/tomcat6/webapps
Context path= docBase=myapp/
/Host
/Engine

But I got another problem, all images (there are in
/var/lib/tomcat6/webapps/myapp/img dir) are broken and An error occurred:
org.springframework.dao.DataAccessResourceFailureE xception: could not
execute query; nested exception is
org.hibernate.exception.JDBCConnectionException: could not execute query
exception is throwing.

How to fix those problems?

Regards,
Astghik
  



--
Estanislao Gonzalez

Max-Planck-Institut für Meteorologie (MPI-M)
Deutsches Klimarechenzentrum (DKRZ) - German Climate Computing Centre
Room 108 - Bundesstrasse 45a, D-20146 Hamburg, Germany

Phone:   +49 (40) 46 00 94-126
E-Mail:  estanislao.gonza...@zmaw.de


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



Re: DB connection error and broken images while changing webapp context path

2010-08-13 Thread Astghik

And to create virtual host and to set my webapp as root dir. I've done both
of them. But now I have db access problems and images on site don't display.


Estanislao Gonzalez-2 wrote:
 
 Hi Astghik,
 
 I don't really have a clue on your problem as I think you are creating a 
 virtual host within your tomcat installation.
 
 What I do when I want to have myapp at the root directory of server (so 
 you access it with http://myip:8080) is to install your application in 
 webapps/ROOT instead of webaps/myapp.
 
 But maybe you wanted to achieve something else... In any case I think 
 you should check your images are being properly accessed (use firebug or 
 something alike) and see if the path being resolved for them make sense 
 (note you have set www.myip.com as host pointing to myapp, localhost 
 won't work as expected as it still points at webapps)
 
 Hope this helps... a little mabe :-)
 
 Cheers,
 Estani
 
 Astghik wrote:
 Hello All.

 I have Apache Tomcat 6 server running on Ubuntu 9.10. . I've changed my
 application context path http://myip:8080/myapp to http://myip:8080 by
 making changes in server.xml.

 Engine name=Catalina defaultHost=localhost
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
 Host name=localhost appBase=webapps unpackWARs=true
 autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
 Context path= docBase=myapp debug=0/
 /Host
 Host name=www.myip.com appBase=/var/lib/tomcat6/webapps
 Context path= docBase=myapp/
 /Host
 /Engine

 But I got another problem, all images (there are in
 /var/lib/tomcat6/webapps/myapp/img dir) are broken and An error
 occurred:
 org.springframework.dao.DataAccessResourceFailureE xception: could not
 execute query; nested exception is
 org.hibernate.exception.JDBCConnectionException: could not execute query
 exception is throwing.

 How to fix those problems?

 Regards,
 Astghik
   
 
 
 -- 
 Estanislao Gonzalez
 
 Max-Planck-Institut für Meteorologie (MPI-M)
 Deutsches Klimarechenzentrum (DKRZ) - German Climate Computing Centre
 Room 108 - Bundesstrasse 45a, D-20146 Hamburg, Germany
 
 Phone:   +49 (40) 46 00 94-126
 E-Mail:  estanislao.gonza...@zmaw.de
 
 
 -
 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/DB-connection-error-and-broken-images-while-changing-webapp-context-path-tp29427611p29428028.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: DB connection error and broken images while changing webapp context path

2010-08-13 Thread David Smith
HI Astghik

1. Don't put Context ... / elements in server.xml.  They should go
into files named ROOT.xml in /etc/tomcat6/Catalina/localhost and
/etc/tomcat6/Catalina/www.myip.com.  While your at it, drop the docbase
and path attributes ... they aren't needed when the Context element is
in it's own xml file.

2. Rename myapp in /var/lib/tomcat6/webapps from myapp to ROOT.  ROOT is
a special name for the default webapp and defined in the servlet spec. 
Between this and the first suggestion, both localhost and www.myip.com
should be showing your myapp webapp as the default webapp (no /myapp
in the url).

3. Don't point two host elements at the same appBase.  Either have two
separate appbases, one for each host and keep two copies of the webapp
or use an Alias element and have only one Host ... element.  See
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html for more
information on the Alias directive.

4. I don't see anything here that has any impact on database
connectivity ... actually don't see any database configuration here at
all.  Could you include some info on your hibernate setup for myapp?

--David

On 8/13/10 7:03 AM, Astghik wrote:
 Hello All.

 I have Apache Tomcat 6 server running on Ubuntu 9.10. . I've changed my
 application context path http://myip:8080/myapp to http://myip:8080 by
 making changes in server.xml.

 Engine name=Catalina defaultHost=localhost
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/
 Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
 Context path= docBase=myapp debug=0/
 /Host
 Host name=www.myip.com appBase=/var/lib/tomcat6/webapps
 Context path= docBase=myapp/
 /Host
 /Engine

 But I got another problem, all images (there are in
 /var/lib/tomcat6/webapps/myapp/img dir) are broken and An error occurred:
 org.springframework.dao.DataAccessResourceFailureE xception: could not
 execute query; nested exception is
 org.hibernate.exception.JDBCConnectionException: could not execute query
 exception is throwing.

 How to fix those problems?

 Regards,
 Astghik
   


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



Re: DB connection error and broken images while changing webapp context path

2010-08-13 Thread Mark Eggers
Astghik,


As has already been pointed out:

1. Don't put Context elements in server.xml - use either:
   a. META-INF/context.xml in your web application
   b. $CATALINA_HOME/conf/Catalina/[hostname]/[application].xml

2. Don't use docBase in your Context element. Tomcat will figure that out

3. Don't use subdirectories of one appBase as the appBase for another host - 
this will probably get you double deployment.

If you want your application to be known as both http://localhost:8080/ and 
http://my.ip.com:8080/ then you can do the following:

1. Rename your war file ROOT.war. This is the name used for the root application
2. Add an Alias element to your original Host element - something like this:

Host name=localhost  appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Aliasmy.ip.com/Alias
/Host

From your path statements, it looks like you're using the default 
Ubuntu-distributed Tomcat (and maybe OpenJDK)? This has led to some problems in 
the past. I recommend downloading the latest tar.gz of Tomcat 6 (6.0.29) from 
tomcat.apache.org, and the latest version of Java (1.6.0_21) from Oracle/Sun 
for 
your platform.

If you're having trouble getting Hibernate to work with Tomcat, and especially 
Tomcat's database connection pooling, you might want to see the following Wiki 
article:

http://wiki.apache.org/tomcat/TomcatHibernate

If you really are interested in virtual hosts rather than just an Alias, then 
you might want to see the following Wiki article:

http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts

Once you get all of this digested, then post your information (Tomcat server 
version - complete with minor revision numbers, JRE version, OS, server.xml 
with 
no comments and sensitive info blanked out, web.xml from your application, 
hibernate.cfg.xml, Spring configuration files, and where your images are 
located 
in your web application structure) if you're still stuck.

Hope this helps.

. . . . just my two cents.

/mde/


- Original Message 
From: Astghik mkrtch@mail.ru
To: users@tomcat.apache.org
Sent: Fri, August 13, 2010 4:03:43 AM
Subject: DB connection error and broken images while changing webapp context 
path


Hello All.

I have Apache Tomcat 6 server running on Ubuntu 9.10. . I've changed my
application context path http://myip:8080/myapp to http://myip:8080 by
making changes in server.xml.

Engine name=Catalina defaultHost=localhost
Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/
Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Context path= docBase=myapp debug=0/
/Host
Host name=www.myip.com appBase=/var/lib/tomcat6/webapps
Context path= docBase=myapp/
/Host
/Engine

But I got another problem, all images (there are in
/var/lib/tomcat6/webapps/myapp/img dir) are broken and An error occurred:
org.springframework.dao.DataAccessResourceFailureE xception: could not
execute query; nested exception is
org.hibernate.exception.JDBCConnectionException: could not execute query
exception is throwing.

How to fix those problems?

Regards,
Astghik


  


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



RE: DB connection error -Tomcat 6 config

2010-04-16 Thread Propes, Barry L
Mark, got the profiler downloaded and going.

Looking at the link below I see reference to one other link, 
https://issues.apache.org/bugzilla/show_bug.cgi?id=48837, which seems to reveal 
the core of my problem.

Konstantin has some instructions on there I'll try implementing and see if it 
helps address the matter.

Thanks,

Barry

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, March 26, 2010 2:25 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On 26/03/2010 19:22, Propes, Barry L wrote:
 Mark -- looked for that and got this message:
 
 Your search query TimerThread didn't return any results. Please change some 
 terms and refer to HelpOnSearching for more information.

Sorry - should have been clearer - just look for that text on the page.
 
 I'll see about downloading and implementing the profiler. 
 
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Tuesday, March 23, 2010 5:54 PM
 To: Tomcat Users List
 Subject: Re: DB connection error -Tomcat 6 config
 
 On 23/03/2010 22:39, Propes, Barry L wrote:
 I got this again today, and it seems to happen when/if I go into the Tomcat 
 Manager app and  either Stop and Start or Reload the app.

 Should that have a significant bearing on something like a DBCP connection 
 so adversely?

 I was thinking it was tantamount to shutting down the Tomcat console and 
 restarting itthat not the case?
 No. It just re-loads the app.
 
 Sounds like you have hit a bug in commons-pool / Tomcat's memory leak 
 clean-up code.
 
 http://wiki.apache.org/tomcat/MemoryLeakProtection
 search for TimerThread
 
 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
 




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


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



Re: DB connection error -Tomcat 6 config

2010-04-16 Thread Konstantin Kolinko
2010/4/17 Propes, Barry L barry.l.pro...@citi.com:
 Mark, got the profiler downloaded and going.

 Looking at the link below I see reference to one other link, 
 https://issues.apache.org/bugzilla/show_bug.cgi?id=48837, which seems to 
 reveal the core of my problem.

 Konstantin has some instructions on there I'll try implementing and see if it 
 helps address the matter.

 Thanks,

 Barry


 Sounds like you have hit a bug in commons-pool / Tomcat's memory leak 
 clean-up code.

 http://wiki.apache.org/tomcat/MemoryLeakProtection
 search for TimerThread



Probably you meant
https://issues.apache.org/bugzilla/show_bug.cgi?id=48971#c5

When the reply goes above the original question (aka top-posting),
it is usually hard to read.

Best regards,
Konstantin Kolinko

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



RE: DB connection error -Tomcat 6 config

2010-04-16 Thread Propes, Barry L
Yes, that one, as well.

Thanks, Konstantin. Sorry about that. 

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Friday, April 16, 2010 5:14 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

2010/4/17 Propes, Barry L barry.l.pro...@citi.com:
 Mark, got the profiler downloaded and going.

 Looking at the link below I see reference to one other link, 
 https://issues.apache.org/bugzilla/show_bug.cgi?id=48837, which seems to 
 reveal the core of my problem.

 Konstantin has some instructions on there I'll try implementing and see if it 
 helps address the matter.

 Thanks,

 Barry


 Sounds like you have hit a bug in commons-pool / Tomcat's memory leak 
 clean-up code.

 http://wiki.apache.org/tomcat/MemoryLeakProtection
 search for TimerThread



Probably you meant
https://issues.apache.org/bugzilla/show_bug.cgi?id=48971#c5

When the reply goes above the original question (aka top-posting), it is 
usually hard to read.

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 -Tomcat 6 config

2010-03-26 Thread Propes, Barry L
Mark -- looked for that and got this message:

Your search query TimerThread didn't return any results. Please change some 
terms and refer to HelpOnSearching for more information.

I'll see about downloading and implementing the profiler. 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Tuesday, March 23, 2010 5:54 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On 23/03/2010 22:39, Propes, Barry L wrote:
 I got this again today, and it seems to happen when/if I go into the Tomcat 
 Manager app and  either Stop and Start or Reload the app.
 
 Should that have a significant bearing on something like a DBCP connection so 
 adversely?
 
 I was thinking it was tantamount to shutting down the Tomcat console and 
 restarting itthat not the case?
No. It just re-loads the app.

Sounds like you have hit a bug in commons-pool / Tomcat's memory leak clean-up 
code.

http://wiki.apache.org/tomcat/MemoryLeakProtection
search for TimerThread

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: DB connection error -Tomcat 6 config

2010-03-26 Thread Mark Thomas
On 26/03/2010 19:22, Propes, Barry L wrote:
 Mark -- looked for that and got this message:
 
 Your search query TimerThread didn't return any results. Please change some 
 terms and refer to HelpOnSearching for more information.

Sorry - should have been clearer - just look for that text on the page.
 
 I'll see about downloading and implementing the profiler. 
 
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org] 
 Sent: Tuesday, March 23, 2010 5:54 PM
 To: Tomcat Users List
 Subject: Re: DB connection error -Tomcat 6 config
 
 On 23/03/2010 22:39, Propes, Barry L wrote:
 I got this again today, and it seems to happen when/if I go into the Tomcat 
 Manager app and  either Stop and Start or Reload the app.

 Should that have a significant bearing on something like a DBCP connection 
 so adversely?

 I was thinking it was tantamount to shutting down the Tomcat console and 
 restarting itthat not the case?
 No. It just re-loads the app.
 
 Sounds like you have hit a bug in commons-pool / Tomcat's memory leak 
 clean-up code.
 
 http://wiki.apache.org/tomcat/MemoryLeakProtection
 search for TimerThread
 
 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
 




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



RE: DB connection error -Tomcat 6 config

2010-03-26 Thread Propes, Barry L
Ok -- FWIW, I'm also going to attach a small snippet from the logs to see if 
that sheds any light on the situation..

I'm also having an issue with a child directory and contents being seen. 
Getting 404 errors from this, even though the contents are unequivocally there.
Not certain that the two problems are related or not.




Mar 26, 2010 12:37:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3697 ms
Mar 26, 2010 12:40:19 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Mar 26, 2010 12:40:19 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesStopTimerThread
SEVERE: A web application appears to have started a TimerThread named [Timer-0] 
via the java.util.Timer API but has failed to stop it. 

To prevent a memory leak, the timer (and hence the associated thread) has been 
forcibly cancelled. 

Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig 
validateSecurityRoles
INFO: WARNING: Security role name service used in an auth-constraint without 
being defined in a security-role
Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig 
validateSecurityRoles
INFO: WARNING: Security role name admin used in an auth-constraint without 
being defined in a security-role
Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig 
validateSecurityRoles
INFO: WARNING: Security role name comply used in an auth-constraint without 
being defined in a security-role
Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig 
validateSecurityRoles 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, March 26, 2010 2:25 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On 26/03/2010 19:22, Propes, Barry L wrote:
 Mark -- looked for that and got this message:
 
 Your search query TimerThread didn't return any results. Please change some 
 terms and refer to HelpOnSearching for more information.

Sorry - should have been clearer - just look for that text on the page.
 
 I'll see about downloading and implementing the profiler. 
 
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Tuesday, March 23, 2010 5:54 PM
 To: Tomcat Users List
 Subject: Re: DB connection error -Tomcat 6 config
 
 On 23/03/2010 22:39, Propes, Barry L wrote:
 I got this again today, and it seems to happen when/if I go into the Tomcat 
 Manager app and  either Stop and Start or Reload the app.

 Should that have a significant bearing on something like a DBCP connection 
 so adversely?

 I was thinking it was tantamount to shutting down the Tomcat console and 
 restarting itthat not the case?
 No. It just re-loads the app.
 
 Sounds like you have hit a bug in commons-pool / Tomcat's memory leak 
 clean-up code.
 
 http://wiki.apache.org/tomcat/MemoryLeakProtection
 search for TimerThread
 
 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
 




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


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



RE: DB connection error -Tomcat 6 config

2010-03-26 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 I'm also having an issue with a child directory and contents being
 seen. Getting 404 errors from this, even though the contents are
 unequivocally there.

Note that client requests are for URLs, not directories; what the URL maps to 
may or may not have anything to do with how things are laid out in the server's 
file system.  You'll need to post specifics: the URL, the webapp's 
WEB-INF/web.xml, and the actual deployed file structure.  Also, check that the 
Tomcat userid has access to the directories of interest.

 Mar 26, 2010 12:40:19 PM org.apache.catalina.loader.WebappClassLoader
 clearReferencesStopTimerThread
 SEVERE: A web application appears to have started a TimerThread named
 [Timer-0] via the java.util.Timer API but has failed to stop it.

That doesn't necessarily point to the JDBC driver, just that your webapp is 
ill-behaved.

 Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig
 validateSecurityRoles
 INFO: WARNING: Security role name service used in an auth-constraint
 without being defined in a security-role
 Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig
 validateSecurityRoles
 INFO: WARNING: Security role name admin used in an auth-constraint
 without being defined in a security-role
 Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig
 validateSecurityRoles
 INFO: WARNING: Security role name comply used in an auth-constraint
 without being defined in a security-role
 Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig
 validateSecurityRoles

The above indicates that the WEB-INF/web.xml for the webapp is incomplete; read 
the servlet spec.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-24 Thread Propes, Barry L
Thanks, Mark -- I'll shake down that thread here in a bit. 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Tuesday, March 23, 2010 5:54 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On 23/03/2010 22:39, Propes, Barry L wrote:
 I got this again today, and it seems to happen when/if I go into the Tomcat 
 Manager app and  either Stop and Start or Reload the app.
 
 Should that have a significant bearing on something like a DBCP connection so 
 adversely?
 
 I was thinking it was tantamount to shutting down the Tomcat console and 
 restarting itthat not the case?
No. It just re-loads the app.

Sounds like you have hit a bug in commons-pool / Tomcat's memory leak clean-up 
code.

http://wiki.apache.org/tomcat/MemoryLeakProtection
search for TimerThread

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: DB connection error -Tomcat 6 config

2010-03-24 Thread Propes, Barry L
Admittedly, this is my first dance with the Tomcat manager app, deploying 
anything. I was, I suppose archaically, arguably, just using the startup and 
shutdown commands at the cmd prompt level.

Although when I ran find memory leaks or whatever that little button reads, 
it did mention my app had some classes that were still being used, which seemed 
odd, but I assume accurate.

Thanks, pid. 

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Tuesday, March 23, 2010 6:16 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On 23/03/2010 22:54, Mark Thomas wrote:
 On 23/03/2010 22:39, Propes, Barry L wrote:
 I got this again today, and it seems to happen when/if I go into the Tomcat 
 Manager app and  either Stop and Start or Reload the app.

 Should that have a significant bearing on something like a DBCP connection 
 so adversely?

 I was thinking it was tantamount to shutting down the Tomcat console and 
 restarting itthat not the case?
 No. It just re-loads the app.

 Sounds like you have hit a bug in commons-pool / Tomcat's memory leak 
 clean-up code.

 http://wiki.apache.org/tomcat/MemoryLeakProtection
 search for TimerThread

 Mark

I've also seen this intermittently with the latest mysql connector/J
(.12) but I'm going to start a new thread for this when I can replicate it, 
because this thread is too big* and it's a slightly different topic.


p


* and every time i see a new post in this thread, my stomach sinks.

 -
 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: DB connection error -Tomcat 6 config

2010-03-24 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Although when I ran find memory leaks or whatever that little button
 reads, it did mention my app had some classes that were still being
 used, which seemed odd, but I assume accurate.

What was the condition of your webapp at that point?  If it had been 
undeployed, there shouldn't be any traces of it left; if there are, you've got 
a leak.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-24 Thread Propes, Barry L
No, I didn't undeploy it at all - I simply stopped, and started it. Then I 
reloaded it.

And/or, if I simply only reloaded it, I got the same error message.

I'm not using a MySQL connector at all, as I noticed Pid had mentioned - only 
Oracle 10g. 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, March 24, 2010 9:45 AM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Although when I ran find memory leaks or whatever that little button 
 reads, it did mention my app had some classes that were still being 
 used, which seemed odd, but I assume accurate.

What was the condition of your webapp at that point?  If it had been 
undeployed, there shouldn't be any traces of it left; if there are, you've got 
a leak.

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-23 Thread Propes, Barry L
I got this again today, and it seems to happen when/if I go into the Tomcat 
Manager app and  either Stop and Start or Reload the app.

Should that have a significant bearing on something like a DBCP connection so 
adversely?

I was thinking it was tantamount to shutting down the Tomcat console and 
restarting itthat not the case?



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, March 19, 2010 4:47 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Weird, thoughnow I'm getting an IllegalStateException: Timer 
 already cancelled.
 
 Wonder what this is? Or what's causing it?

Can't say - I have very little experience with Oracle.  You might want to turn 
on traces in the DB (if you're allowed), or use Wireshark to see what's being 
sent to the DB.

 - Chuck


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


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


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



Re: DB connection error -Tomcat 6 config

2010-03-23 Thread Mark Thomas
On 23/03/2010 22:39, Propes, Barry L wrote:
 I got this again today, and it seems to happen when/if I go into the Tomcat 
 Manager app and  either Stop and Start or Reload the app.
 
 Should that have a significant bearing on something like a DBCP connection so 
 adversely?
 
 I was thinking it was tantamount to shutting down the Tomcat console and 
 restarting itthat not the case?
No. It just re-loads the app.

Sounds like you have hit a bug in commons-pool / Tomcat's memory leak
clean-up code.

http://wiki.apache.org/tomcat/MemoryLeakProtection
search for TimerThread

Mark



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



Re: DB connection error -Tomcat 6 config

2010-03-23 Thread Pid

On 23/03/2010 22:54, Mark Thomas wrote:

On 23/03/2010 22:39, Propes, Barry L wrote:

I got this again today, and it seems to happen when/if I go into the Tomcat 
Manager app and  either Stop and Start or Reload the app.

Should that have a significant bearing on something like a DBCP connection so 
adversely?

I was thinking it was tantamount to shutting down the Tomcat console and 
restarting itthat not the case?

No. It just re-loads the app.

Sounds like you have hit a bug in commons-pool / Tomcat's memory leak
clean-up code.

http://wiki.apache.org/tomcat/MemoryLeakProtection
search for TimerThread

Mark


I've also seen this intermittently with the latest mysql connector/J 
(.12) but I'm going to start a new thread for this when I can replicate 
it, because this thread is too big* and it's a slightly different topic.



p


* and every time i see a new post in this thread, my stomach sinks.


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




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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Well, that's interesting... 

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


And if you remove the factory attribute?

when I remove the I get the following error:
org.apache.jasper.JasperException: An exception occurred processing JSP page 
/chgctrl_details.jsp at line 80

77: DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);
78:   
79: // Allocate and use a connection from the pool
80:  connection = ds.getConnection();
81: 



Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

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


root cause 

javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:949)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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


root cause 

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 
'oracle.jdbc.driver.OracleDriver'

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:151)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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


root cause 

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:151)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)


Double-check that tomcat-dbcp.jar is in Tomcat's lib directory and nowhere 
else, and that the Tomcat userid has at least read access to that jar.  
Might want to do jar -tf tomcat-dbcp.jar to verify that the class 
really is in there (hard to believe it wouldn't be).

 - Chuck

And in doing this, I get this error!!

C:\Program Files\Apache Software Foundation\Tomcat 6.0jar -tf tomcat.dbcp.jar

java.io.FileNotFoundException: tomcat.dbcp.jar (The system cannot find the file
specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:114)
at java.util.zip.ZipFile.init(ZipFile.java:75)
at sun.tools.jar.Main.list(Main.java:979)
at sun.tools.jar.Main.run(Main.java:224)
at sun.tools.jar.Main.main(Main.java:1149)


And it is in the lib folder!



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

Re: DB connection error -Tomcat 6 config

2010-03-19 Thread André Warnier

Propes, Barry L wrote:
...

I may be missing something, but



And in doing this, I get this error!!

C:\Program Files\Apache Software Foundation\Tomcat 6.0jar -tf tomcat.dbcp.jar

java.io.FileNotFoundException: tomcat.dbcp.jar (The system cannot find the file
specified)

...


And it is in the lib folder!

.. precisely. It looks like you are in the folder /above/ lib when you 
issue that command.

Should you not do
cd lib
jar -tf tomcat.dbcp.jar

?

And by the way, a suggestion : re-install your Tomcat in a directory 
without spaces in the path, or you'll be getting yourself in more 
trouble sooner or later.



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



Re: DB connection error -Tomcat 6 config

2010-03-19 Thread Mark Thomas
On 19/03/2010 16:31, André Warnier wrote:
 Propes, Barry L wrote:
 ...
 
 I may be missing something, but
 

 And in doing this, I get this error!!

 C:\Program Files\Apache Software Foundation\Tomcat 6.0jar -tf
 tomcat.dbcp.jar

 java.io.FileNotFoundException: tomcat.dbcp.jar (The system cannot find
 the file
 specified)
 ...

 And it is in the lib folder!

 .. precisely. It looks like you are in the folder /above/ lib when you
 issue that command.
 Should you not do
 cd lib
 jar -tf tomcat.dbcp.jar
 
 ?
 
 And by the way, a suggestion : re-install your Tomcat in a directory
 without spaces in the path, or you'll be getting yourself in more
 trouble sooner or later.

That, and look in the right file. It is tomcat-dbcp.jar, not
tomcat.dbcp.jar

Mark



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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

(Looks like our corporate e-mail filter is removing some of your messages - I 
had to retrieve this from the archive.)

So now we're down to this problem:

 java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

(This really is an improvement.)

Now it looks like the Oracle JDBC jar is in the wrong location - it should be 
in Tomcat's lib directory, nowhere else.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
You're correct in that I initially did the command from the folder 
abovealso tried it from the lib folder after changing directories and got 
the same FileNotFound exception error message.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Friday, March 19, 2010 11:32 AM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

Propes, Barry L wrote:
...

I may be missing something, but

 
 And in doing this, I get this error!!
 
 C:\Program Files\Apache Software Foundation\Tomcat 6.0jar -tf 
 tomcat.dbcp.jar
 
 java.io.FileNotFoundException: tomcat.dbcp.jar (The system cannot find 
 the file
 specified)
...
 
 And it is in the lib folder!
 
.. precisely. It looks like you are in the folder /above/ lib when you issue 
that command.
Should you not do
cd lib
jar -tf tomcat.dbcp.jar

?

And by the way, a suggestion : re-install your Tomcat in a directory without 
spaces in the path, or you'll be getting yourself in more trouble sooner or 
later.


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Thanks.
Yeah, I'd let it default from the installerbig mistake there I'm sure.

I'll kill it off and reinstall elsewhere...

Thanks, guys! 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, March 19, 2010 11:41 AM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On 19/03/2010 16:31, André Warnier wrote:
 Propes, Barry L wrote:
 ...
 
 I may be missing something, but
 

 And in doing this, I get this error!!

 C:\Program Files\Apache Software Foundation\Tomcat 6.0jar -tf 
 tomcat.dbcp.jar

 java.io.FileNotFoundException: tomcat.dbcp.jar (The system cannot 
 find the file
 specified)
 ...

 And it is in the lib folder!

 .. precisely. It looks like you are in the folder /above/ lib when you 
 issue that command.
 Should you not do
 cd lib
 jar -tf tomcat.dbcp.jar
 
 ?
 
 And by the way, a suggestion : re-install your Tomcat in a directory 
 without spaces in the path, or you'll be getting yourself in more 
 trouble sooner or later.

That, and look in the right file. It is tomcat-dbcp.jar, not tomcat.dbcp.jar

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: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
/tomcat/dbcp/pool/ObjectPoolFactory.class
org/apache/tomcat/dbcp/pool/PoolUtils$CheckedKeyedObjectPool.class
org/apache/tomcat/dbcp/pool/PoolUtils$CheckedObjectPool.class
org/apache/tomcat/dbcp/pool/PoolUtils$ErodingFactor.class
org/apache/tomcat/dbcp/pool/PoolUtils$ErodingKeyedObjectPool.class
org/apache/tomcat/dbcp/pool/PoolUtils$ErodingObjectPool.class
org/apache/tomcat/dbcp/pool/PoolUtils$ErodingPerKeyKeyedObjectPool.class
org/apache/tomcat/dbcp/pool/PoolUtils$KeyedObjectPoolAdaptor.class
org/apache/tomcat/dbcp/pool/PoolUtils$KeyedObjectPoolMinIdleTimerTask.class
org/apache/tomcat/dbcp/pool/PoolUtils$KeyedPoolableObjectFactoryAdaptor.class
org/apache/tomcat/dbcp/pool/PoolUtils$ObjectPoolAdaptor.class
org/apache/tomcat/dbcp/pool/PoolUtils$ObjectPoolMinIdleTimerTask.class
org/apache/tomcat/dbcp/pool/PoolUtils$PoolableObjectFactoryAdaptor.class
org/apache/tomcat/dbcp/pool/PoolUtils$SynchronizedKeyedObjectPool.class
org/apache/tomcat/dbcp/pool/PoolUtils$SynchronizedKeyedPoolableObjectFactory.cla
ss
org/apache/tomcat/dbcp/pool/PoolUtils$SynchronizedObjectPool.class
org/apache/tomcat/dbcp/pool/PoolUtils$SynchronizedPoolableObjectFactory.class
org/apache/tomcat/dbcp/pool/PoolUtils.class
org/apache/tomcat/dbcp/pool/PoolableObjectFactory.class
org/apache/tomcat/dbcp/pool/impl/
org/apache/tomcat/dbcp/pool/impl/CursorableLinkedList$Cursor.class
org/apache/tomcat/dbcp/pool/impl/CursorableLinkedList$ListIter.class
org/apache/tomcat/dbcp/pool/impl/CursorableLinkedList$Listable.class
org/apache/tomcat/dbcp/pool/impl/CursorableLinkedList.class
org/apache/tomcat/dbcp/pool/impl/CursorableSubList.class
org/apache/tomcat/dbcp/pool/impl/EvictionTimer.class
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool$1.class
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool$Config.class
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool$Evictor.class
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool$Latch.class
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool$ObjectQueue.class
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool$ObjectTimestampPair.clas
s
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool.class
org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPoolFactory.class
org/apache/tomcat/dbcp/pool/impl/GenericObjectPool$1.class
org/apache/tomcat/dbcp/pool/impl/GenericObjectPool$Config.class
org/apache/tomcat/dbcp/pool/impl/GenericObjectPool$Evictor.class
org/apache/tomcat/dbcp/pool/impl/GenericObjectPool$Latch.class
org/apache/tomcat/dbcp/pool/impl/GenericObjectPool$ObjectTimestampPair.class
org/apache/tomcat/dbcp/pool/impl/GenericObjectPool.class
org/apache/tomcat/dbcp/pool/impl/GenericObjectPoolFactory.class
org/apache/tomcat/dbcp/pool/impl/SoftReferenceObjectPool.class
org/apache/tomcat/dbcp/pool/impl/StackKeyedObjectPool.class
org/apache/tomcat/dbcp/pool/impl/StackKeyedObjectPoolFactory.class
org/apache/tomcat/dbcp/pool/impl/StackObjectPool.class
org/apache/tomcat/dbcp/pool/impl/StackObjectPoolFactory.class
META-INF/NOTICE
META-INF/LICENSE
META-INF/INDEX.LIST

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, March 19, 2010 11:41 AM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config



That, and look in the right file. It is tomcat-dbcp.jar, not tomcat.dbcp.jar

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: DB connection error -Tomcat 6 config

2010-03-19 Thread 2smart4u
just a quick thought:

have you tried installing Tomcat into a directory where it's name is
*not* containing any spaces?

cheers

gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Caldarale, Charles R
 From: 2smart4u [mailto:rc4...@googlemail.com]
 Subject: Re: DB connection error -Tomcat 6 config
 
 just a quick thought:
 
 have you tried installing Tomcat into a directory where it's name is
 *not* containing any spaces?

I would have thought a smart person would be keeping up - André suggested that 
a couple of hours ago, and the OP already noted it would be a good idea.

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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Did so, and still getting errors.

If I reference the factory ( 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory) - I get -

org.apache.jasper.JasperException: javax.servlet.ServletException: 
javax.naming.NamingException: Could not create resource factory instance [Root 
exception is java.lang.InstantiationException: 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)

javax.servlet.ServletException: javax.naming.NamingException: Could not create 
resource factory instance [Root exception is java.lang.InstantiationException: 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:949)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

javax.naming.NamingException: Could not create resource factory instance [Root 
exception is java.lang.InstantiationException: 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]

org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:102)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)

java.lang.InstantiationException: 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)


Without the factory reference in the context.xml file, I get the reference to 
the Oracle driver error and class not found, which is impossible, because the 
intial page I click to before that references it and pulls back the data from 
using it.

org.apache.jasper.JasperException: javax.servlet.ServletException: 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 
'oracle.jdbc.driver.OracleDriver'

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)

javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'

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

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 
'oracle.jdbc.driver.OracleDriver'

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:1


There is another copy of the tomcat-dbcp.jar in my JRE lib directory. I don't 
even recall putting it, or the others in there.
Tomcat doesn't copy files there, too does it? 

That would seem odd.

I'll remove those.

Other than than, I'm still quite baffled at this.

-Original Message-
From: 2smart4u [mailto:rc4...@googlemail.com] 
Sent: Friday, March 19, 2010 12:12 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

just a quick thought:

have you tried installing Tomcat into a directory where it's name is
*not* containing any spaces?

cheers

gregor
--
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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


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



Re: DB connection error -Tomcat 6 config

2010-03-19 Thread Gregor Schneider
ah. come on, chuck, why's that everyone is picking on my nick? *sic*

i'm reading and posting from my mobile, which is why i may have not
seen andre's post

cheers

gregor
---
just because you're paranoid doesn't mean they're not after you...

Am 19.03.2010 um 18:16 schrieb Caldarale, Charles R
chuck.caldar...@unisys.com
 :

 From: 2smart4u [mailto:rc4...@googlemail.com]
 Subject: Re: DB connection error -Tomcat 6 config

 just a quick thought:

 have you tried installing Tomcat into a directory where it's name is
 *not* containing any spaces?

 I would have thought a smart person would be keeping up - André sugg
 ested that a couple of hours ago, and the OP already noted it would
 be a good idea.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 There is another copy of the tomcat-dbcp.jar in my JRE lib directory.

That must be removed - it could be the source of all the problems.

 Tomcat doesn't copy files there, too does it?

No; Tomcat does not modify the JRE in any way.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Ok, I think I see some of the issue with the multiple or duplicate copies of 
those jars, which I'll assume for now is a big problem until I rebuild it.

My company requires me to go through some Pointsec authentication, and by 
default directs me (unfortunately) to some other dumb domain that's only for 
remote access, so I probably upon getting the laptop and logging in remotely 
didn't realize at first that I installed a TC version on this domain!!
So I'll log on to that domain, or go in the profile, kill it all off and then 
rebuild.

I'll let you know if that allows it to work.

Thanks. 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, March 19, 2010 1:58 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 There is another copy of the tomcat-dbcp.jar in my JRE lib directory.

That must be removed - it could be the source of all the problems.

 Tomcat doesn't copy files there, too does it?

No; Tomcat does not modify the JRE in any way.

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Alright, doneremoved every instance of tomcat-dbcp.jar I could find (save 
for the instance that SHOULD be there) and I do finally get a different error, 
this one seeming more SQL, and specifically ORACLE-related, in nature.

Now the Oracle driver is initially called (and found) to pull back a tabled 
page of data, no problem.

Clicking thru subsequently to a simple JSP with the Context in it produces the 
following errors:

org.apache.jasper.JasperException: An exception occurred processing JSP page 
/chgctrl_details.jsp at line 83

80: DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);
81:   */
82: // Allocate and use a connection from the pool
83:  connection = ds.getConnection();   
-   here, but then

javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create PoolableConnectionFactory (ORA-00923: FROM keyword not found 
where expected
)

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

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


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (ORA-00923: FROM keyword not found where expected
)

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

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

java.sql.SQLException: ORA-00923: FROM keyword not found where expected

oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)


Just provided snippets from each of these errors, not the entire set of 
references on down.

The logs - basically the same.

Java.sql.SQLException:  ORA-00923: FROM keyword not found where expected


Any ideas from this? I'm not yet inclined to think it's fully an Oracle error 
yet. But I could be wrong about that. : )



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, March 19, 2010 1:58 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 There is another copy of the tomcat-dbcp.jar in my JRE lib directory.

That must be removed - it could be the source of all the problems.

 Tomcat doesn't copy files there, too does it?

No; Tomcat does not modify the JRE in any way.

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
GOOD GOSH!!! 

I don't believe it! It's now friggin' working!

Thank you all: Chuck, Chris, Andre, Mark, Gregor, et al.

I had one little bad validation attribute in the context.xml file, and that was 
throwing it off.

That, of course, after all that other junk, and the other junk being the 
tomcat-dbcp.jar file located myriad places!


Thanks so much for your patience and help!!

Regards,

Barry 

-Original Message-
From: Propes, Barry L [GCG-NAOT] 
Sent: Friday, March 19, 2010 4:03 PM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Alright, doneremoved every instance of tomcat-dbcp.jar I could find (save 
for the instance that SHOULD be there) and I do finally get a different error, 
this one seeming more SQL, and specifically ORACLE-related, in nature.

Now the Oracle driver is initially called (and found) to pull back a tabled 
page of data, no problem.

Clicking thru subsequently to a simple JSP with the Context in it produces the 
following errors:

org.apache.jasper.JasperException: An exception occurred processing JSP page 
/chgctrl_details.jsp at line 83

80: DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);
81:   */
82: // Allocate and use a connection from the pool
83:  connection = ds.getConnection();   
-   here, but then

javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create PoolableConnectionFactory (ORA-00923: FROM keyword not found 
where expected
)

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

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


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (ORA-00923: FROM keyword not found where expected
)

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

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

java.sql.SQLException: ORA-00923: FROM keyword not found where expected

oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)


Just provided snippets from each of these errors, not the entire set of 
references on down.

The logs - basically the same.

Java.sql.SQLException:  ORA-00923: FROM keyword not found where expected


Any ideas from this? I'm not yet inclined to think it's fully an Oracle error 
yet. But I could be wrong about that. : )



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, March 19, 2010 1:58 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 There is another copy of the tomcat-dbcp.jar in my JRE lib directory.

That must be removed - it could be the source of all the problems.

 Tomcat doesn't copy files there, too does it?

No; Tomcat does not modify the JRE in any way.

 - 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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Ok, will do...thanks for the suggestion.

I'll remove that.

Thanks.
 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, March 19, 2010 4:31 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 javax.servlet.ServletException:
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFactory (ORA-00923: FROM keyword not found where
 expected)

I would suggest removing this from your Resource element:

testWhileIdle=true

One normally uses testOnBorrow, and specifies a validationQuery appropriate for 
the DB in use.  Without the validationQuery, I have no idea what the DBCP makes 
up to send.

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Weird, thoughnow I'm getting an IllegalStateException: Timer already 
cancelled.

Wonder what this is? Or what's causing it?

Well, Chuck, I took out the testWhileIdle=true  attribute and that seemed 
to fix this.

Thanks.

I guess you thought that might be an issue? : )

-Original Message-
From: Propes, Barry L [GCG-NAOT] 
Sent: Friday, March 19, 2010 4:31 PM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

GOOD GOSH!!! 

I don't believe it! It's now friggin' working!

Thank you all: Chuck, Chris, Andre, Mark, Gregor, et al.

I had one little bad validation attribute in the context.xml file, and that was 
throwing it off.

That, of course, after all that other junk, and the other junk being the 
tomcat-dbcp.jar file located myriad places!


Thanks so much for your patience and help!!

Regards,

Barry 

-Original Message-
From: Propes, Barry L [GCG-NAOT]
Sent: Friday, March 19, 2010 4:03 PM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Alright, doneremoved every instance of tomcat-dbcp.jar I could find (save 
for the instance that SHOULD be there) and I do finally get a different error, 
this one seeming more SQL, and specifically ORACLE-related, in nature.

Now the Oracle driver is initially called (and found) to pull back a tabled 
page of data, no problem.

Clicking thru subsequently to a simple JSP with the Context in it produces the 
following errors:

org.apache.jasper.JasperException: An exception occurred processing JSP page 
/chgctrl_details.jsp at line 83

80: DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);
81:   */
82: // Allocate and use a connection from the pool
83:  connection = ds.getConnection();   
-   here, but then

javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create PoolableConnectionFactory (ORA-00923: FROM keyword not found 
where expected
)

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

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


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (ORA-00923: FROM keyword not found where expected
)

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

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

java.sql.SQLException: ORA-00923: FROM keyword not found where expected

oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)


Just provided snippets from each of these errors, not the entire set of 
references on down.

The logs - basically the same.

Java.sql.SQLException:  ORA-00923: FROM keyword not found where expected


Any ideas from this? I'm not yet inclined to think it's fully an Oracle error 
yet. But I could be wrong about that. : )



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Friday, March 19, 2010 1:58 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 There is another copy of the tomcat-dbcp.jar in my JRE lib directory.

That must be removed - it could be the source of all the problems.

 Tomcat doesn't copy files there, too does it?

No; Tomcat does not modify the JRE in any way.

 - 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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Weird, thoughnow I'm getting an IllegalStateException: Timer
 already cancelled.
 
 Wonder what this is? Or what's causing it?

Can't say - I have very little experience with Oracle.  You might want to turn 
on traces in the DB (if you're allowed), or use Wireshark to see what's being 
sent to the DB.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-19 Thread Propes, Barry L
Ok, thanks. 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, March 19, 2010 4:47 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Weird, thoughnow I'm getting an IllegalStateException: Timer 
 already cancelled.
 
 Wonder what this is? Or what's causing it?

Can't say - I have very little experience with Oracle.  You might want to turn 
on traces in the DB (if you're allowed), or use Wireshark to see what's being 
sent to the DB.

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619) 

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

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Still, the errors I get:

Have you looked in the logs?

 Resource name=jdbc/myoracle
 auth=Container
 type=javax.sql.DataSource
 factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory

The factory name is incorrect; as you were told before, just remove it and let 
Tomcat use the default.  (The actual name is 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory.)

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Yes, and it's essentially the same. And I seem to have gotten this no
 matter the version I've tried out (6.018, 6.0.24, etc.)

If you don't mind, please repost your Resource configuration, remind us where 
it's located, and show us the code in your chngctrl JSP that gets the DB 
connection.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Not a problem.

 Resource config located in:  .../webapps/chngctrl/META-INF/context.xml -
Context
Resource name=jdbc/myoracle 
auth=Container 
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
 maxActive=125 
 maxIdle=15 
 maxWait=7
 removeAbandoned=true
 removeAbandonedTimeout=300
 logAbandoned=true
username=username 
password=userpass 
url=jdbc:oracle:thin:@servername:1526:SID
minEvictableIdleTimeMillis=5000
timeBetweenEvictionRunsMillis = 1
testWhileIdle=true /
/Context
---
In web.xml, located in.../webapps/chngctrl/WEB-INF/web.xml 
(for what it's worth, and I think it's immaterial, this at the top-)

?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/javaee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
   version=2.5 

resource-ref
descriptionChange Ctrl App/description
res-ref-namejdbc/myoracle/res-ref-name
res-ref-typejavax.sql.DataSource/res-ref-type
res-authContainer/res-auth
  /resource-ref


JSP located in ../webapps/chngctrl/change_ctrl_reporting.jsp  calling another 
JSP with these contents:

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();

All this has worked fine in 4.1.31 -- the two different versions of TC 6 (.0.18 
and 0.24) I've not had any luck with it.

I can pass the parameters through just fine and pull back the data, not with a 
NamingContext.


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Thursday, March 18, 2010 11:41 AM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Yes, and it's essentially the same. And I seem to have gotten this no 
 matter the version I've tried out (6.018, 6.0.24, etc.)

If you don't mind, please repost your Resource configuration, remind us where 
it's located, and show us the code in your chngctrl JSP that gets the DB 
connection.

 - Chuck


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


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


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



Re: DB connection error -Tomcat 6 config

2010-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 3/18/2010 1:16 PM, Propes, Barry L wrote:
 Resource name=jdbc/myoracle 

 In web.xml, located in.../webapps/chngctrl/WEB-INF/web.xml 
 (for what it's worth, and I think it's immaterial, this at the top-)
 
 ?xml version=1.0 encoding=ISO-8859-1?
 web-app xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
version=2.5 
 
 resource-ref

The resource-ref element should be at the bottom of web.xml: check the
schema definition. I'm not sure this is causing your error, but you
ought to make web.xml conform to the schema.

 descriptionChange Ctrl App/description
 res-ref-namejdbc/myoracle/res-ref-name
 res-ref-typejavax.sql.DataSource/res-ref-type
 res-authContainer/res-auth

...actually, I checked
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; and I can't find an
allowed element resource-ref in the 2.5 schema (which certainly is
surprising to me). Try taking-out your resource-ref element entirely
and see what happens.

 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 
 // Look up our data source
 DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);

I have my JNDI path as java:/comp/env/jdbc/[dbname]. IIRC, the leading
'/' is optional, so you should be good.

 // Allocate and use a connection from the pool
 Connection connection = ds.getConnection();
 
 All this has worked fine in 4.1.31 -- the two different versions of TC 6 
 (.0.18 and 0.24) I've not had any luck with it.

Note that you updated your web.xml to use the new 2.5 Schema instead of
sticking with the 2.3 DTD that you were using: that changes some of the
rules by which Tomcat plays. You might consider using this header instead:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;


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

iEYEARECAAYFAkuieOEACgkQ9CaO5/Lv0PAXkwCfVwIqaMa/Lj+Ob7lDt/LEt7hs
Ia4AoMFL9IrRrH1HtnF14mlUFQwgsf2C
=4d0W
-END PGP SIGNATURE-

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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
I'll give that a shot, Chris, and see.

Seems like I've tried it with and without those set of params listed (not just 
listed by you but by me) and had the same naming context issue.

 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, March 18, 2010 2:03 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 3/18/2010 1:16 PM, Propes, Barry L wrote:
 Resource name=jdbc/myoracle 

 In web.xml, located in.../webapps/chngctrl/WEB-INF/web.xml
 (for what it's worth, and I think it's immaterial, this at the top-)
 
 ?xml version=1.0 encoding=ISO-8859-1? web-app 
 xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
version=2.5
 
 resource-ref

The resource-ref element should be at the bottom of web.xml: check the schema 
definition. I'm not sure this is causing your error, but you ought to make 
web.xml conform to the schema.

 descriptionChange Ctrl App/description
 res-ref-namejdbc/myoracle/res-ref-name
 res-ref-typejavax.sql.DataSource/res-ref-type
 res-authContainer/res-auth

...actually, I checked
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; and I can't find an allowed 
element resource-ref in the 2.5 schema (which certainly is surprising to me). 
Try taking-out your resource-ref element entirely and see what happens.

 Context initCtx = new InitialContext(); Context envCtx = (Context) 
 initCtx.lookup(java:comp/env);
 
 // Look up our data source
 DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);

I have my JNDI path as java:/comp/env/jdbc/[dbname]. IIRC, the leading '/' is 
optional, so you should be good.

 // Allocate and use a connection from the pool Connection connection = 
 ds.getConnection();
 
 All this has worked fine in 4.1.31 -- the two different versions of TC 6 
 (.0.18 and 0.24) I've not had any luck with it.

Note that you updated your web.xml to use the new 2.5 Schema instead of 
sticking with the 2.3 DTD that you were using: that changes some of the rules 
by which Tomcat plays. You might consider using this header instead:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;


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

iEYEARECAAYFAkuieOEACgkQ9CaO5/Lv0PAXkwCfVwIqaMa/Lj+Ob7lDt/LEt7hs
Ia4AoMFL9IrRrH1HtnF14mlUFQwgsf2C
=4d0W
-END PGP SIGNATURE-

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


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



Re: DB connection error -Tomcat 6 config

2010-03-18 Thread 2smart4u
Resource-Ref is definately 2.3-standard.

Here's a configuration we're running in production. Adapt it to your
needs, should work with TC 5.5 and 6.x:

META-INF/context.xml:

?xml version='1.0' encoding='utf-8'?
Context
  Resource
auth=Container
description=somedescr
name=jdbc/someName
type=javax.sql.DataSource
factory=org.apache.commons.dbcp.BasicDataSourceFactory
driverClassName=com.mysql.jdbc.Driver  -- your driver here
username=someUser
password=somePass
url=jdbc:mysql://db:3306/someDB -- your url here
maxIdle=30
maxWait=1
maxActive=10
validationQuery=SELECT 1
testOnBorrow=true
testWhileIdle=true
timeBetweenEvictionRunsMillis=1
minEvictableIdleTimeMillis=28800
poolPreparedStatements=true
removeAbandoned=true
removeAbandonedTimeout=300
logAbandoned=false/
/Context

You don't habe to specify the DS in your deployment-descriptor (web.xml) at all.

Within your servlet / jsp, your get a handle from the DS as follows:

Context env = (Context) new InitialContext()
.lookup(java:comp/env);
DataSource dbDS = (DataSource) env.lookup(dataSourceName);

HTH

Gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Caldarale, Charles R
 From: 2smart4u [mailto:rc4...@googlemail.com]
 Subject: Re: DB connection error -Tomcat 6 config

 factory=org.apache.commons.dbcp.BasicDataSourceFactory

Note that this is using the commons-dbcp library, *not* the DBCP packaged with 
Tomcat.  The OP is trying to make his webapp function with Tomcat's DBCP.

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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Good point...I'll switch back to 
factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory

Although I've attempted with and without a factory reference, all to the same 
outcome. 

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

 From: 2smart4u [mailto:rc4...@googlemail.com]
 Subject: Re: DB connection error -Tomcat 6 config

 factory=org.apache.commons.dbcp.BasicDataSourceFactory

Note that this is using the commons-dbcp library, *not* the DBCP packaged with 
Tomcat.  The OP is trying to make his webapp function with Tomcat's DBCP.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Good point...I'll switch back to
 factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory

Again, that factory reference is incorrect - there's no such class.  If you 
insist on specifying one, and you want to use Tomcat's factory, the value is 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory (note the additional 
.dbcp in the proper setting).

All the symptoms point to your Resource element being ignored.  Check that 
you don't have a Context element in conf/Catalina/[host]/chngctrl.xml that's 
overriding the one in the webapps/chngctrl/META-INF/context.xml file.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Sorry for not clarifying...no IDE -- and this is on my 6.0.18 build.

Should it behave the same way as 6.0.26?

I'm thinking it does, but let me check...I'm not even  deploying this one from 
the Tomcat manager...just starting from the startup.bat file from the bin 
folder.
Much like I'd done with my old 4.1.31 build.


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

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

 However, I do not have an additional Context element in the 
 conf/Catalina/ folder or subfolders

That in itself is suspicious, since Tomcat 6.0.26 should be copying every 
Context element it finds from the webapp's META-INF directory to 
conf/Catalina/[host]/[appName].xml.  If you don't have anything under 
conf/Catalina/[host] then you're not running the Tomcat you think you are.

 But it does appear to be ignoring the Resource element.

How are you starting Tomcat?  (Not under an IDE, I hope.)  Does the Tomcat 
userid have access to the webapp's context.xml file?

We're missing something basic here.

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Should it behave the same way as 6.0.26?

No, 6.0.18 did not copy every instance of a Context element.

If you can, move up to 6.0.26 so we can all be looking at the same release.

- Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Bob Hall
--- On Thu, 3/18/10 at 1:56 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

 If you can, move up to 6.0.26 so we can all be looking at
 the same release.

From one of the OP's earlier messages:

 An error occurred at line: 68 in the jsp file: /chngctrl/chgctrl_details.jsp
 Type mismatch: cannot convert from Object to Context
 65:
 66: Connection connection = null;
 67: Context initCtx = new InitialContext();
 68: Context envCtx = initCtx.lookup(java:comp/env);
 69: // Look up our data source
 70: DataSource ds = initCtx.lookup(jdbc/myoracle);
 71:   
 
 
 SEVERE: Servlet.service() for servlet jsp threw exception
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
 at org.apache.naming.NamingContext.lookup(NamingContext.java:770)


Have you tried:

66: Connection connection = null;
67: Context initCtx = new InitialContext();
68: Context envCtx = (Context) initCtx.lookup(java:comp/env);
69: // Look up our data source
70: DataSource ds = (DataSource) initCtx.lookup(java:/myoracle);

   OR

70: DataSource ds = (DataSource) initCtx.lookup(java:jdbc/myoracle);


- Bob


  

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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Ok, Chuck, I'll give that one a shot and then deploy.

Thanks. 

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

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Should it behave the same way as 6.0.26?

No, 6.0.18 did not copy every instance of a Context element.

If you can, move up to 6.0.26 so we can all be looking at the same release.

- Chuck


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


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


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



Re: DB connection error -Tomcat 6 config

2010-03-18 Thread Pid

On 18/03/2010 21:26, Bob Hall wrote:

--- On Thu, 3/18/10 at 1:56 PM, Caldarale, Charles 
Rchuck.caldar...@unisys.com  wrote:


If you can, move up to 6.0.26 so we can all be looking at
the same release.


 From one of the OP's earlier messages:


An error occurred at line: 68 in the jsp file: /chngctrl/chgctrl_details.jsp
Type mismatch: cannot convert from Object to Context
65:
66: Connection connection = null;
67: Context initCtx = new InitialContext();
68: Context envCtx = initCtx.lookup(java:comp/env);
69: // Look up our data source
70: DataSource ds = initCtx.lookup(jdbc/myoracle);
71:


 Context envCtx = initCtx.lookup(java:comp/env);
 DataSource ds = initCtx.lookup(jdbc/myoracle);

should be:

 Context envCtx = initCtx.lookup(java:comp/env);
 DataSource ds = envCtx.lookup(jdbc/myoracle);

no?


p



SEVERE: Servlet.service() for servlet jsp threw exception

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

 at org.apache.naming.NamingContext.lookup(NamingContext.java:770)



Have you tried:

66: Connection connection = null;
67: Context initCtx = new InitialContext();
68: Context envCtx = (Context) initCtx.lookup(java:comp/env);
69: // Look up our data source
70: DataSource ds = (DataSource) initCtx.lookup(java:/myoracle);

OR

70: DataSource ds = (DataSource) initCtx.lookup(java:jdbc/myoracle);


- Bob




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




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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Tried it Bob.

Same errors in both of those attempts.

 javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

-Original Message-
From: Bob Hall [mailto:rfha...@yahoo.com]
Sent: Thursday, March 18, 2010 4:27 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config


 
 SEVERE: Servlet.service() for servlet jsp threw exception
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
 at org.apache.naming.NamingContext.lookup(NamingContext.java:770)


Have you tried:

66: Connection connection = null;
67: Context initCtx = new InitialContext();
68: Context envCtx = (Context) initCtx.lookup(java:comp/env);
69: // Look up our data source
70: DataSource ds = (DataSource) initCtx.lookup(java:/myoracle);

   OR

70: DataSource ds = (DataSource) initCtx.lookup(java:jdbc/myoracle);


- Bob


  

-
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: DB connection error -Tomcat 6 config

2010-03-18 Thread Bob Hall


--- On Thu, 3/18/10 at 3:02 PM, Pid p...@pidster.com wrote:


 
   Context envCtx = initCtx.lookup(java:comp/env);
   DataSource ds = initCtx.lookup(jdbc/myoracle);
 
 should be:
 
   Context envCtx = initCtx.lookup(java:comp/env);
   DataSource ds = envCtx.lookup(jdbc/myoracle);
 
 no?
 

I was wondering why envCtx was discarded and was about to suggest:

  DataSource ds = (DataSource) initCtx.lookup(java:comp/env/jdbc/myoracle);

- Bob




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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Yes, it should be.

Not sure how that got jumbled as such but what I did have was:

Connection connection = null;
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle); 

Tried other variations seen elsewhere on here as suggested. But still no dice.
Odd - like I'd mentioned earlier, I can pass params through (DBUrl, user, 
password) and hit it, but not with a Context object.


-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Thursday, March 18, 2010 5:02 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On 18/03/2010 21:26, Bob Hall wrote:
 --- On Thu, 3/18/10 at 1:56 PM, Caldarale, Charles 
 Rchuck.caldar...@unisys.com  wrote:

 If you can, move up to 6.0.26 so we can all be looking at the same 
 release.

  From one of the OP's earlier messages:

 An error occurred at line: 68 in the jsp file: 
 /chngctrl/chgctrl_details.jsp Type mismatch: cannot convert from 
 Object to Context
 65:
 66: Connection connection = null;
 67: Context initCtx = new InitialContext();
 68: Context envCtx = initCtx.lookup(java:comp/env);
 69: // Look up our data source
 70: DataSource ds = initCtx.lookup(jdbc/myoracle);
 71:

  Context envCtx = initCtx.lookup(java:comp/env);
  DataSource ds = initCtx.lookup(jdbc/myoracle);

should be:

  Context envCtx = initCtx.lookup(java:comp/env);
  DataSource ds = envCtx.lookup(jdbc/myoracle);

no?


p


 SEVERE: Servlet.service() for servlet jsp threw exception
 javax.naming.NameNotFoundException: Name jdbc is not bound in this 
 Context
  at 
 org.apache.naming.NamingContext.lookup(NamingContext.java:770)


 Have you tried:

 66: Connection connection = null;
 67: Context initCtx = new InitialContext();
 68: Context envCtx = (Context) initCtx.lookup(java:comp/env);
 69: // Look up our data source
 70: DataSource ds = (DataSource) initCtx.lookup(java:/myoracle);

 OR

 70: DataSource ds = (DataSource) initCtx.lookup(java:jdbc/myoracle);


 - Bob




 -
 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: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
I tried that, too, and still get a NameNotFound exception.  jdbc is not bound 
in this Context


-Original Message-
From: Bob Hall [mailto:rfha...@yahoo.com] 
Sent: Thursday, March 18, 2010 5:07 PM
To: Tomcat Users List; p...@pidster.com
Subject: Re: DB connection error -Tomcat 6 config



--- On Thu, 3/18/10 at 3:02 PM, Pid p...@pidster.com wrote:


 
   Context envCtx = initCtx.lookup(java:comp/env);
   DataSource ds = initCtx.lookup(jdbc/myoracle);
 
 should be:
 
   Context envCtx = initCtx.lookup(java:comp/env);
   DataSource ds = envCtx.lookup(jdbc/myoracle);
 
 no?
 

I was wondering why envCtx was discarded and was about to suggest:

  DataSource ds = (DataSource) initCtx.lookup(java:comp/env/jdbc/myoracle);

- Bob


  

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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Bob Hall
--- On Thu, 3/18/10 at 3:07 PM, Propes, Barry L barry.l.pro...@citi.com wrote:

 Yes, it should be.
 
 Not sure how that got jumbled as such but what I did have
 was:
 
 Connection connection = null;
 Context initCtx = new InitialContext();
 Context envCtx = (Context)
 initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource)
 envCtx.lookup(jdbc/myoracle); 
 
 Tried other variations seen elsewhere on here as suggested.
 But still no dice.
 Odd - like I'd mentioned earlier, I can pass params through
 (DBUrl, user, password) and hit it, but not with a Context
 object.
 

Have you tried 'exploring' JNDI?

  NamingEnumerationNameClassPair list = initCtx.list(java:comp/env);

- Bob


  

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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Connection connection = null;
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource) envCtx.lookup(jdbc/myoracle);

That's what you showed us earlier, but afterwards you posted this:

 An error occurred at line: 68 in the jsp file: /chngctrl/chgctrl_details.jsp
 Type mismatch: cannot convert from Object to Context
 66: Connection connection = null;
 67: Context initCtx = new InitialContext();
 68: Context envCtx = initCtx.lookup(java:comp/env);
 69: // Look up our data source
 70: DataSource ds = initCtx.lookup(jdbc/myoracle);

Since things are a bit confused now, you might want to verify that the JSP 
source is what it should be (using envCtx for the lookup of jdbc/myoracle), 
and clean out Tomcat's work directory in case there's something ugly left lying 
around in there, and restart Tomcat, of course.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
A little bit...but I'll probe into it some more.

Thanks for the suggestion. 

-Original Message-
From: Bob Hall [mailto:rfha...@yahoo.com] 
Sent: Thursday, March 18, 2010 5:14 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

--- On Thu, 3/18/10 at 3:07 PM, Propes, Barry L barry.l.pro...@citi.com wrote:

 Yes, it should be.
 
 Not sure how that got jumbled as such but what I did have
 was:
 
 Connection connection = null;
 Context initCtx = new InitialContext(); Context envCtx = (Context) 
 initCtx.lookup(java:comp/env); DataSource ds = (DataSource) 
 envCtx.lookup(jdbc/myoracle);
 
 Tried other variations seen elsewhere on here as suggested.
 But still no dice.
 Odd - like I'd mentioned earlier, I can pass params through (DBUrl, 
 user, password) and hit it, but not with a Context object.
 

Have you tried 'exploring' JNDI?

  NamingEnumerationNameClassPair list = initCtx.list(java:comp/env);

- Bob


  

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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 I tried that, too, and still get a NameNotFound exception.  jdbc is
 not bound in this Context

Still indicates the Resource element is not being found by Tomcat.

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Sorry for any confusion.

I do have my JSP source as the following:
 
 Connection connection = null;
 Context initCtx = new InitialContext(); Context envCtx = (Context) 
 initCtx.lookup(java:comp/env); DataSource ds = (DataSource)  
envCtx.lookup(jdbc/myoracle);
connection = ds.getConnection();

Cleaned out the work folder and restarted Tomcat; still get the Name jdbc is 
not bound in this context error.

I've had it this way since I first started trying different 6.0.x builds, I was 
just altering at the suggestion of some others, and troubleshooting on my own 
to see if altering the Context objects would work, but so far no luck.

This is how I've had it for about 3 years or so on my Tomcat 4.1.31 build and 
it's worked  perfectlygranted that calls the Resource params in the 
server.xml file, which is not workable in the 6 series.



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

Since things are a bit confused now, you might want to verify that the JSP 
source is what it should be (using envCtx for the lookup of jdbc/myoracle), 
and clean out Tomcat's work directory in case there's something ugly left 
lying around in there, and restart Tomcat, of course.

 - Chuck

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


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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Ok, Chuck,

I blew the other 6.x build (0.18 and 0.24) away and moved it to Tomcat 6.0.26.

Installed and reconfigured the context.xml an web.xml files in their respective 
directories under the webapps/[webapp]/ folder.

I configured it with the proper factory reference below and now get the error:

Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

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


root cause 

javax.servlet.ServletException: javax.naming.NamingException: Could not create 
resource factory instance [Root exception is java.lang.InstantiationException: 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:949)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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


root cause 

javax.naming.NamingException: Could not create resource factory instance [Root 
exception is java.lang.InstantiationException: 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]

org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:102)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
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)

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:148)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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


A look at the logs basically reveals the same:

root cause 

java.lang.InstantiationException: 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)

org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:98)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
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)

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:148)

Again, I wonder if the Resource is being seen.

 

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

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Good point...I'll switch back to
 factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory

Again, that factory reference is incorrect - there's no such class.  If you 
insist on specifying one, and you want to use Tomcat's factory, the value is 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory (note the additional 
.dbcp in the proper setting).

All the symptoms point to your Resource element being ignored.  Check that 
you don't have a Context element in conf/Catalina/[host]/chngctrl.xml that's 
overriding the one in the webapps/chngctrl/META-INF/context.xml file.

 - 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

RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 I configured it with the proper factory reference below

And if you remove the factory attribute?

Double-check that tomcat-dbcp.jar is in Tomcat's lib directory and nowhere 
else, and that the Tomcat userid has at least read access to that jar.  Might 
want to do jar -tf tomcat-dbcp.jar to verify that the class really is in 
there (hard to believe it wouldn't be).

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-17 Thread Propes, Barry L
Yes, but it doesn't really reveal any more -- it showed unknown source from the 
lookup call.

But why would it read unknown source? When I have it declared?

jdbc/myoracle


It was basically just stating the same...I'll look at it again to extract the 
specifics of it. 


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

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Still, the errors I get:

Have you looked in the logs?

 Resource name=jdbc/myoracle
 auth=Container
 type=javax.sql.DataSource
 factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory

The factory name is incorrect; as you were told before, just remove it and let 
Tomcat use the default.  (The actual name is 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory.)

 - Chuck


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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-16 Thread Propes, Barry L
Well, I'm at a loss.

After even downloading 6.0.24 with the Windows Installer service and cleaning 
up the context.xml and web.xml files in the respective places:
/webapps/META-INF/context.xml
And /webapps/WEB-INF/web.xml

Still, the errors I get:
javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc 
is not bound in this Context

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:942)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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


root cause 
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
org.apache.naming.NamingContext.lookup(NamingContext.java:770)
org.apache.naming.NamingContext.lookup(NamingContext.java:153)

org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
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)
 

My META-INF/context.xml file's contents:

Context
Resource name=jdbc/myoracle 
auth=Container 
type=javax.sql.DataSource
factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory
driverClassName=oracle.jdbc.driver.OracleDriver
 maxActive=125 
 maxIdle=15 
 maxWait=7
 removeAbandoned=true
 removeAbandonedTimeout=300
 logAbandoned=true
username=usernm 
password=pwd 
url=jdbc:oracle:thin:@servername100:1526:SID
minEvictableIdleTimeMillis=5000
timeBetweenEvictionRunsMillis = 1
testWhileIdle=true /
/Context

And WEB-INF/web.xml
resource-ref
descriptionChange Ctrl App/description
res-ref-namejdbc/myoracle/res-ref-name
res-ref-typejavax.sql.DataSource/res-ref-type
res-authContainer/res-auth
  /resource-ref

In addition to the previous servlet mappings that were on there before with 
version 4.1.31

How/why would it not find the naming context?

Ughhh!!



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

I'll totally remove factory. It was necessary in my 4.1 build.

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

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

Thanks, Chris.


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

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

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

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

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


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

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

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

RE: DB connection error -Tomcat 6 config

2010-03-16 Thread Propes, Barry L
And I should have added the proper path(s) was/were

 /webapps/chngctrl/META-INF/context.xml
And /webapps/chngctrl/WEB-INF/web.xml


Regards,

Barry

-Original Message-
From: Propes, Barry L [GCG-NAOT] 
Sent: Tuesday, March 16, 2010 6:04 PM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Well, I'm at a loss.

After even downloading 6.0.24 with the Windows Installer service and cleaning 
up the context.xml and web.xml files in the respective places:
/webapps/META-INF/context.xml
And /webapps/WEB-INF/web.xml

Still, the errors I get:
javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc 
is not bound in this Context

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

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:942)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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


root cause
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
org.apache.naming.NamingContext.lookup(NamingContext.java:770)
org.apache.naming.NamingContext.lookup(NamingContext.java:153)

org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
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)
 

My META-INF/context.xml file's contents:

Context
Resource name=jdbc/myoracle 
auth=Container 
type=javax.sql.DataSource
factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory
driverClassName=oracle.jdbc.driver.OracleDriver
 maxActive=125 
 maxIdle=15 
 maxWait=7
 removeAbandoned=true
 removeAbandonedTimeout=300
 logAbandoned=true
username=usernm 
password=pwd 
url=jdbc:oracle:thin:@servername100:1526:SID
minEvictableIdleTimeMillis=5000
timeBetweenEvictionRunsMillis = 1
testWhileIdle=true /
/Context

And WEB-INF/web.xml
resource-ref
descriptionChange Ctrl App/description
res-ref-namejdbc/myoracle/res-ref-name
res-ref-typejavax.sql.DataSource/res-ref-type
res-authContainer/res-auth
  /resource-ref

In addition to the previous servlet mappings that were on there before with 
version 4.1.31

How/why would it not find the naming context?

Ughhh!!



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

I'll totally remove factory. It was necessary in my 4.1 build.

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

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

Thanks, Chris.


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

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

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

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

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


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

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

RE: DB connection error -Tomcat 6 config

2010-03-16 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Still, the errors I get:

Have you looked in the logs?

 Resource name=jdbc/myoracle
 auth=Container
 type=javax.sql.DataSource
 factory=org.apache.tomcat.dbcp.DataSourceConnectionFactory

The factory name is incorrect; as you were told before, just remove it and let 
Tomcat use the default.  (The actual name is 
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory.)

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-04 Thread Anthony J. Biacco
If you're still getting the error:
Could not create resource factory instance [Root exception is
java.lang.InstantiationException :
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory

Make sure you have tomcat-dbcp.jar in your tomcat/lib. The .dbcp.dbcp.
factory comes from that jar (versus just plain .dbcp. which comes from
the separate commons-dbcp jar)
If for some reason you want to use commons-dbcp and not tomcat-dbcp
(like me), you can set your tomcat startup options to include this:
-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFa
ctory
I needed to do that for the eclipselink stuff when I ripped tomcat-dbcp
out of tomcat.


-Tony
---
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
abia...@formatdynamics.com
http://www.formatdynamics.com

 -Original Message-
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Sent: Monday, March 01, 2010 2:50 PM
 To: 'Tomcat Users List'
 Subject: RE: DB connection error -Tomcat 6 config
 
 
 
 1. Quadruple-check that you have your JDBC driver only in one
 place (in Tomcat's /lib directory) 2. Remove all unnecessary
 configuration from your Resource element:
 just (simple) URL, driver class, username and password, just to
 get things started.
 
 Good luck,
 - -chris
 
 Ok, I did this - blew away the 6.0.24 collection, and re-started with
 6.0.18.
 
 Using the below reference, I can create an adequate connection in a
 servlet or JSP, hitting the DB just fine.
 
 If I try to reference the resource reference in the webapps/META-
 INF/context.xml file,
 I get the following error:
 
 (on startup, the console shows)
 Mar 1, 2010 3:18:05 PM org.apache.catalina.core.NamingContextListener
 addResource
 WARNING: Failed to register in JMX: javax.naming.NamingException:
Could
 not crea
 te resource factory instance [Root exception is
 java.lang.InstantiationException
 : org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]
 
 
 Other error snippets in attempts to reference the res-ref data
include:
 
 javax.servlet.ServletException: javax.naming.NamingException: Could
not
 create resource factory instance [Root exception is
 java.lang.InstantiationException:
 org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(P
 ageContextImpl.java:852)
 
 javax.naming.NamingException: Could not create resource factory
 instance [Root exception is java.lang.InstantiationException:
 org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]

org.apache.naming.factory.ResourceFactory.getObjectInstance(Resou
 rceFactory.java:102)

javax.naming.spi.NamingManager.getObjectInstance(NamingManager.ja
 va:304)
   org.apache.naming.NamingContext.lookup(NamingContext.java:793)
 
 java.lang.InstantiationException:
 org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory
   java.lang.Class.newInstance0(Class.java:340)
   java.lang.Class.newInstance(Class.java:308)

org.apache.naming.factory.ResourceFactory.getObjectInstance(Resou
 rceFactory.java:98)

javax.naming.spi.NamingManager.getObjectInstance(NamingManager.ja
 va:304)
 
 
 Looking at the log showed basically the same:
 SEVERE: Servlet.service() for servlet jsp threw exception
 java.lang.InstantiationException:
 org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory
   at java.lang.Class.newInstance0(Class.java:340)
   at java.lang.Class.newInstance(Class.java:308)
 
 If I omit the factory reference, TC doesn't seem to like that at all
--
 didn't really with the 6.0.24 experiment either.
 
 But I'm open to suggestions if anyone has something I overlooked. FYI,
 I left the web.xml file in the webapps folder void of any resource
 reference.
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


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



RE: DB connection error -Tomcat 6 config

2010-03-03 Thread Propes, Barry L
Appreciate it, Mark.

I'll rebuild the Tomcat collection with that jar and see if it will alleviate 
this issue.
 

-Original Message-
From: Mark Shifman [mailto:mark.shif...@yale.edu] 
Sent: Tuesday, March 02, 2010 7:08 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

Propes, Barry L wrote:
 I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

 Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

 If anyone has used these environments together and needed to make the change, 
 please apprise.
   
I am using ojdbc6.jar with tomcat 6 (two different versions) and it works just 
fine.  I am using dbcp that comes with tomcat 6 without any problems.

There were some things that weren't implemented correctly/well in ojdbc14, 
which work with ojdbc6, some calls for getting metadata from prepared 
statements or result sets (can't remember the exact details).  ojdbc6 seems to 
work just fine.

mas
 Thanks,

 Barry

 -Original Message-
 From: Propes, Barry L [GCG-NAOT]
 Sent: Tuesday, March 02, 2010 9:50 AM
 To: 'Tomcat Users List'
 Subject: RE: DB connection error -Tomcat 6 config

 Really? Well, when I was implementing connection pooling in 4.1.31, I 
 specifically remember having to use  ojdbc14_g.jar instead of ojdbc14.jar to 
 successfully get the conn pooling to work.

 I'll swap out the ojdbc14_g.jar  for the ojdbc14.jar and just use the latter 
 and see if that works.

 Thanks, Karthik.

 -Original Message-
 From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com]
 Sent: Monday, March 01, 2010 10:59 PM
 To: Tomcat Users List
 Subject: RE: DB connection error -Tomcat 6 config

 Hi

 Please double check the ojdbc14.jar size, Some times I find the jar files 
 corrupt due to various reasons.

 Also check only 1 copy of this 'jar' exists in /TOMCAT6.0.2.0/lib directory 
 and make sure the same does not exist within the web application.

 ojdbc14_g.jar is used for advance debug purpose, although it works try 
 with normal ojdbc14.jar




 With regards
 karthik

 -Original Message-
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Sent: Tuesday, March 02, 2010 4:44 AM
 To: 'Tomcat Users List'
 Subject: RE: DB connection error -Tomcat 6 config

 Sorry, no.

 webapps/chngctrl/META-INF/context.xml.

 Thanks, Chuck.

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Monday, March 01, 2010 4:29 PM
 To: Tomcat Users List
 Subject: RE: DB connection error -Tomcat 6 config

   
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

 If I try to reference the resource reference in the 
 webapps/META-INF/context.xml file,
 

 Is that the real location?  If so, it's not valid.  The webapps directory is 
 the default directory under which each webapp is normally deployed; there 
 must be a webapp name between webapps and META-INF (e.g., ROOT).  Any 
 other construct is incorrect.

  - 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


 -
 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


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



RE: DB connection error -Tomcat 6 config

2010-03-03 Thread Propes, Barry L
Wow - thanks, Bob. Yeah, that's exactly what we have here.

I have narrowed down the problem or error simply to the naming context.
But why it worked before on 4.1.31 and won't now is a slight mystery.
Maybe in the older version something with server.xml overrode other instances 
where now META-INF/context.xml largley does the overriding. Either way, that 
info is correct, so I'm still troubleshooting.

Thanks for the info, Bob! 

-Original Message-
From: Bob Hall [mailto:rfha...@yahoo.com] 
Sent: Tuesday, March 02, 2010 7:39 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

--- On Tue, 3/2/10 at 3:39 PM, Propes, Barry L barry.l.pro...@citi.com wrote:

 Then that should work...are you using
 DBCP with it?
 
  I wonder now...should I perhaps be using this jar?
 ojdbc6.jar  ?
 
  Has anyone upgraded their Oracle drivers that's using
 TC 6 and JDK 1.6?
 
  If anyone has used these environments together and
 needed to make the change, please apprise.
 

We did *not* have to upgrade to ojdbc6; we are using:
  ojdbc14 (10.2.0.3.0)
  DBCP
  tomcat 6.0.20
  Java 1.6.0_16
  Oracle 10.2.0.4.0

- Bob


  

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


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



RE: DB connection error -Tomcat 6 config

2010-03-02 Thread Propes, Barry L
Really? Well, when I was implementing connection pooling in 4.1.31, I 
specifically remember having to use  ojdbc14_g.jar instead of ojdbc14.jar to 
successfully get the conn pooling to work.

I'll swap out the ojdbc14_g.jar  for the ojdbc14.jar and just use the latter 
and see if that works.

Thanks, Karthik.

-Original Message-
From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] 
Sent: Monday, March 01, 2010 10:59 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

Hi

Please double check the ojdbc14.jar size, Some times I find the jar files 
corrupt due to various reasons.

Also check only 1 copy of this 'jar' exists in /TOMCAT6.0.2.0/lib directory 
and make sure the same does not exist within the web application.

ojdbc14_g.jar is used for advance debug purpose, although it works try with 
normal ojdbc14.jar




With regards
karthik

-Original Message-
From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Sent: Tuesday, March 02, 2010 4:44 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Sorry, no.

webapps/chngctrl/META-INF/context.xml.

Thanks, Chuck.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Monday, March 01, 2010 4:29 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

 If I try to reference the resource reference in the 
 webapps/META-INF/context.xml file,

Is that the real location?  If so, it's not valid.  The webapps directory is 
the default directory under which each webapp is normally deployed; there must 
be a webapp name between webapps and META-INF (e.g., ROOT).  Any other 
construct is incorrect.

 - 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


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


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



RE: DB connection error -Tomcat 6 config

2010-03-02 Thread Propes, Barry L
I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

If anyone has used these environments together and needed to make the change, 
please apprise.

Thanks,

Barry 

-Original Message-
From: Propes, Barry L [GCG-NAOT] 
Sent: Tuesday, March 02, 2010 9:50 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Really? Well, when I was implementing connection pooling in 4.1.31, I 
specifically remember having to use  ojdbc14_g.jar instead of ojdbc14.jar to 
successfully get the conn pooling to work.

I'll swap out the ojdbc14_g.jar  for the ojdbc14.jar and just use the latter 
and see if that works.

Thanks, Karthik.

-Original Message-
From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com]
Sent: Monday, March 01, 2010 10:59 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

Hi

Please double check the ojdbc14.jar size, Some times I find the jar files 
corrupt due to various reasons.

Also check only 1 copy of this 'jar' exists in /TOMCAT6.0.2.0/lib directory 
and make sure the same does not exist within the web application.

ojdbc14_g.jar is used for advance debug purpose, although it works try with 
normal ojdbc14.jar




With regards
karthik

-Original Message-
From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Sent: Tuesday, March 02, 2010 4:44 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Sorry, no.

webapps/chngctrl/META-INF/context.xml.

Thanks, Chuck.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Monday, March 01, 2010 4:29 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

 If I try to reference the resource reference in the 
 webapps/META-INF/context.xml file,

Is that the real location?  If so, it's not valid.  The webapps directory is 
the default directory under which each webapp is normally deployed; there must 
be a webapp name between webapps and META-INF (e.g., ROOT).  Any other 
construct is incorrect.

 - 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


-
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: DB connection error -Tomcat 6 config

2010-03-02 Thread Hassan Schroeder
On Tue, Mar 2, 2010 at 3:18 PM, Propes, Barry L barry.l.pro...@citi.com wrote:
 I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

 Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

 If anyone has used these environments together and needed to make the change, 
 please apprise.

Not sure how relevant this is, but last year I had a test installation of
Tomcat 6.0.18 + Java 6 (not sure now which release exactly) running
a JRuby on Rails app with ojdbc14.jar as the driver (in WEB-INF/lib).

So it works, for some value of work :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: DB connection error -Tomcat 6 config

2010-03-02 Thread Propes, Barry L
Then that should work...are you using DBCP with it?

Thanks. 

-Original Message-
From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] 
Sent: Tuesday, March 02, 2010 5:34 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On Tue, Mar 2, 2010 at 3:18 PM, Propes, Barry L barry.l.pro...@citi.com wrote:
 I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

 Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

 If anyone has used these environments together and needed to make the change, 
 please apprise.

Not sure how relevant this is, but last year I had a test installation of 
Tomcat 6.0.18 + Java 6 (not sure now which release exactly) running a JRuby on 
Rails app with ojdbc14.jar as the driver (in WEB-INF/lib).

So it works, for some value of work :-)

--
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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


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



Re: DB connection error -Tomcat 6 config

2010-03-02 Thread Hassan Schroeder
On Tue, Mar 2, 2010 at 3:39 PM, Propes, Barry L barry.l.pro...@citi.com wrote:
 Then that should work...are you using DBCP with it?

I don't *believe* so; possibly ActiveRecord/activerecord-jdbc-adapter
was doing pooling under the hood but it was strictly a proof of concept
for the client so I really didn't care about performance at that point.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: DB connection error -Tomcat 6 config

2010-03-02 Thread Propes, Barry L
Oh ok.

Thanks. 

-Original Message-
From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] 
Sent: Tuesday, March 02, 2010 5:53 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

On Tue, Mar 2, 2010 at 3:39 PM, Propes, Barry L barry.l.pro...@citi.com wrote:
 Then that should work...are you using DBCP with it?

I don't *believe* so; possibly ActiveRecord/activerecord-jdbc-adapter
was doing pooling under the hood but it was strictly a proof of concept for the 
client so I really didn't care about performance at that point.

--
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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


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



Re: DB connection error -Tomcat 6 config

2010-03-02 Thread Mark Shifman

Propes, Barry L wrote:

I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

If anyone has used these environments together and needed to make the change, 
please apprise.
  
I am using ojdbc6.jar with tomcat 6 (two different versions) and it 
works just fine.  I am using dbcp that comes with tomcat 6 without any 
problems.


There were some things that weren't implemented correctly/well in 
ojdbc14, which work with ojdbc6, some calls for getting metadata from 
prepared
statements or result sets (can't remember the exact details).  ojdbc6 
seems to work just fine.


mas

Thanks,

Barry 


-Original Message-
From: Propes, Barry L [GCG-NAOT] 
Sent: Tuesday, March 02, 2010 9:50 AM

To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Really? Well, when I was implementing connection pooling in 4.1.31, I 
specifically remember having to use  ojdbc14_g.jar instead of ojdbc14.jar to 
successfully get the conn pooling to work.

I'll swap out the ojdbc14_g.jar  for the ojdbc14.jar and just use the latter 
and see if that works.

Thanks, Karthik.

-Original Message-
From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com]
Sent: Monday, March 01, 2010 10:59 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

Hi

Please double check the ojdbc14.jar size, Some times I find the jar files 
corrupt due to various reasons.

Also check only 1 copy of this 'jar' exists in /TOMCAT6.0.2.0/lib directory 
and make sure the same does not exist within the web application.

ojdbc14_g.jar is used for advance debug purpose, although it works try with 
normal ojdbc14.jar




With regards
karthik

-Original Message-
From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Sent: Tuesday, March 02, 2010 4:44 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Sorry, no.

webapps/chngctrl/META-INF/context.xml.

Thanks, Chuck.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Monday, March 01, 2010 4:29 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

  

From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Subject: RE: DB connection error -Tomcat 6 config

If I try to reference the resource reference in the 
webapps/META-INF/context.xml file,



Is that the real location?  If so, it's not valid.  The webapps directory is the default directory 
under which each webapp is normally deployed; there must be a webapp name between 
webapps and META-INF (e.g., ROOT).  Any other construct is incorrect.

 - 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


-
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: DB connection error -Tomcat 6 config

2010-03-02 Thread Bob Hall
--- On Tue, 3/2/10 at 3:39 PM, Propes, Barry L barry.l.pro...@citi.com wrote:

 Then that should work...are you using
 DBCP with it?
 
  I wonder now...should I perhaps be using this jar?  
 ojdbc6.jar  ?
 
  Has anyone upgraded their Oracle drivers that's using
 TC 6 and JDK 1.6?
 
  If anyone has used these environments together and
 needed to make the change, please apprise.
 

We did *not* have to upgrade to ojdbc6; we are using:
  ojdbc14 (10.2.0.3.0)
  DBCP
  tomcat 6.0.20
  Java 1.6.0_16
  Oracle 10.2.0.4.0

- Bob




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



RE: DB connection error -Tomcat 6 config

2010-03-02 Thread Anthony J. Biacco
We're using the 11.2.0.1 oracle jar with the seperate commons-dbcp 1.4 without 
any problems or modifications. This is with 6.0.24 and 6.0.20 under 1.6.0_18 on 
centos 5.

-Tony




Sent from my Windows® phone.

-Original Message-
From: Mark Shifman mark.shif...@yale.edu
Sent: Tuesday, March 02, 2010 6:08 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: DB connection error -Tomcat 6 config

Propes, Barry L wrote:
 I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

 Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

 If anyone has used these environments together and needed to make the change, 
 please apprise.
   
I am using ojdbc6.jar with tomcat 6 (two different versions) and it 
works just fine.  I am using dbcp that comes with tomcat 6 without any 
problems.

There were some things that weren't implemented correctly/well in 
ojdbc14, which work with ojdbc6, some calls for getting metadata from 
prepared
statements or result sets (can't remember the exact details).  ojdbc6 
seems to work just fine.

mas
 Thanks,

 Barry 

 -Original Message-
 From: Propes, Barry L [GCG-NAOT] 
 Sent: Tuesday, March 02, 2010 9:50 AM
 To: 'Tomcat Users List'
 Subject: RE: DB connection error -Tomcat 6 config

 Really? Well, when I was implementing connection pooling in 4.1.31, I 
 specifically remember having to use  ojdbc14_g.jar instead of ojdbc14.jar to 
 successfully get the conn pooling to work.

 I'll swap out the ojdbc14_g.jar  for the ojdbc14.jar and just use the latter 
 and see if that works.

 Thanks, Karthik.

 -Original Message-
 From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com]
 Sent: Monday, March 01, 2010 10:59 PM
 To: Tomcat Users List
 Subject: RE: DB connection error -Tomcat 6 config

 Hi

 Please double check the ojdbc14.jar size, Some times I find the jar files 
 corrupt due to various reasons.

 Also check only 1 copy of this 'jar' exists in /TOMCAT6.0.2.0/lib directory 
 and make sure the same does not exist within the web application.

 ojdbc14_g.jar is used for advance debug purpose, although it works try with 
 normal ojdbc14.jar




 With regards
 karthik

 -Original Message-
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Sent: Tuesday, March 02, 2010 4:44 AM
 To: 'Tomcat Users List'
 Subject: RE: DB connection error -Tomcat 6 config

 Sorry, no.

 webapps/chngctrl/META-INF/context.xml.

 Thanks, Chuck.

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Monday, March 01, 2010 4:29 PM
 To: Tomcat Users List
 Subject: RE: DB connection error -Tomcat 6 config

   
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

 If I try to reference the resource reference in the 
 webapps/META-INF/context.xml file,
 

 Is that the real location?  If so, it's not valid.  The webapps directory is 
 the default directory under which each webapp is normally deployed; there 
 must be a webapp name between webapps and META-INF (e.g., ROOT).  Any 
 other construct is incorrect.

  - 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


 -
 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


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



RE: DB connection error -Tomcat 6 config

2010-03-02 Thread Karthik Nanjangude
Hi

 
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html

This one is for Oracle Database 11g an up only

Tried this Driver ojdbc15/jdk5  ojdbc16/jdk6   with my existing 4 year old 
application and started getting Compile time exceptions did not proceed 
future





With regards
karthik


-Original Message-
From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Sent: Wednesday, March 03, 2010 4:48 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

If anyone has used these environments together and needed to make the change, 
please apprise.

Thanks,

Barry

-Original Message-
From: Propes, Barry L [GCG-NAOT]
Sent: Tuesday, March 02, 2010 9:50 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Really? Well, when I was implementing connection pooling in 4.1.31, I 
specifically remember having to use  ojdbc14_g.jar instead of ojdbc14.jar to 
successfully get the conn pooling to work.

I'll swap out the ojdbc14_g.jar  for the ojdbc14.jar and just use the latter 
and see if that works.

Thanks, Karthik.

-Original Message-
From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com]
Sent: Monday, March 01, 2010 10:59 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

Hi

Please double check the ojdbc14.jar size, Some times I find the jar files 
corrupt due to various reasons.

Also check only 1 copy of this 'jar' exists in /TOMCAT6.0.2.0/lib directory 
and make sure the same does not exist within the web application.

ojdbc14_g.jar is used for advance debug purpose, although it works try with 
normal ojdbc14.jar




With regards
karthik

-Original Message-
From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
Sent: Tuesday, March 02, 2010 4:44 AM
To: 'Tomcat Users List'
Subject: RE: DB connection error -Tomcat 6 config

Sorry, no.

webapps/chngctrl/META-INF/context.xml.

Thanks, Chuck.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Monday, March 01, 2010 4:29 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

 If I try to reference the resource reference in the
 webapps/META-INF/context.xml file,

Is that the real location?  If so, it's not valid.  The webapps directory is 
the default directory under which each webapp is normally deployed; there must 
be a webapp name between webapps and META-INF (e.g., ROOT).  Any other 
construct is incorrect.

 - 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


-
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: DB connection error -Tomcat 6 config

2010-03-01 Thread Propes, Barry L
Yes, I believe that is indeed getting created.

Should that be being done by Tomcat? Or prevented by some configuration on my 
end?

 

-Original Message-
From: Felix Schumacher [mailto:felix.schumac...@internetallee.de] 
Sent: Friday, February 26, 2010 12:37 AM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

Hi,

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

Bye
 Felix


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

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


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

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

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

Thanks, Chuck.


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

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

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


in webapps/WEB-INF/web.xml

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

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

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

 - Chuck


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


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



RE: DB connection error -Tomcat 6 config

2010-03-01 Thread Caldarale, Charles R
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Yes, I believe that is indeed getting created.
 
 Should that be being done by Tomcat?

Yes, the Context element is copied from the webapp to 
conf/Catalina/[host]/[appName].xml when the webapp is first deployed.  If you 
replace the webapp without undeploying it first, you should also delete the 
[appName].xml file; otherwise, Tomcat treats it as something placed there by 
the administrator to override the one packaged with the webapp.

 - Chuck


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



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



RE: DB connection error -Tomcat 6 config

2010-03-01 Thread Propes, Barry L

 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, March 01, 2010 12:32 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config
 
 Yes, I believe that is indeed getting created.
 
 Should that be being done by Tomcat?

 Yes, the Context element is copied from the webapp to 
conf/Catalina/[host]/[appName].xml when the webapp is first deployed.  If you 
replace the
 webapp without undeploying it first, you should also delete the 
[appName].xml file; otherwise, Tomcat treats it as something placed there by 
the 
 administrator to override the one packaged with the webapp.

 - Chuck



Ok, I gotcha.

Still having some issues, though I did as you'd advised here above.

Seems that if I source the factory as oracle.jdbc.pool.OracleDataSourceFactory 
I get an error stating 

SEVERE: Null component Catalina:type=DataSource,path=/murach,host=localhost,clas
s=javax.sql.DataSource,name=jdbc/myoracle
Mar 1, 2010 12:48:57 PM org.apache.catalina.startup.HostConfig deployDirectory

And if I source it as I then get a different error stating   
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not crea
te resource factory instance [Root exception is java.lang.ClassCastException: or
g.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to javax.naming.spi.Obj
ectFactory]

This upon startup, when I simply start up Tomcat. 

Had the context element in my META-INF/context.xml file (of the webapp) and 
whether or not I specify a resource-ref element in the web.xml doc.

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



RE: DB connection error -Tomcat 6 config

2010-03-01 Thread Propes, Barry L
Thanks,

Yeah I tried this and either get a NPE (can't see the Oracle driver) or an 
error if I reference the Tomcat factory class, like I've previously done on my 
older version  (4.1.xx).
I might try backing up to 6.0.18 and give it a shot.


-Original Message-
From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] 
Sent: Thursday, February 25, 2010 10:58 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

Hi

I hope this helps


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

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

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


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

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



With regards
karthik



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

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


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

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

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

Thanks, Chuck.


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

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

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


in webapps/WEB-INF/web.xml

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

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

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

 - Chuck


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


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


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



  1   2   >