Oracle JDBC Connection error: Violation of protocol

Source: Internet
Author: User
Tags oracleconnection

Oracle version: 11.2.0.2

Connection mode: Spring JdbcTemplate connects to the database and loads the configuration file via Classpathxmlapplicationcontext ("Vodbosscontext.xml").

Do the following error in the unit test package:

Org.springframework.jdbc.CannotGetJdbcConnectionException:Could not get JDBC Connection; Nested exception is Org.apache.commons.dbcp.SQLNestedException:Cannot create poolableconnectionfactory (breach of agreement)

At Org.springframework.jdbc.datasource.DataSourceUtils.getConnection (datasourceutils.java:82)

At Org.springframework.jdbc.core.JdbcTemplate.execute (jdbctemplate.java:577)

At Org.springframework.jdbc.core.JdbcTemplate.update (jdbctemplate.java:792)

At Org.springframework.jdbc.core.JdbcTemplate.update (jdbctemplate.java:850)

At Org.springframework.jdbc.core.JdbcTemplate.update (jdbctemplate.java:858)

At Com.topdvte.vodsea.client.dao.VodCustDao.insert (vodcustdao.java:21)

At Com.topdvte.vodsea.client.dao.VodCustDaoTest.testInsert (vodcustdaotest.java:40)

At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)

At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)

At Java.lang.reflect.Method.invoke (method.java:597)

At Junit.framework.TestCase.runTest (testcase.java:168)

At Junit.framework.TestCase.runBare (testcase.java:134)

At Junit.framework.testresult$1.protect (testresult.java:110)

At junit.framework.TestResult.runProtected (testresult.java:128)

At Junit.framework.TestResult.run (testresult.java:113)

At Junit.framework.TestCase.run (testcase.java:124)

At Junit.framework.TestSuite.runTest (testsuite.java:232)

At Junit.framework.TestSuite.run (testsuite.java:227)

At Org.junit.internal.runners.JUnit38ClassRunner.run (junit38classrunner.java:81)

At Org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (junit4testreference.java:50)

At Org.eclipse.jdt.internal.junit.runner.TestExecution.run (testexecution.java:38)

At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:459)

At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:675)

At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:382)

At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:192)

caused By:org.apache.commons.dbcp.SQLNestedException:Cannot create poolableconnectionfactory (breach of agreement)

At Org.apache.commons.dbcp.BasicDataSource.createDataSource (basicdatasource.java:1225)

At Org.apache.commons.dbcp.BasicDataSource.getConnection (basicdatasource.java:880)

At Org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection (datasourceutils.java:113)

At Org.springframework.jdbc.datasource.DataSourceUtils.getConnection (datasourceutils.java:79)

... More

Caused by:java.sql.SQLException: breach of agreement

At Oracle.jdbc.dbaccess.DBError.throwSqlException (dberror.java:180)

At Oracle.jdbc.dbaccess.DBError.throwSqlException (dberror.java:222)

At Oracle.jdbc.dbaccess.DBError.check_error (dberror.java:944)

At oracle.jdbc.ttc7.O3log.receive2nd (o3log.java:521)

At Oracle.jdbc.ttc7.TTC7Protocol.logon (ttc7protocol.java:262)

At Oracle.jdbc.driver.oracleconnection.<init> (oracleconnection.java:307)

At Oracle.jdbc.driver.OracleDriver.getConnectionInstance (oracledriver.java:442)

At Oracle.jdbc.driver.OracleDriver.connect (oracledriver.java:321)

At Org.apache.commons.dbcp.DriverConnectionFactory.createConnection (driverconnectionfactory.java:38)

At Org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (poolableconnectionfactory.java:294)

At Org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory (basicdatasource.java:1247)

At Org.apache.commons.dbcp.BasicDataSource.createDataSource (basicdatasource.java:1221)

... More

This question has been checked for most of the day, to make a few points:

1. JDBC Configuration Error

2, the user password is not correct

3. Check the Oracle error log, not very good view

4, the Oracle driver version is not correct

Each of the above has been verified, or not, and then restarted the next eclipse, OK.

The final confirmation is that the Oracle driver version is incorrect

Why the restart to take effect, the problem has not been understood, who knows to tell.

Summarize:

The error message indicates that the problem is in the JDBC Oracle package, no catch, leading to the wrong direction, white busy.

Caused by:java.sql.SQLException: breach of agreement

At Oracle.jdbc.dbaccess.DBError.throwSqlException (dberror.java:180)

At Oracle.jdbc.dbaccess.DBError.throwSqlException (dberror.java:222)

At Oracle.jdbc.dbaccess.DBError.check_error (dberror.java:944)

At oracle.jdbc.ttc7.O3log.receive2nd (o3log.java:521)

Oracle JDBC Connection error: Violation of protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.