I have a web App running in tomcat 7 and tomcat 6. But when I try to migrate to tomcat 8 it won't let me, there are some exceptions like this one:
javax.servlet.ServletException: La ejecución del Servlet lanzó una excepción
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:314)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at mx.com.vw.servlet.filters.StylizerFilter.doFilter(StylizerFilter.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2463)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2452)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.AbstractMethodError
at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:913)
at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:913)
at org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:226)
at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:302)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2208)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2191)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1945)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
at mx.com.vw.db.PoolDataAccessor.openConnection(PoolDataAccessor.java:50)
at mx.com.vw.kp.servlet.SemaphoreServlet.retrieve(SemaphoreServlet.java:130)
at mx.com.vw.kp.servlet.SemaphoreServlet.processRequest(SemaphoreServlet.java:57)
at mx.com.vw.kp.servlet.SemaphoreServlet.doGet(SemaphoreServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
... 23 more`
Here's my context file from my App:
<Resource auth="Container"
connectionProperties="autoReconnect=true;
secondsBeforeRetryMaster=20;
autoReconnectForPools=true;
cachePrepStmts=true;"
driverClassName="com.mysql.jdbc.Driver"
factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
logAbandoned="false"
maxTotal="10"
maxIdle="3"
maxOpenPreparedStatements="-1"
maxWaitMillis="-1"
name="jdbc/KPPool"
password="infOmaP78257"
poolPreparedStatements="true"
removeAbandonedOnBorrow="true"
removeAbandonedOnMaintenance="true"
removeAbandonedTimeout="30"
type="javax.sql.DataSource"
url="jdbc:mysql://myhost:3306/mybd?noAccessToProcedureBodies=true"
username="myuser"/>
<Realm className="org.apache.catalina.realm.JDBCRealm"
connectionName="java_apps"
connectionPassword="mypass"
connectionURL="jdbc:mysql://myhost:3306/mybd"
driverName="com.mysql.jdbc.Driver"
roleNameCol="role"
userCredCol="password"
userNameCol="username"
userRoleTable="roles"
userTable="users"
localDataSource="true"
debug="99"/>
I think is something about my database connection, because once I tried to do something that requires a db connection, it would send me the exception.
I'm using netbeans 8.2, working in Windows 7. I'm new working with jsp and stuff so I don't what I'm missing here. Does anyone have a solution? or do you have configuration files of tomcat 8 that I can check? I would appreciate your help.
Thank You?
The error seems to happen when the connection pool tries to delegate the validation of the connection to the underlying jdbc driver. To confirm, try adding this config parameter under the Resource element of your context file:
validationQuery="select 1"
This will tell DBCP to use that validation query instead of delegating the validation. Iirc, validation was disabled by default in Tomcat 7 (DBCP 1.x) so that could explain the change in behavior.
I had the same problem when I upgrade tomcat7 to tomcat8.5. I answered this problem check the below link may be that one can solve your problem.
Tomcat 8, axis2 webservices aar, spring jndi not bound in context
Related
I am unpacking the application war manually in tomcat as I am specifying the context for the application in $CATALINA/conf/Catalina/host/ROOT.xml. The docBase is specified in here,
<?xml version="1.0"?>
<Context
path=""
docBase="/opt/tomcat/tc3/webapps/TC3"
reloadable="true"
/>
When the same war is unpacked by tomcat, i don't see any issues but when I unpack it manually using unzip command, i run into below jasper issue,
org.apache.jasper.JasperException: Unable to find taglib "html" for URI: /WEB-INF/struts-html.tld
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:176)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:434)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448)
at org.apache.jasper.compiler.Parser.parse(Parser.java:145)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:201)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
So clearly the issue is because of manual unpacking of war VS the way tomcat unpacks the war. How are WARs unpacked manually or is there a way to make tomcat unpack while specifying the docBase and the context path ?
I have externalized the manually exploded application. I had kept it in a location /opt/test/TC3 and made the changes in CONFIG_BASE to point the docBase to this location.
But that seems to not solve the issue. Is there a way to autoDeploy while specifying the context ?
I had this working by having different paths for appBase & docBase. docBase contained the path of the directory where my application is manually exploded.
Hopefully it helps someone.
We recently started converting a large webapp to Maven, and everything seemed to be working great, but no matter what we do, Maven doesn't recognize the tomcat-dbcp.jar file on the tomcat server. In my dependencies, I have set the following:
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-dbcp</artifactId>
<version>8.0.26</version>
<scope>provided</scope>
</dependency>
But I get the following stacktrace:
Error: javax.servlet.jsp.JspException: java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z
URI: /as/CheckReport
Error Message: oracle.jdbc.driver.T4CConnection.isValid(I)Z
Status code: 500
org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:913)
org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:226)
org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:302)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2208)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2191)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1945)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
com.networkfleet.sre.common.db.Resource.getDBConnectionDEV(Resource.java:75)
com.networkfleet.sre.app.checkreport.CheckReportSrv.doGet(CheckReportSrv.java:63)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2463)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2452)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
I should point out that this was never a problem before Maven, and we haven't made server side changes that should cause this.
I'm currently using a odjbc7.jar driver, which is up to date and has been installed through Maven, appears in my repository in the correct location, and is included in the app itself via a system scope. This is the identical driver file that is being used in the non-maven build, where this error does not appear.
I'm using the ojdbc7.jar that is distributed from the Oracle site, and so far it has worked perfectly. Recently, however, we've decided to switch to using a maven structure for our webapp development so I've been converting our Java Web App to maven. Now I'm seeing this oracle.jdbc.driver.T4CConnection.isValid(I)Z error when making an Oracle DB connection even though I'm using the exact same driver file as I was in my non-maven build. I have the dependency declared like this:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>7</version>
</dependency>
I have manually installed the driver using Netbeans, as the maven depository does not contain the ojdbc7 driver.
Why am I seeing this error and what can I do about it? It's clearly a maven related problem seeing as this builds perfectly without maven managing it.
Stack Trace:
org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:913)
org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:226)
org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:302)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2208)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2191)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1945)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
com.networkfleet.sre.common.db.Resource.getDBConnectionDEV(Resource.java:75)
com.networkfleet.sre.app.checkreport.CheckReportSrv.doGet(CheckReportSrv.java:63)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2463)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2452)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
You need run maven install-file since maven can't download it.
https://stackoverflow.com/questions/1074869/find-oracle-jdbc-driver-in-maven-repository/1074971#1074971e
I have a problem when I try to use a stylesheet, it gives me this error:
07-Jul-2015 16:06:53.811 INFO [http-apr-8084-exec-7] mx.com.vw.servlet.filters.StylizerFilter.doFilter Stylizing: xslt/semaphore.xsl with download: false filename:null mimetype:text/html
---
CONSULTA
(Ubicación del error desconocida)java.net.MalformedURLException
java.lang.NullPointerException
at mx.com.vw.servlet.filters.StylizerFilter.doFilter(StylizerFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2463)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2452)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
In my index I ask for the results from a servlet and apply this stylesheet, the sintax is this:
<iframe src="${pageContext.request.contextPath}/semaphore?cmd=retrieve&stylesheet=xslt/semaphore.xsl"
width="100%" height="100%"
scrolling="auto" frameborder="0"></iframe>
If I don't pass the &stylesheet=xslt/semaphore.xsl part, I get the results obviously with not style, that's why I think it has something to do with my xsl, the funny thing is that I run perfectly fine the same app using tomcat 6, and this is with tomcat 8.
Is there some problem with the version of tomcat I'm using?
Also I'm using Xalan 2.7
Any ideas?
I saw this error today when I tried shutting down the server.
Here's the full stacktrace.
06-Jul-2015 05:47:10.407 WARNING [RMI TCP Connection(5)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
org.apache.tomcat.dbcp.pool2.impl.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:582)
org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:439)
org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
org.apache.tomcat.dbcp.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:118)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
com.raghavpro.bookhive.models.database.DatabaseConnectivity.getConnection(DatabaseConnectivity.java:26)
com.raghavpro.bookhive.controllers.book.DetailsServlet.doGet(DetailsServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
Looks like it has something to do with database pooling.
What could I be doing wrong?
Here's my context.xml if it matters.
<Resource name="jdbc/bookhive_db" auth="Container" type="javax.sql.DataSource"
maxActive="10" maxIdle="4" maxWait="10000"
username="admin_bookhive" password="1208019" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/bookhive_db"/>
Ok, I forgot to close the connection object.
I'm not closing it in finally block and forgot to call the method.