I am trying to connect to oracle 11g through eclipse 3.4 jdk 1.5 tomcat 6
I am getting this error when I am trying to create a database connection with below code
java.sql.Connection con =DriverManager.getConnection("jdbc:oracle:thin:@localhost::","username","password");
The stacktrace is as below:
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1157)
at oracle.jdbc.driver.T4C8TTIpro.receive(T4C8TTIpro.java:129)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1162)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.Display.doGet(Display.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
I have already replaced my ojdbc5.jar to work with jre 1.5 thinking that there might be an issue with the jar file.
I have checked my v$session table for the number of active connections with the below query
select server,machine,status from v$session;
32 entries were returned with 27 entries having status ACTIVE. Further the server is dedicated.
I have read somewhere that most of the connections in the pool remain in inactive state but in my case most of the connections are active. I am not sure why it is so or the problem is because of this.
I have also set the oracle parameter as “_optim_peek_user_binds”=false as suggested in one of the existing posts
but nothing has helped so far. Any help would be appreciated. Thanks
Class.forName("oracle.jdbc.driver.OracleDriver");invoked before calling getConnection method? - learningloop