-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Rob,

On 2/5/18 10:28 AM, Rob Turner wrote:
> I'm trying to port a jsp application from web logic over to
> tomcat. I'm running tomcat 8.5.9.0. However, I cannot get my dsn to
> work. I'm receiving the following error when I access the dsn:
> 
> Exception:  javax.naming.NameNotFoundException: Invalid or
> unavailable DSN in Fort Bend County. Opening > database connection.
> Name [jdbc/test] is not bound in this Context. Unable to find
> [jdbc].
> 
> I've placed my context.xml in the META-INF directory.  Here is the
> config from context.xml
> 
> <Resource name="jdbc/test" auth="Container" 
> type="javax.sql.DataSource"
> driverClassName="oracle.jdbc.OracleDriver" 
> url="jdbc:oracle:thin:@xxxxxx:xxxx:sid" username="xxxxxx"
> password="xxxxxxx" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
> 
> This is my web.xml config:
> 
> <resource-ref> <description>Test Datasource</description> 
> <res-ref-name>jdbc/test</res-ref-name> 
> <res-type>javax.sql.DataSource</res-type> 
> <res-auth>Container</res-auth> </resource-ref>

If you have a <Resource> in your META-INF/context.xml, you shouldn't
need the <resource-ref> in your WEB-INF/web.xml file. The
<resource-ref> is for mapping globally-defined resources into an
individual web application, but WEB-INF/context.xml is already local
to the application.

Where is your JDBC driver's JAR file located?

Are there any errors in any log files in CATALINA_BASE/logs/*?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlp4ossdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFhsog//TMpKFrwcIbSmPQgt
AA8D+0UYEAH2qhnQPxDHBoWRoT/iWOeE/Pbe+TnYtzTtZzzJgs9VLeGApo+f7KMU
yVZ8OXSQq4hnaC1AQ5BbJfecuddmA2Q6Y4scqlXDdzSP2jGJ2xYceDb01XdOB/2x
Zb8yfLIfLXVaiWJH/W6/ee5pwsaByxZ6wXzWRNkfs3/hnLJ7M78qB4v+pOZUO1D7
JLZ3nAwSGJImRXQqZvJQidhP4xAMimUZX6lGEIZnh1Q9EcjC2H0mWADUB5Bg0Fe2
gLT+eAC8d2aHP4avl53176OTjT2jh6MQ6UrmKHC5JB01Zf6swf/pUNvBns4lp6VV
gGHs8qczUXtEbXJUDAT03sOi4ACV7yPHTy4DSxQrH7dU1pYf9NpMyFQ1ic3W9Xc3
GlO3w+d0aPi0swzCY9ciRkR2tb6WDAOjJr5VveXRxU5cCSD9tKQYWEDSzQGOBK1s
jmBGms261pt2BnZD5VWl48KYEZrgQ9njwMyG8c86LFlLs5hPNwruQfr+DwsrncVo
/BjZsEXEGC1jL+FAIgoguujj4Tq5zdy1eWPV2/FkwgwGB6agZAA/xdEKKtTgQlUK
geaJAgBSoKz61fQEIshuRfaUbQu6tE3MMNRawQUu/sT3R8R8+ozxhwgmzIY0ZBGs
ldNDPPt/zzzd/FSse/1S2lwR6nk=
=vwsv
-----END PGP SIGNATURE-----

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

Reply via email to