Я получаю эту ошибку.
Stacktrace:] с первопричиной
ИНФО | JVM 1 | 2019/06/06 08:49:59 | java.lang.AbstractMethodError
ИНФО | JVM 1 | 2019/06/06 08:49:59 | at net.sourceforge.jtds.jdbc.JtdsConnection.isValid (JtdsConnection.java:2833)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid (DelegatingConnection.java:874)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate (PoolableConnection.java:270)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection (PoolableConnectionFactory.java:389)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory (BasicDataSource.java:2398)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory (BasicDataSource.java:2381)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource (BasicDataSource.java:2110)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection (BasicDataSource.java:1563)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.jsp.startpage_jsp.getDBConnection (startpage_jsp.java:60)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.jsp.startpage_jsp.getUserInfo (startpage_jsp.java:474)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.jsp.startpage_jsp._jspService (startpage_jsp.java:732)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | на javax.servlet.http.HttpServlet.service (HttpServlet.java:742)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:476)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:386)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.jasper.servlet.JspServlet.service (JspServlet.java:330)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | на javax.servlet.http.HttpServlet.service (HttpServlet.java:742)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:231)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в nl.planon.tomcat.ForgotPasswordFilter.doFilter (ForgotPasswordFilter.java:78)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в nl.planon.webrequestsigner.WebRequestSignerFilter.doFilter (WebRequestSignerFilter.java:67)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:199)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:96)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java:610)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:137)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.valves.AbstractAccessLogValve.invoke (AbstractAccessLogValve.java:660)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.authenticator.SingleSignOn.invoke (SingleSignOn.java:240)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | at nl.planon.owasp.valve.WhitelistHTTPMethodsValve.invoke (Белый списокHTTPMethodsValve.java:72)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | at nl.planon.owasp.valve.XSSProtectionHeaderValve.invoke (XSSProtectionHeaderValve.java:175)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в nl.planon.tomcat.AddHeaderValve.invoke (AddHeaderValve.java:117)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | at nl.planon.tomcat.ClickjackHostValve.invoke (ClickjackHostValve.java:107)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:81)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:87)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:343)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.coyote.http11.Http11Processor.service (Http11Processor.java:798)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.coyote.AbstractProcessorLight.process (AbstractProcessorLight.java:66)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.coyote.AbstractProtocol $ ConnectionHandler.process (AbstractProtocol.java:806)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun (NioEndpoint.java:1498)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.util.net.SocketProcessorBase.run (SocketProcessorBase.java:49)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:624)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | в org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run (TaskThread.java:61)
ИНФО | JVM 1 | 2019/06/06 08:49:59 | на java.lang.Thread.run (Thread.java:748)
ИНФО | JVM 1 | 2019/06/06 08:49:59 |
Я нашел несколько решений с добавлением validationQuery = "select 1" в context.xml. Но в моем context.xml у меня нет ресурса.
<Context>
<!-- Authenticate against PlanonRealmLogin (JAAS) -->
<!-- allRolesMode=authOnly" means that no role is needed for '*' requirement -->
<Realm appName="PlanonRealmLogin"
className="org.apache.catalina.realm.JAASRealm"
userClassNames="nl.planon.cerebeus.PnUser"
roleClassNames="nl.planon.cerebeus.PnRole"
allRolesMode="authOnly"/>
<!--Valve className="nl.planon.tomcat.AccessKeyValve" throttle="5000"/-->
<!--Valve className="nl.planon.tomcat.ForgotPasswordLoginValve"/-->
<!-- Will force authentication attempts to be parsed as UTF-8. The Landingpage will prevent HTTP 408 messages
because now, even without a stored original location, Tomcat knows where to forward to. -->
<!-- exceptionAttributeName="PnLoginException"-->
<Valve className="nl.planon.tomcat.PnMessageFormAuthenticator" landingPage="/" characterEncoding="utf-8"/>
<!-- This valve excludes valid webdav users with role webdav_readwrite to enter the web application(s) -->
<!--Valve className="nl.planon.tomcat.ExcludingRoleValve"/-->
<!--Parameter name="trustedServiceKeystore" value="${catalina.home}/webclientKeystore.jks" />
<Parameter name="trustedServiceName" value="webclient" /-->
<Manager pathname="" />
<ResourceLink
name="jdbc/PlanonDS"
global="jdbc/PlanonDS"
type="javax.sql.DataSource" />
<!-- Whitelist the minimal set of HTTP Methods that Web Bootstrap needs -->
<!--Valve className="nl.planon.owasp.valve.WhitelistHTTPMethodsValve" methods="GET, OPTIONS, HEAD, POST, PUT, DELETE" /-->
В моем server.xml я упомянул ресурс.
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
<Resource name="jdbc/PlanonDS"
auth="Container"
type="javax.sql.DataSource"
username=""
password=""
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://SZH1DB;instance=planon"
validationQuery="select 1"
maxActive="8"
maxIdle="4"/>
Здесь я использовал validationQuery = "select 1" . Но все равно я получаю ту же ошибку.
Может кто-нибудь помочь мне с этой ошибкой?