ClassCastException while asting ResultSet to OracleResultSet. Using weblogic connection pool

Hi,
I am using weblogic server 5.1 and connection pools for accessing Oracle database.
We wanted to use BLOB in oracle and I coded the java class to insert data into BLOB
field.
When I code a sample calss without using weblogic pool, I do not have any problem.
But when I use the weblogic connection pool, I get classcastException as described
below:
I am using
"insert into shipmentCorrection (" + insfields + ") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
to insert a dummy record with empty_blob and then getting the BLOB locater by the
following code:
java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROM shipmentCorrection
WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+ CorrectionNum +" and
Bl_Type = '"+ blType +"'" );
rset.next();
BLOB blob = ((OracleResultSet)rset).getBLOB(1);
java.io.OutputStream outstream = blob.getBinaryOutputStream();
IN the above line of code where I cast the ResultSet to OracleResultSet, I get the
classcastException as follows:
I donno how to solve this problem. Could any one please help me on this ?
java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
at fmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
.java:2471)
at fmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
java:1316)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
jectAdapter.java:347)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
tHandler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
Thanks,
Muralidaran Chakravarthy

When using weblogic pool drivers it is not possible to cast to an Oracle
JDBC driver, (or any other driver )
pool driver hides the driver you have configured.
"Muralidaran Chakravarthy" <[email protected]> wrote in message
news:3ce16855$[email protected]..
>
Hi,
I am using weblogic server 5.1 and connection pools for accessing Oracledatabase.
We wanted to use BLOB in oracle and I coded the java class to insert datainto BLOB
field.
When I code a sample calss without using weblogic pool, I do not have anyproblem.
But when I use the weblogic connection pool, I get classcastException asdescribed
below:
I am using
"insert into shipmentCorrection (" + insfields + ") VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
>
to insert a dummy record with empty_blob and then getting the BLOB locaterby the
following code:
java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROMshipmentCorrection
WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+CorrectionNum +" and
Bl_Type = '"+ blType +"'" );
rset.next();
BLOB blob = ((OracleResultSet)rset).getBLOB(1);
java.io.OutputStream outstream = blob.getBinaryOutputStream();
IN the above line of code where I cast the ResultSet to OracleResultSet, Iget the
classcastException as follows:
I donno how to solve this problem. Could any one please help me on this ?
java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
atfmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
java:2471)
atfmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
java:1316)
atweblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
jectAdapter.java:347)
atweblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
tHandler.java:69)
atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
Thanks,
Muralidaran Chakravarthy

Similar Messages

  • Error While reading CLOB from Oracle using WebLogic Connection Pool, Works fine with out using pool

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

    PROBLEM DESCRIPTION :
         When I try to read a clob from Oracle, I receive "ORA-03120: two-task
    conversion routine: integer overflow" Error.
         This error occurs only for CLOB Type and only if I try to connect to
    Oracle using WebLogic JDriver/Oracle POOL.
         IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
    connection to ORacle with out any problem.
         Below Please find the JAVA CODE for Both Working and NON Working .
    Created a Connection Pool as:
    Name: MyJDBCConnectionPool
    URL : jdbc:weblogic:oracle
    DIRVER:weblogic.jdbc.oci.Driver
    NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
    Driver myDriver =
    (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection mconn =
    myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
    mconn.setAutoCommit (false);
    CallableStatement cs = mconn.prepareCall("{call
    P_XMLTEST2(?)}"); //This returns a CLOB
    cs.registerOutParameter(1,java.sql.Types.CLOB);
    cs.execute();
    Clob clob = null;
    clob = cs.getClob(1);
    String data =new String();
    data = clob.getSubString(1, (int)clob.length());
    System.out.println(data); //print the data
    data = null;
    clob=null;
    cs.close();
    ERROR MESSAGE:
         ORA-03120: two-task conversion routine: integer overflow
    I appreciate your help on this problem.

  • Problem in retriving varray when using weblogic connection pool

    Hi,
         I had similar problem when we I am using the weblogic connection pool. I had similar setup i.e weblogic 5.1 servicepack9 and oracle 8.1.7.
    I cofigarud the weblogic connection pool using Oracle thin driver.
    But if I am using with oracle thin driver directly I am able to retrive.
    If any one know how to retrive varray from procedure using weblogic connection pool please send me it.
    Thanx.
    Bye,
    Satya

    http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#setAutoCommit(boolean)

  • [原创] 有关Weblogic Connection Pool 连接恢复的问题

    这是一个古老的问题,一直困扰我,这里既然碰到了,就看看能不能解决。
    环境描述:
    WEBLOGIC版本是8.1 SP2,数据库是SQL SERVER 2000,分别部署在两个服务器上。
    第一步:
    问题描述:
    数据库服务器重新启动,导致WEBLOGIC 的CONNECTION POOL中的连接中断,EJB无法获得连接,导致应用出错。
    解决方法:
    进入WEBLOGIC ADMIN CONSOLE,
    Services->JDBC->Connection Pools->Config->Connections, 点开Advanced Options.
    打开 Test Reserved Connections ,Test Created Connections,Test Released Connections这三个选项。
    将Test Table Name属性设置为:sysproperties(SQL Server系统表,即使自己的应用不存在,这个表也存在,而且默认的内部没有数据)
    根据如下解释:
    Connections that fail the test are closed and reopened to re-establish a valid physical database connection.
    (You must specify a Test Table Name below.)
    每次调用首先进行测试连接,如果测试失败连接将重新建立。
    测试结果:
    WEBLOGIC启动后,关闭数据库SQL SERVER,应用服务器前端调用此时失败。
    重新启动SQL SERVER后,WEBLOGIC端略做等待,前端应用恢复正常。
    第二步:
    问题描述:
    进一步测试,如果WEBLOGIC先启动,启动完成后再启动数据库。
    在WEBLOGIC CONSOLE得到如下输出:
    <2006-3-22 上午11时50分08秒 GMT+08:00> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for p
    ool "MyJDBC Connection Pool": [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.>
    <2006-3-22 上午11时50分10秒 GMT+08:00> <Error> <JDBC> <BEA-001150> <Connection Pool "MyJDBC Connection Pool" deployment
    failed with the following error: 0:Could not create pool connection. The DBMS driver exception was: [Microsoft][SQLServe
    r 2000 Driver for JDBC]Error establishing socket..>
    <2006-3-22 上午11时50分10秒 GMT+08:00> <Error> <JDBC> <BEA-001151> <Data Source "MyJDBC Data Source" deployment failed w
    ith the following error: DataSource(jdbc/OMSEIITxDS) can't be created with non-existent Pool (connection or multi) (MyJD
    BC Connection Pool).>
    Unable to deploy EJB: XXXXXXX from XXXXXXX.jar:
    [EJB:011028]The DataSource with the JNDI name: jdbc/XXXXXX could not be located. Please ensure that the DataSource h
    as been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
    1、在默认初始化打开的连接一一失败以后,连接池发现可用的连接为0,郁闷的宣布自己部署失败。
    2、接着数据源发现没有可用的连接池,自己也宣布部署失败。
    3、下面所有的EJB发现不了数据源的JNDI名,部署也全部失败。
    应用启动完成后,大部分EJB的状态为INACTIVE。前端应用无法使用,此时启动数据库,前端应用无法使用。
    手动重新部署 EJB失败,错误还是找不到JNDI,前端应用无法使用。
    手动重新部署 连接池,数据源后,部署EJB 依然失败。前端应用无法使用。
    解决方法:
    进入WEBLOGIC ADMIN CONSOLE,
    Services->JDBC->Connection Pools->Config->Connections, 点开Advanced Options.

    Connection Creation Retry Frequency 参数设置为 60。
    ConnectionCreationRetryFrequencySeconds含义:
    当创建数据库连接时,如果数据库不可用(如数据库没启动),隔多长时间试着重新创建该连接,
    WLS8.1会每隔ConnectionCreationRetryFrequencySeconds秒重试一次.直到JDBC POOL创建成功
    参考:http://dev2dev.bea.com.cn/techdoc/20030469.html,‘JDBC Connect Pool’部分。
    英文解释可以直接控制台上看到,或者edocs查。
    测试结果:
    将数据库关闭,WEBLOGIC重新启动。
    在WEBLOGIC CONSOLE得到如下输出:
    打开Connection Creation Retry Frequency 参数后,连接池在第一轮尝试失败以后,就成功部署了,数据源也成功部署。
    EJB部署会失败,但是提示也与先前的不同:
    Unable to deploy EJB: XXXXXXX from XXXXXXX.jar:
    weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool MyJDBC Connection Pool to
    allocate to applications, please increase the size of the pool and retry..
    每隔一段时间会看到,CONNECTION POOL不断的重新进行连接:
    <2006-3-22 下午12时17分56秒 GMT+08:00> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for p
    ool "MyJDBC Connection Pool": [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.>
    在WEBLOGIC启动完成后,所有EJB为INACTIVE状态。
    启动数据库服务器,稍后,手动重新部署所有的EJB,EJB可以部署成功,前端应用可以正常使用。
    此时,此问题已经基本解决,仍需要手动部署EJB。
    第三步:
    问题描述:
    解决方法:
    有关部署次序的问题,首先查阅WEBLOGIC文档,http://edocs.bea.com/wls/docs81/faq/deploy.html#744900,得到
    WebLogic Server deploys server-level resources (first JDBC and then JMS) before deploying applications.
    Applications are deployed in this order: connectors, then EJBs, then Web Applications.
    If the application is an EAR, the individual components are loaded in the order in which they are declared
    in the application.xml deployment descriptor.
    WEBLOGIC先部署服务器端资源,JDBC -> JMS....,然后部署我们的应用,EJB->WEB APPLICATION。
    实际从WEBLOGIC启动日志来看,即使打开了Connection Creation Retry Frequency,如果当时数据库不是可用的,CONNECTION POOL
    会不断的调度CONNECTION进行重新连接。但是此时,EJB的部署也同时在进行。个人猜测这应该是两个不同的线程(组)分别调度的任务。
    现在考虑的是能不能用StartupClass截住EJB的部署过程,粗略的说是如果DATASOURCE没有连接好,或者没有可用的连接池,
    就不往下进行EJB部署的过程。
    参考:http://edocs.bea.com/wls/docs81/config_xml/EJBComponent.html#DeploymentOrder
    DeploymentOrder:
    A priority that the server uses to determine when it deploys an item. The priority is relative to other deployable
    items of the same type. For example, the server prioritizes and deploys all EJBs before it prioritizes and
    deploys startup classes.Items with the lowest Deployment Order value are deployed first.
    There is no guarantee on the order of deployments with equal Deployment Order values.
    There is no guarantee of ordering across clusters. Default: 1000 Minimum: 0 Maximum: 2N31-1
    在部署同一类应用时,按照 DEPLOYMENT LOADER的数值决定,数值越小越先。(EJB的参数在ADMIN CONSOLE界面上叫做LOAD ORDER)
    而且上面看来服务器是先部署EJB,再部署STARTUP CLASS,遗憾了。
    好在STARTUP CLASS上有两个选项,
    Run Before Application Deployments
    Run Before Application Activations
    这两个选项分别可以设置StartupClass分别在系统资源部署之前,以及在系统资源部署和用户应用部署之间启动。
    选上Run Before Application Activations。
    现在可以了,我写了一个STARTUP CLASS,思路见下:
    主代码:
    private void testConnection(){
    while (!isTimeout() && !getConnection()){
    try{
    Thread.sleep(testInterval*1000);
    }catch(Exception ignor){}
    log("DBConnectHolder job finished with following status:");
    log("Timeout:"+isTimeout +",Connection OK:"+isConnected);
    测试结果:
    只要配置的等待时间足够长,应用服务器先行启动的情况下,等待数据库启动后才进行EJB等等的部署。
    (主要考虑如果数据库连接不OK,EJB启动了也没有太大用,还得手工重新部署。)算是比较完满的解决了问题。
    另外一个思路是是否可行? 通过MBean, 在CONNECTION 建立起来以后通知一把,进行EJB的重新部署。
    没来得及研究,请有经验的同学帮我补充完善。
    结论:
    其实也没什么结论,只是把自己遇到问题,解决问题的思路写了一下。短时间内阅读的文献有限,可能采用了一些苯方法
    ,或者走了弯路,也请大家拍砖。
    在WL8版本上,数据库连接进行恢复和重新连接的时候,上面提出的几个参数应该是比较重要的,我再次强调一下。
    Services->JDBC->Connection Pools->Config->Connections, 点开Advanced Options.
    Test Reserved Connections
    Test Created Connections
    Test Released Connections
    Test Table Name
    Connection Creation Retry Frequency

    在第一个情景中应该只需要打开Test Reserved Connections 就可以了。
    Test Created Connections表示创建连接后放到pool之前进行测试看连接是否可用
    Test Released Connections表示释放连接回到pool之前进行测试看连接是否可用
    I think so!

  • ResultSet problem with a jdbc connection pool implementation

    Hi
    I'm trying to use jdbc connection pool in my java application (js2e 1.4.0_01)
    from the example at http://www.developer.com/tech/article.php/626141
    In my main() code, in addition to JDBCConnection, JDBCConnectionImpl and JDBCPool classes, i use
    JDBCConnection conn;
    conn = new JDBCConnection(dbName);
    // make a statement
    sqlString = "SELECT........."
    ResultSet rs = null;
    rs = conn.sendRequest(sqlString, rs);
    // print result
    while (rs.next()) {
    Unfortunately i get an error like "ResultSet is closed" in the line corresponding to rs.next. The error disappears if i remove the line
    stmt.close();
    in the method sendRequest of the JDBCConnectionImpl class.
    1) Does anybody knows the solution?
    2) How to close all connections?
    Thanks you in advance.

    Hi ,
    You are closing the statement and then trying to use resultset , which is not going to work .So close then statment after using resultset .Ideally the code should be like this
    try {
    conn = // get the connection
    pstmt = conn.prepareStatement(sql);
    rs = pstmt.executeQuery();
    while ( rs.next()){
    // do something
    catch (Exception ex) {
    finally {
    try {
    if (rs != null)
    rs.close();
    if (pstmt != null)
    pstmt.close();
    if(conn!=null )
    conn.close();

  • Weblogic connection pool fails

    Hi
    I am trying to connect to sqlserver using the weblogic connection pool from the
    console.It throws me the following error inspite of adding the appropriate drivers
    in the classpath.It works out really fine when connection to oracle database when
    connecting to oracle it gives out :connection pool created, BUT WHEN TRYING TO
    ACCESS THE SQLSERVER ..OOOhh.
    anybody please immediate help is very much required and would be highly appreciated.
    Thanks
    Nov 1, 2001 9:18:40 AM EST> <Error> <JDBC> <Cannot startup connection pool "MessageLoggerDB"
    weblogic.com
    on.ResourceException:
    ould not create pool connection. The DBMS driver exception was:
    ava.sql.SQLException: I/O exception while talking to the server, java.io.EOFException:
    TdsInputStream.rea
    Fully - len 149 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2872)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:42)
    at weblogic.jdbc.mssqlserver4.TdsConnection.login(TdsConnection.java:57)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.login(MicrosoftConnection.java:53)
    at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:187)
    at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34)
    at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:192

    This looks like you're using the mssqlserver4v70 driver to connect to
    an MS SQLServer 6.5. Is that the case?
    Joe
    Srini wrote:
    >
    Hi
    I am trying to connect to sqlserver using the weblogic connection pool from the
    console.It throws me the following error inspite of adding the appropriate drivers
    in the classpath.It works out really fine when connection to oracle database when
    connecting to oracle it gives out :connection pool created, BUT WHEN TRYING TO
    ACCESS THE SQLSERVER ..OOOhh.
    anybody please immediate help is very much required and would be highly appreciated.
    Thanks
    Nov 1, 2001 9:18:40 AM EST> <Error> <JDBC> <Cannot startup connection pool "MessageLoggerDB"
    weblogic.com
    on.ResourceException:
    ould not create pool connection. The DBMS driver exception was:
    ava.sql.SQLException: I/O exception while talking to the server, java.io.EOFException:
    TdsInputStream.rea
    Fully - len 149 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2872)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:42)
    at weblogic.jdbc.mssqlserver4.TdsConnection.login(TdsConnection.java:57)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.login(MicrosoftConnection.java:53)
    at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:187)
    at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34)
    at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:192

  • How do I find out what is using a connection pool

    This morning weblogic 8.1.5 complained it couldn't expand a connection pool because it had reached is max concurrent connects limit.
    The issue I have is that I don't actually know what is using the connection pool. It should be defunct and redundent but obviously not.
    This caused all the threads to be consumed and the managed server hung.
    Does anyone know wether it's possible to interigate the pool to find out what it's doing ? I can't check the db as it's managed by another company and I have a v limited read only account.... I can't even select from v&session.
    Cheers in advance for any help.

    Dave Snaith wrote:
    This morning weblogic 8.1.5 complained it couldn't expand a connection pool because it had reached is max concurrent connects limit.
    The issue I have is that I don't actually know what is using the connection pool. It should be defunct and redundent but obviously not.
    This caused all the threads to be consumed and the managed server hung.
    Does anyone know wether it's possible to interigate the pool to find out what it's doing ? I can't check the db as it's managed by another company and I have a v limited read only account.... I can't even select from v&session.
    Cheers in advance for any help.If the pool is not supposed to be used, disable it via the console,
    and whatever applications are still trying to use it will get
    quick exceptions.
    Joe

  • Error using mySQL connection Pool

    I see the following error when my application uses the connection pool - can anyone explain this ?
    INFO: CORE3282: stdout: =======================>ERROR :com.sun.enterprise.repository.J2EEResourceException
    WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResourcePool.initPool(IASNonSharedResourcePool.java:416)
    WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResource(IASNonSharedResourcePool.java:625)
    WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASNonSharedResourcePool.java:520)
    INFO: CORE3282: stdout: java.lang.NoSuchMethodException: setdataSourceName

    Hi,
    You have used dataSourceName property while creating a connection pool.This property is not required to be set while creating a connection pool for MySql
    Use the following properties:
    <property name="serverName" value="<name of server>"
    <property name="port" value="<port number>"
    <property name="DatabaseName" value="<your db name>"
    <property name="User" value="<user name>"
    <property name="Password" value="<passwd>"
    Get back in case of any issues

  • Weblogic Connection pool active even database listener down

    Just wanted to check if sometime noticed this.
    Today.. In production our Database listener was down and connection pools in weblogic were still working fine. But, when tried making a explicit call to DB it throws exception "The Network Adapter could not establish the connection"..
    Couple of days back our production database was restarted. Sill weblogic connection pool was active without restart.
    Any info. is appreciate..
    Thanks

    Hi Jung,
    There is no timeout current that you can set on the connection pool. It will
    be in a future release of WebLogic
    sree
    "Jung Yang" <[email protected]> wrote in message
    news:[email protected]..
    Thanks.
    Yes I know that part.
    However, I still would like to know how to get time out settings andchange
    if I can.
    Where can I do that?
    - jung
    "Sree Bodapati" <[email protected]> wrote in message
    news:[email protected]..
    set TestConnectionsOnReserve="true" in the pool and you should be all
    set.
    >>
    sree
    "Jung Yang" <[email protected]> wrote in message
    news:[email protected]..
    I am currently using WLS 6.0 SP2 RP2 with jdbc thin oracle driver.
    What is the timeout setting on weblogic connection pool?
    I would like to set max number of seconds waiting for reply to connect
    to
    a
    database so that it does not wait too long before realizing that it isdown.
    Also if there is a setting that can be configured, is it jdbc api
    implementation or weblogic specific?
    Thanks in advance.

  • How to use JDBC Connection Pools in a standalone application?

    Hi, there,
    I have a question about how to use JDBC Connection Pools in an application. I know well about connection pool itself, but I am not quite sure how to keep the pool management object alive all the time to avoid being destroyed by garbage collection.
    for example, at the website: http://www.developer.com/java/other/article.php/626291, there is a simple connection pool implementation. there are three classes:JDBCConnection, the application's gateway to the database; JDBCConnectionImpl, the real class/object to provide connection; and JDBCPool, the management class to manage connection pool composed by JDBCConnectionImpl. JDBCPool is designed by Singleton pattern to make sure only one instance. supposing there is only one client to use connection for many times, I guess it's ok because this client first needs instantiate JDBCPool and JDBCConnectionImpl and then will hold the reference to JDBCPool all the time. but how about many clients want to use this JDBCPool? supposing client1 finishes using JDBCPool and quits, then JDBCPool will be destroyed by garbage collection since there is no reference to it, also all the connections of JDBCConnectionImpl in this pool will be destroyed too. that means the next client needs recreate pool and connections! so my question is that if there is a way to keep pool management instance alive all the time to provide connection to any client at any time. I guess maybe I can set the pool management class as daemon thread to solve this problem, but I am not quite sure. besides, there is some other problems about daemon thread, for example, how to make sure there is only one daemon instance? how to quit it gracefully? because once the whole application quits, the daemon thread also quits by force. in that case, all the connections in the pool won't get chance to close.
    I know there is another solution by JNDI if we develop servlet application. Tomcat provides an easy way to setup JNDI database pooling source that is available to JSP and Servlet. but how about a standalone application? I mean there is no JNDI service provider. it seems a good solution to combine Commons DBCP with JNID or Apache's Naming (http://jakarta.apache.org/commons/dbcp/index.html). but still, I don't know how to keep pool management instance alive all the time. once we create a JNDI enviroment or naming, if it will save in the memory automatically all the time? or we must implement it as a daemon thread?
    any hint will be great apprieciated!
    Sam

    To my knoledge the pool management instance stays alive as long as the pool is alive. What you have to figure out is how to keep a reference to it if you need to later access it.

  • What's the difference between using a connection pool and a datasource

    Howdy. I figure this is a newbie question, but I can't seem to find an
    answer.
    In the docs at bea, the datasource docs say
    "DataSource objects provide a way for JDBC clients to obtain a DBMS
    connection. A DataSource is an interface between the client program and the
    connection pool. Each data source requires a separate DataSource object,
    which may be implemented as a DataSource class that supports either
    connection pooling or distributed transactions."
    In there it says the datasource uses the connection pool, but other than
    that, what is the difference between a connection pool and a datasource?

    Thanks for the info. I think it makes some sense. But it's a bit greek.
    I'm sure it'll make more sense the more I work with it. Thanks.
    "Chuck Nelson" <[email protected]> wrote in message
    news:3dcac1f5$[email protected]..
    >
    Peter,
    Here is a more formal definition of a DataSource from the Sun site
    "A factory for connections to the physical data source that thisDataSource object
    represents. An alternative to the DriverManager facility, a DataSourceobject
    is the preferred means of getting a connection. An object that implementsthe
    DataSource interface will typically be registered with a naming servicebased
    on the JavaTM Naming and Directory (JNDI) API.
    The DataSource interface is implemented by a driver vendor. There arethree types
    of implementations:
    Basic implementation -- produces a standard Connection object
    Connection pooling implementation -- produces a Connection object thatwill automatically
    participate in connection pooling. This implementation works with amiddle-tier
    connection pooling manager.
    Distributed transaction implementation -- produces a Connection objectthat may
    be used for distributed transactions and almost always participates inconnection
    pooling. This implementation works with a middle-tier transaction managerand
    almost always with a connection pooling manager.
    Does that help clarify the distinction?
    Chuck Nelson
    DRE
    BEA Technical Support

  • What about session memory when using BEA Weblogic connection pooling?

    Hi,
    consider a web application, allowing database connections via a BEA Weblogic 8.1 application server. The app-server is pooling the oracle connections. The oracle database is running in dedicated server mode.
    How are the database requests from the web app served by the connection pool from BEA?
    1) Does one oracle session serve more than one request simultanously?
    2) Does BEA serialize the requests, which means, that a session from the pool is always serving only one request at a time?
    If (1) is true, than what about the session memory of Oracle sessions? I understand, that things like package global variables are beeing stored in this session private memory. If (1) is true, the PL/SQL programmer has the same situation, as with programming an Oracle databas in "shared server" mode, that is, he should not use package global variables etc.
    Thankful for any ideas...
    Message was edited by:
    Xenofon

    Xenofon Grigoriadis wrote:
    Hi,
    consider a web application, using BEA between client and an Oracle Database (v9i). BEA is pooling the oracle connections. The oracle database is running in dedicated server mode.
    How are the database requests from the web app beeing served by the connection pool from BEA?
    1) Does one oracle session serve more than one request simultanously?no.
    2) Or does BEA serialize the requests, which means, that a session from the pool is always serving only one request at a time?
    Reading "Configuring and Using WebLogic JDBC" from weblogic8.1 documentation, I read:
    "... Your application "borrows" a connection from the pool, uses it, then returns it to the pool by closing it...."
    What do you mean by returning the connection by closing it? Tbe server will either return the connection to the pool or close it...When application code does typical jdbc code, it obtains
    a connection via a WebLogic DataSource, which reserves an
    unused pooled connection and passes it (transparently wrapped)
    to the application. The application uses it, and then closes
    it. WebLogic intercepts the close() call via the wrapper, and
    puts the DBMS connection back into the WebLogic pool.
    The reason, why I as an Oracle programmer ask this is, because every session (=connection)
    in Oracle has its own dedicate, private memory for things like global PL/SQL variables.
    Now I want to figure out, if you have to careful in programming your databases, when
    one Oracle session (=connection) is serving many weblogic requests.It is serving many requests, but always serially. Do note however, that we
    also transparently cache/pool prepared and callable statements with the
    connection so repeat uses of the connection will be able to get already-made
    statements when they call prepareStatement() and prepareCall(). These
    long-lived statements will each require a DBMS-side cursor.
    >
    Thankful for any ideas or practical experience...
    Message was edited by:
    mk637Joe

  • Problem to call a procedure while using External connection pooling in TopL

    HI all,
    I have implemented external connection pooling in TopLink with JBoss 4.0.3SP1 and it is working fine. But after the connection pooling I am getting error while executing stored procedure with TopLink on Sybase. This is the error I am getting......
    Stored procedure 'P_InsReleaseToManufact' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode.
    I got one solution to this problem as to set a tag in sybase-ds.xml file(which is used in JBoss to enable connection pooling) ..............
    <connection-property name="SQLINITSTRING">set chained off</connection-property>
    but still it is not working.
    Can some one please tell me about the solution.

    Try
    session.getLogin().handleTransactionsManuallyForSybaseJConnect();

  • Connection Pool using weblogic.jdbc.pool.Driver

    I am trying to use connection pooling in my JSP data access classes (which
    work fine without connection pooling) on weblogic 4.5.1. I tried using the
    weblogic.jdbc.pool.Driver but it exits with the following exception:
    java.lang.ClassNotFoundException: weblogic.jdbc.pool.Driver
    The path c:\weblogic\classes which contains this driver is specified in the
    weblogic.class.path . I can not include it in the java class path because
    then weblogic server fails to start at all (with an error message). I would
    appreciate any help !
    Thanks,
    Usamah

    Hi. Please don't repost identical posts to different news groups. See a response
    in the JDBC group. thanks, joe
    Usamah Malik wrote:
    I am trying to use connection pooling in my JSP data access classes (which
    work fine without connection pooling) on weblogic 4.5.1. I tried using the
    weblogic.jdbc.pool.Driver but it exits with the following exception:
    java.lang.ClassNotFoundException: weblogic.jdbc.pool.Driver
    The path c:\weblogic\classes which contains this driver is specified in the
    weblogic.class.path . I can not include it in the java class path because
    then weblogic server fails to start at all (with an error message). I would
    appreciate any help !
    Thanks,
    Usamah--
    PS: Hey folks, we're hiring Java engineers for our WebLogic
    Engineering group in downtown S.F. Send me your resume.
    The Weblogic Application Server from BEA
    JavaWorld Editor's Choice Award: Best Web Application Server
    Java Developer's Journal Editor's Choice Award: Best Web Application Server
    Crossroads A-List Award: Rapid Application Development Tools for Java
    Intelligent Enterprise RealWare: Best Application Using a Component Architecture
    http://weblogic.beasys.com/press/awards/index.htm

  • Difference in use of connection pools from one server to another

    Hi all
    we are running wl5.1 with sp9 against SQLServer 2000
    On our performance test server (2 CPU) which has weblogic & sqlserver runnig
    on it we run out out of connection pools when running a specific method,
    having looked at it we noticed that it contained nested sql, so that each
    client would actually hang onto multiple connections until finished. The
    total number of connections used seemed approximately the same as the number
    of SQL statements.
    However we then ran the weblogic server on a different machine against the
    same database, so it was now running over a network and everything worked ok
    and the total number of client connections was just 1.
    Can anyone shed any light onto this, I have a few ideas but nothing to back
    them up as follows:
    Multi CPU versus single CPU
    Local connection rather than network connection between WLServer and
    DBServer
    WL Configuration
    DBServer configuration
    Is nested SQL valid ?
    Any help much appreciated Paul Taylor
    (An example of what I mean by nested sql is shown below, method1() creates
    instances of class2 and calls c2.method which contains sql before releasing
    its connection.)
    class c1
    public void method1()
    try
    rs=executesql(sqlString)
    while rs.next()
    new c2();
    c2.method2()
    finally
    closeConnection()
    class c2
    public void method2()
    try
    rs=executesql(sqlString)
    finally
    closeConnection()

    because when you are dealing with a remote server, your calls will be
    serialized over one socket. and the connection is assigned to that socket
    probably...or something like that...or not...shouldn't be important :)
    Filip
    ~
    Namaste - I bow to the divine in you
    ~
    Filip Hanik
    Software Architect
    [email protected]
    www.filip.net
    "Paul taylor" <[email protected]> wrote in message
    news:[email protected]...
    The code has now been changed, but the real point was why are two server
    dealing with the same code in a different way
    "Filip Hanik" <[email protected]> wrote in message
    news:[email protected]...
    Any help much appreciated Paul Taylor
    (An example of what I mean by nested sql is shown below, method1()creates
    instances of class2 and calls c2.method which contains sql beforereleasing
    its connection.)well this is obviously not a good way of doing it. you know that you are
    obtaining multiple connections so why not code your software in a
    smarter
    way.
    pass the connection object into c1 and c2 that way they both use thesame
    connection. Or release in between.
    Filip
    ~
    Namaste - I bow to the divine in you
    ~
    Filip Hanik
    Software Architect
    [email protected]
    www.filip.net
    <l> wrote in message news:[email protected]...
    Hi all
    we are running wl5.1 with sp9 against SQLServer 2000
    On our performance test server (2 CPU) which has weblogic & sqlserverrunnig
    on it we run out out of connection pools when running a specific
    method,
    having looked at it we noticed that it contained nested sql, so thateach
    client would actually hang onto multiple connections until finished.
    The
    total number of connections used seemed approximately the same as thenumber
    of SQL statements.
    However we then ran the weblogic server on a different machine against
    the
    same database, so it was now running over a network and everythingworked
    ok
    and the total number of client connections was just 1.
    Can anyone shed any light onto this, I have a few ideas but nothing
    to
    back
    them up as follows:
    Multi CPU versus single CPU
    Local connection rather than network connection between WLServer and
    DBServer
    WL Configuration
    DBServer configuration
    Is nested SQL valid ?
    Any help much appreciated Paul Taylor
    (An example of what I mean by nested sql is shown below, method1()
    creates
    instances of class2 and calls c2.method which contains sql beforereleasing
    its connection.)
    class c1
    public void method1()
    try
    rs=executesql(sqlString)
    while rs.next()
    new c2();
    c2.method2()
    finally
    closeConnection()
    class c2
    public void method2()
    try
    rs=executesql(sqlString)
    finally
    closeConnection()

Maybe you are looking for

  • Please help! iMovie keeps crashing on launch

    Please help! Every time I try to open iMovie, it opens for about 10 seconds, during which time it won't allow you to click anything and then 'quits unexpectedly'. Here are the problem details.....I don't understand why it is doing it because it has w

  • Can live cycle create a PDF form that is saved on a desktop and filled out simply to be attached to

    I'm new to using LiveCycle to create PDF forms. I have a simple "Request for Quote" form that simply needs to be filled out in Acrobate Reader and then attached to a new Email message that goes to our quoting people. right now when the form is opened

  • Safari 6.0 is not saving my bookmarks after restart

    Just bought Macbook pro and noticed that my bookmarks weren't saving after rebooting.   Bookmarks are there if I close and reopen Safari, but not after rebooting.   Haven't installed any 3rd apps/extensions except flash.   Also running Kapersky.  App

  • Publishing photo to MobileMe, not able to select one album

    Hello, since the 3.0 update, I am not able to select just one album to upload a photo... By default it puts the checkmark next to the first album, and then I select a different album, but the checkmark never removes itself from the first... is this a

  • How do use the method record(int score) in this code?

    how do i use record(int score) from the class Stats to record a new score? public class ScoreInfo { private int score; private int numStudents; public ScoreInfo(int aScore){       score = aScore;       numStudents=1; public void increment(){numStuden