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" 

To: "Tomcat Users List" 
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 Mulepati:

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  element in server.xml file ( except
sensible data )?


I haven't change anythign in server.xml so i have default in it




But in my application I have context.xml with following





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




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



RE: DB Connection error

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


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

2012/1/9 Propes, Barry L :
> 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 Konstantin Kolinko
2012/1/9 Propes, Barry L :
> 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
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 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 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





And this morning when DB restart I had to restart the tomcat to get

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





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

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

I did change my config.xml to







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 Chema
2012/1/9 Anjib Mulepati :
> I did change my config.xml to
>
>
> 
>             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" />
> 
>

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

I did change my config.xml to





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





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

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 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
> >
> > 
> >  >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"
> > />
> > 
> 
> 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 Daniel Mikusa
On Tue, 2012-01-03 at 10:47 -0800, Chema wrote:
> > But in my application I have context.xml with following
> >
> > 
> >  >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"
> > />
> > 
> 
> 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
> But in my application I have context.xml with following
>
> 
>             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"
>             />
> 

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

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

2012/1/3 Anjib Mulepati:

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  element in server.xml file ( except
sensible data )?


I haven't change anythign in server.xml so i have default in it




But in my application I have context.xml with following





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



DB Connection error

2012-01-03 Thread Anjib Mulepati

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

Thanks
Anjib

-
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  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  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  element to your original  element - something like this:


  my.ip.com


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











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 David Smith
HI Astghik

1. Don't put  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  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.
>
> 
>  resourceName="UserDatabase"/>
>  xmlValidation="false" xmlNamespaceAware="false">
> 
> 
> 
> 
> 
> 
>
> 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 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.
>>
>> 
>> > resourceName="UserDatabase"/>
>> > autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 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 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.











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



DB connection error and broken images while changing webapp context path

2010-08-13 Thread Astghik

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.











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
-- 
View this message in context: 
http://old.nabble.com/DB-connection-error-and-broken-images-while-changing-webapp-context-path-tp29427611p29427611.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: DB connection error -Tomcat 6 config

2010-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 :
> 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-04-16 Thread Konstantin Kolinko
2010/4/17 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
>
>>
>> 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
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-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 
> without being defined in a 
> Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig
> validateSecurityRoles
> INFO: WARNING: Security role name admin used in an 
> without being defined in a 
> Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig
> validateSecurityRoles
> INFO: WARNING: Security role name comply used in an 
> without being defined in a 
> 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-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  without 
being defined in a 
Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig 
validateSecurityRoles
INFO: WARNING: Security role name admin used in an  without 
being defined in a 
Mar 26, 2010 12:40:19 PM org.apache.catalina.startup.ContextConfig 
validateSecurityRoles
INFO: WARNING: Security role name comply used in an  without 
being defined in a 
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 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
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-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-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
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 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-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-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 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-20 Thread Travis
I can't remember the errors, but I had a hard time trying to setup Oracle on
Tomcat 6. My config looks something like this.  The URL is basically the TNS
Names entry with the whitespace removed.  The nice this is that its RAC
aware, and handles failing over to other nodes in the RAC nicely.  







-Travis



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

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(PageContextI
mpl.java:862)

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

org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.j
ava: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:3
77)

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(ResourceLink
Factory.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:





And WEB-INF/web.xml

Change Ctrl App
jdbc/myoracle
javax.sql.DataSource
Container
  

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.

> 
> 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="orac

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

I would suggest removing this from your  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



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

>> 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 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 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 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 Propes, Barry L
che/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 Propes, Barry L
It is there, actually. AND, like I'd mentioned in another message (which who 
knows, might have been blocked out for some reason) the params using the same 
driver will retrieve databouncing through to a details page using the 
Context object seem to fail.
So the driver's there and will work simply by specifying the params, but not in 
the  reference.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, March 19, 2010 11:50 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

(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


-
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.0>jar -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
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.0>jar -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 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 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.0>jar -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 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.0>jar -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 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.0>jar -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.(ZipFile.java:114)
at java.util.zip.ZipFile.(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 
MA

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-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  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  element being ignored.  Check that 
you don't have a  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 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 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  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
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  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?

  NamingEnumeration 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
> 
> 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 Bob Hall
--- On Thu, 3/18/10 at 3:07 PM, Propes, Barry L  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?

  NamingEnumeration 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 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  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 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 
> R  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 Bob Hall


--- On Thu, 3/18/10 at 3:02 PM, Pid  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
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 Pid

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

--- On Thu, 3/18/10 at 1:56 PM, Caldarale, Charles 
R  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
Believe it or not,  I didn't try
70: DataSource ds = (DataSource) initCtx.lookup("java:/myoracle");

But I did in fact try
70: DataSource ds = (DataSource) initCtx.lookup("java:jdbc/myoracle");  to no 
avail.

Let me test the first DataSource attempt and see.

-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

--- On Thu, 3/18/10 at 1:56 PM, Caldarale, Charles R 
 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


-
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  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 Bob Hall
--- On Thu, 3/18/10 at 1:56 PM, Caldarale, Charles R 
 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 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  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 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  element in the 
> conf/Catalina/ folder or subfolders

That in itself is suspicious, since Tomcat 6.0.26 should be copying every 
 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  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 Propes, Barry L
Well, while I did point it to the proper factory object -  
factory="org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory"

I still get the same error - 

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)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at 
org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97)
at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)   -- 
this line - I even tried importing the javax.naming.spi.NamingManager  class in 
my JSP to see if that would help
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at 
org.apache.jsp.chngctrl.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:141)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 


Same error.

-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  element being ignored.  Check that 
you don't have a  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


-
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

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

That in itself is suspicious, since Tomcat 6.0.26 should be copying every 
 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  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



RE: DB connection error -Tomcat 6 config

2010-03-18 Thread Propes, Barry L
Oh yes, you're correct on the factory reference -- the double dbcp reference. 
My fault.

However, I do not have an additional   element in the conf/Catalina/ 
folder or subfolders being referenced at all.

But it does appear to be ignoring the  element.

-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  element being ignored.  Check that 
you don't have a  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


-
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  element being ignored.  Check that 
you don't have a  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
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 Propes, Barry L
Thanks, Gregor.

Tried this exactly, but still get the same error unfortunately - 

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at 
org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97)
at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)

And in the logs:

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)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at 
org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(ResourceLinkFactory.java:97)
at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at 
org.apache.jsp.chngctrl.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:148)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
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:286)
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: 2smart4u [mailto:rc4...@googlemail.com] 
Sent: Thursday, March 18, 2010 2:35 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

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:



  


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


-
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 2smart4u
One more word:

The config I posted refers to 2.4 xsd, so put this at the beginning of
your deployment-descriptor:


http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

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



  


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

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

> Change Ctrl App
> jdbc/myoracle
> javax.sql.DataSource
> Container

...actually, I checked
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; and I can't find an allowed 
element  in the 2.5 schema (which certainly is surprising to me). 
Try taking-out your  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:



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 Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 3/18/2010 1:16 PM, Propes, Barry L wrote:
>  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-)
> 
> 
> 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"> 
> 
> 

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

> Change Ctrl App
> jdbc/myoracle
> javax.sql.DataSource
> Container

...actually, I checked
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; and I can't find an
allowed element  in the 2.5 schema (which certainly is
surprising to me). Try taking-out your  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:



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
Not a problem.

  config located in:  .../webapps/chngctrl/META-INF/context.xml -



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


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


Change Ctrl App
jdbc/myoracle
javax.sql.DataSource
Container
  


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

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

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

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





And WEB-INF/web.xml

Change Ctrl App
jdbc/myoracle
javax.sql.DataSource
Container
  

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.

> 
> 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"
> />
> 

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

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:





And WEB-INF/web.xml

Change Ctrl App
jdbc/myoracle
javax.sql.DataSource
Container
  

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.

> 
> 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"
> />
> 

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

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

Finally, 30 seconds is a very short "abandoned timeout", though

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  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
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  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-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-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-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 
Sent: Tuesday, March 02, 2010 6: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-02 Thread Bob Hall
--- On Tue, 3/2/10 at 3:39 PM, Propes, Barry L  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



  1   2   >