tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vince.w...@thomsonreuters.com>
Subject JDBCRealm - Works OK but logs errors
Date Mon, 10 Nov 2014 16:02:06 GMT
Hello
I have Tomcat 8.0.9 running under NetBeans.  An application using JDBCRealm is authenticating
and authorising users OK but Tomcat is logging errors.

Errors get logged on Tomcat startup and another each time a user logs in.

Numerous occurrences of this Exception:

10-Nov-2014 15:18:48.108 SEVERE [http-nio-8080-exec-3] org.apache.catalina.realm.JDBCRealm.getPassword
Exception performing authentication
java.sql.SQLException: Closed Statement
                at oracle.jdbc.driver.OracleClosedStatement.setString(OracleClosedStatement.java:731)
                at oracle.jdbc.driver.OraclePreparedStatementWrapper.setString(OraclePreparedStatementWrapper.java:289)
                at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java:484)
                at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:525)
                at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:387)
                at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:334)
                at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:111)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:578)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:745)

And just one of this:

10-Nov-2014 15:18:49.249 FINE [http-nio-8080-exec-7] org.apache.catalina.util.LifecycleBase.start
The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/di]]
after start() had already been called. The second call will be ignored.
org.apache.catalina.LifecycleException
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:127)
                at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1270)
                at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:357)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
                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 org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
                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:615)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:745)


The Realm is defined in server.xml as follows:

    <Realm className="org.apache.catalina.realm.JDBCRealm"
                connectionName="weblogin01"
                connectionPassword="xxxxxx"
                type="javax.sql.DataSource"
                driverName="oracle.jdbc.OracleDriver"
                connectionURL="jdbc:oracle:thin:@10.15.120.29:1522:DGSPC"
                userTable="weblogin.t_user"
                userNameCol="username"
                userCredCol="password"
                userRoleTable="weblogin.t_user_role"
                roleNameCol="rolename"   />


The context.xml file is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/di">

    <ResourceLink name="jdbc/sforum01"
                global="jdbc/sforum01"
                type="javax.sql.DataSource"/>

    <ResourceLink name="jdbc/DonorImports"
                global="jdbc/DonorImports"
                type="javax.sql.DataSource"/>

</Context>


The Oracle driver I'm using is ojdbc7.jar which comes with Oracle 12.1.0.1

It is my intention to replace JDBCRealm with a custom realm but I don't want to embark on
writing that until I understand what is wrong with my current setup.

I welcome your thoughts.

Vince




________________________________

This e-mail is for the sole use of the intended recipient and contains information that may
be privileged and/or confidential. If you are not an intended recipient, please notify the
sender by return e-mail and delete this e-mail and any attachments. Certain required legal
entity disclosures can be accessed on our website.<http://thomsonreuters.com/prof_disclosures/>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message