java - org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io exception: Oracle Error ORA-12650) -


i using apache common dbcp 1.2.2 jar create database datasource in project database side have upgraded database oracle 11.2.0.4.1 oracle 11.2.0.4.5. below code:

  1. driver=oracle.jdbc.driver.oracledriver
  2. url=jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(host=oramtbdocq.qs2x.vwg)(port=1560)))(connect_data=(server=dedicated)(service_name=mtbdocq.qs2x.vwg)))
  3. initialsize=10
  4. maxidle=10
  5. maxactive=10

we using ojdbc7.jar since jdk 1.7

code 1: trying make jdbc connection using dbcp 1.2.2 jar

 try{         org.apache.commons.dbcp.basicdatasource datasource = new basicdatasource();         datasource.setdriverclassname(driver);         datasource.seturl(url);         datasource.setusername(username);         datasource.setpassword(password);         datasource.setinitialsize(initialsize);         datasource.setmaxidle(maxidle);         datasource.setmaxactive(maxactive);         basicdatasourcecon =datasource.getconnection();         system.out.println("\n basicdatasourcecon ::"+basicdatasourcecon);         system.out.println("\n\n<<<<<<< --- connected oracle db basicdatasource jdbc connection ------ >>>>>>\n\n");            }catch(exception e2){         system.out.println("\n <<<<<<<<<<<< inside  basicdatasource jdbc connection exception block >>>>>>>>>>>>>>> ::");                     e2.printstacktrace(); } 

exception:

at org.apache.commons.dbcp.basicdatasource.createdatasource(basicdatasource.java:1225)     @ org.apache.commons.dbcp.basicdatasource.getconnection(basicdatasource.java:880)     @ com.emc.xcp.bam.bamserver.listener.bamcontextloaderlistener.jdbctestconnection(bamcontextloaderlistener.java:265)     @ com.emc.xcp.bam.bamserver.listener.bamcontextloaderlistener.contextinitialized(bamcontextloaderlistener.java:92)     @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4797)     @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5291)     @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150)     @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:901)     @ org.apache.catalina.core.containerbase.addchild(containerbase.java:877)     @ org.apache.catalina.core.standardhost.addchild(standardhost.java:633)     @ org.apache.catalina.startup.hostconfig.deploydirectory(hostconfig.java:1114)     @ org.apache.catalina.startup.hostconfig$deploydirectory.run(hostconfig.java:1673)     @ java.util.concurrent.executors$runnableadapter.call(executors.java:471)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:334)     @ java.util.concurrent.futuretask.run(futuretask.java:166)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)     @ java.lang.thread.run(thread.java:722) caused by: java.sql.sqlexception: io exception: oracle error ora-12650     @ oracle.jdbc.driver.databaseerror.throwsqlexception(databaseerror.java:113)     @ oracle.jdbc.driver.databaseerror.throwsqlexception(databaseerror.java:147)     @ oracle.jdbc.driver.databaseerror.throwsqlexception(databaseerror.java:257)     @ oracle.jdbc.driver.t4cconnection.logon(t4cconnection.java:389)     @ oracle.jdbc.driver.physicalconnection.<init>(physicalconnection.java:454)     @ oracle.jdbc.driver.t4cconnection.<init>(t4cconnection.java:165)     @ oracle.jdbc.driver.t4cdriverextension.getconnection(t4cdriverextension.java:35)     @ oracle.jdbc.driver.oracledriver.connect(oracledriver.java:802)     @ org.apache.commons.dbcp.driverconnectionfactory.createconnection(driverconnectionfactory.java:38)     @ org.apache.commons.dbcp.poolableconnectionfactory.makeobject(poolableconnectionfactory.java:294)     @ org.apache.commons.dbcp.basicdatasource.validateconnectionfactory(basicdatasource.java:1247)     @ org.apache.commons.dbcp.basicdatasource.createdatasource(basicdatasource.java:1221)     ... 17 more 

but when using simple jdbc connection going fine. code 2: simple jdbc connection going fine.

try{                  properties props=new properties();                 props.put("user", username);                 props.put("password", password);                 props.put("maxidle", maxidle);                 props.put("maxactive", maxactive);                 props.put("initialsize", initialsize);                  class.forname(driver);                 drivermanager.getdriver(url);                 simplecon = drivermanager.getconnection(url,props);  //drivermanager.getconnection(url,username,password);                 system.out.println("\n simple jdbc simplecon ::"+simplecon);                 system.out.println("\n\n<<<<<<< --- connected oracle db  simple jdbc connection ------ >>>>>>\n\n");                }catch(exception e1){                   system.out.println("\n <<<<<<<<<<<< inside  simple jdbc connection exception block >>>>>>>>>>>>>>> ::");                   e1.printstacktrace();                 } 

any idea? root cause.

thanks in advance.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -