我收到此错误。
Stacktrace:]具有根本原因 信息| jvm 1 | 2019/06/06 08:49:59 | java.lang.AbstractMethodError 信息| jvm 1 | 2019/06/06 08:49:59 |在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 |在nl.planon.owasp.valve.WhitelistHTTPMethodsValve.invoke(WhitelistHTTPMethodsValve.java:72) 信息| jvm 1 | 2019/06/06 08:49:59 |在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 |在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” 。但是我仍然遇到同样的错误。
有人可以帮助我解决这个错误吗?