My jdbc jar file is located in /usr/tomcat8/lib. I see the same error in my log files as on my web page. Our application traps the errors and displays them on the page. I tried to remove the error trapping mechanism and now receive the following when accessing a page containing database access:
org.apache.jasper.JasperException: An exception occurred processing JSP page /fbc/../common/client_configuration.inc at line 286 283: throws NoSuchMethodException, InstantiationException, 284: IllegalAccessException, java.lang.reflect.InvocationTargetException { 285: return (Exception) e.getClass().getConstructor(new Class[]{(new String()).getClass()}) 286: .newInstance(new String[]{additionalMessage + ". " + e.getMessage()}); 287: } 288: 289: Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:588) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause javax.servlet.ServletException: 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]. org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838) org.apache.jsp.fbc.index_jsp._jspService(index_jsp.java:1581) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Rob Turner Vice President, Technical Services Appraisal & Collection Technologies, LLC r...@lgbs.com Main: (210) 403-8670 Fax: (210) 403-8905 http://www.acttax.com CONFIDENTIALITY STATEMENT This email, including any attachments, is confidential. If you are not the intended recipient please notify the sender (only) immediately, and please delete it; you should not copy it or use it for any purpose or disclose its contents to any other person. Appraisal & Collection Technologies, LLC entities reserve the right to monitor all email communications through their networks. Appraisal & Collection Technologies, LLC is wholly-owned by Linebarger Goggan Blair & Sampson, LLP, Attorneys at Law, but does not itself provide legal services to clients. -----Original Message----- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, February 05, 2018 12:31 PM To: users@tomcat.apache.org Subject: Re: dsn config issues -----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 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org