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)

Similar Messages

  • 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

  • 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.

  • Websphere Application Server 5.1 Hangs when using Oracle Connection Pool

    I have a j2ee application that runs on WAS 5.1 ( IBM JDK 1.4 ) and Oracle 10g 10.2.0 . My customer is doing load testing with 25 virtual users and a connection pool with a max size of 10. When the test starts all 25 users attempt to get a connection, and the first 10 get a connection. At this point the application server hangs with the connection pool in allocation. This is seen in Tivoli. Each thread only needs one connection to process it's request.
    I have my own home grown connection pool which when used under this load does not experience and issue. Monitoring from Oracle's admin console I see a max of 10 sessions. The home grows connection pool does not use a WAS DataSource.
    I have configured my application to use DB2 with a WAS DataSource and the application server does not hang. Monitoring using Tivoli shows the connection pool going into allocation, but it recovers as is expected.
    Are there any known issues with the Oracle JDBC drivers when used with WAS 5.1 DataSources?
    Any direction would be helpful, as I currently thing there is an issue with Oracle's Connection Pool and the IBM JVM.
    Thanks,
    J

    just an attention call: OracleDatasource connection pool does not accept parameters such as removeAbandoned, minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis, etc, these are specific for the tomcat dbcp implementation (http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC_Data_Sources).
    For the accepted ones read this http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/concache.htm
    Edited by: user7428636 on 24/Jan/2011 6:22

  • Problem modifying the connection details in a Report when using Weblogic 12

    Hi
    I have a j2ee application that uses the Java Reporting Component (JRC). At runtime, the code programmatically changes the connection type and schema name of a crystal report before running it. The connection that was used when designing the report is replaced with new JNDI parameters pointing to a Weblogic/Oracle datasource.
    The application works perfectly when using Weblogic 11, but the same code and report fails when deployed to Weblogic 12.
    I used Version 12.2.207.916 of the JRC, and updating  to the most current version I could find (12.2.217) did not solve the problem.
    The code snippet below shows how the connection and schema name is replaced for each of the tables in the report (not all the code is shown here)...
            PropertyBag propertyBag = new PropertyBag();
            propertyBag.put("Database DLL", "crdb_jdbc.dll");
            propertyBag.put("JNDI Datasource Name", jndiName);
            propertyBag.put("Initial Context", "");
                while (tableList.hasNext()) {
                    ITable table = tableList.next();
                    ITable tableNew = (ITable) table.clone(true);
                    IConnectionInfo connectionInfo = table.getConnectionInfo();
                    connectionInfo.setAttributes(propertyBag);
                    connectionInfo.setKind(ConnectionInfoKind.SQL);
                    tableNew.setQualifiedName(newQualifier + "." + table.getName());
                    tableNew.setConnectionInfo(connectionInfo);
                    dbController.setTableLocation(table, tableNew);
    The setTableLocation() function throws the following exception ...
    2014-05-13 16:46:27,173 ERROR [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']  JRCCommunicationAdapter         detected an exception: Unexpected database connector error
                    at com.crystaldecisions.reports.queryengine.Table.u7(SourceFile:2409)
                    at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(SourceFile:529)
                    at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
                    at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
                    at com.businessobjects.reports.sdk.requesthandler.f.a(SourceFile:175)
                    at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1079)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1167)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)
                    at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)
                    at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
                    at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
                    at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
                    at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
                    at com.crystaldecisions.sdk.occa.report.application.an.a(SourceFile:108)
                    at com.crystaldecisions.sdk.occa.report.application.b0.if(SourceFile:148)
                    at com.crystaldecisions.sdk.occa.report.application.b0.b(SourceFile:95)
                    at com.crystaldecisions.sdk.occa.report.application.bb.int(SourceFile:96)
                    at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:151)
                    at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)
                    at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2159)
                    at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:543)
                    at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3898)
                    at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(SourceFile:2906)
                    at com.systest.reporting.engine.crystal.CrystalReportEngine.replaceConnection(CrystalReportEngine.java:523)
                    at com.systest.reporting.engine.crystal.CrystalReportEngine.changeDataSource(CrystalReportEngine.java:449)
                    at com.systest.CrystalReportPane.setReportDataSourceDetails(CrystalReportPane.java:170)
                    at com.systest.CrystalReportPane.commandLoad(CrystalReportPane.java:136)
                    at com.systest.ReportRunner.CrystalReport.Load(CrystalReport.java:401)
                    at com.systest.ReportRunner.SaveReportToFile(ReportRunner.java:1385)
    Any idea what I can do to fix this ?
    Thanks in advance!

    Last reference in any documentation re. version of supported weblogic is 10.3.x. And it may very well be that things worked in weblogic 11, but as versions go by the differences get bigger and eventually the app stops working.
    I'll ping the Program Manager for definitive info and future support. Once I have the info, I'll update this Discussion.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • DB Connections not being released when using Weblogic Datasource

    I am using Kodo-JDO 2.5.3 and Weblogic 8.1.
    I have JDO running as a JCA connector and I have a simple stateless session
    bean persisting a simple object. My problem is that every time I call my
    session bean to persist an object it grabs a connection from the Weblogic
    connection pool and never returns it. So if I have configured a maximum of
    50 connections in the pool, on my 51st call to the session bean I will get
    an error saying it cannot acquire a connection from the pool. (error pasted
    below)
    I have configured my JDO parameters as follows:
    ConnectionRetainMode=persistence-manager (also tried 'transaction')
    TransactionMode=xa
    ConnectionFactoryName=ERDataSource
    ConnectionFactory2Name=NonXADataSource
    At the end of every call to the SessionBean I perform a
    persistenceManager.close(); and a persistenceManager=null;
    Any ideas why connections are not getting re-used?
    Exception I am receiving:
    java.sql.SQLException: Internal error: Cannot obtain XAConnection
    weblogic.common.resourcepool.ResourceLimitException: No resources currently
    available in pool MyJDBC Connection Pool-1 to allocate to applications,
    please increase the size of the pool and retry..
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
    tions.java:64)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getSQLExecutionManag
    er(JDBCStoreManager.java:722)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.setPersistenceManage
    r(JDBCStoreManager.java:133)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.initialize(PersistenceMa
    nagerImpl.java:173)
    at
    com.solarmetric.kodo.ee.EEPersistenceManager.initialize(EEPersistenceManager
    ..java:50)
    at
    com.solarmetric.kodo.impl.jdbc.ee.EEPersistenceManagerFactory.newPersistence
    Manager(EEPersistenceManagerFactory.java:107)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
    ager(PersistenceManagerFactoryImpl.java:204)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceMan
    ager(PersistenceManagerFactoryImpl.java:136)
    at
    com.solarmetric.kodo.impl.jdbc.ee.JDOConnectionFactory.getPersistenceManager
    (JDOConnectionFactory.java:161)
    at
    com.mslv.osa.infrastructure.ossj.app.JVTSessionBean.getPersistenceManager(JV
    TSessionBean.java:308)
    at
    com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean.createSystemProp
    erty(SystemJVTSessionBean.java:882)
    at
    com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean_toe7tm_EOImpl.cr
    eateSystemProperty(SystemJVTSessionBean_toe7tm_EOImpl.java:1536)
    at
    com.mslv.osa.infrastructure.system.app.SystemJVTSessionBean_toe7tm_EOImpl_WL
    Skel.invoke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:407)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:356)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:353)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:123)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:351)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Glen

    A couple of suggestions that might do the trick:
    1. Upgrade to 2.5.4
    2. Leave the ConnectionRetainMode to its default value (on-demand).
    3. Make sure you always close your Query results and Extent iterators.

  • Problem in loading images when i am connected on company network

    Hi friends, I am using firefox since last 4 months on my windows 8 pro laptop.but since last month I am facing problem in loading images when i am connected on company network but same time it is working fine with ie10. But all these thinks are working well at my home when I am using broadband.

    I don't completely understand your issue. Does this issue occur on 1 network and does not occur on another? Have you tried clearing cache and cookies and making sure your plugins are up to date?
    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Did this fix your problems? Please report back to us!
    Please check if all your plugins are up-to-date. To do this, go to the [http://mozilla.com/plugincheck Mozilla Plugin Check site].
    Once you're there, the site will check if all your plugins have the latest versions.
    If you see plugins in the list that have a yellow ''Update'' button or a red ''Update now'' button, please update these immediately.
    To do so, please click each red or yellow button. Then you should see a site that allows you to download the latest version. Double-click the downloaded file to start the installation and follow the steps mentioned in the installation procedure.

  • Problem with Progress DB while using to connect using JDBC Adapter

    Hi,
      I am facing Problem with Progress DB while using to connect using JDBC Adapter. I am getting the following error in auditlog file like,
    Error during database connection to the database URL  jdbc:JdbcProgress:T:156.5.31.65:2545:/mfgprodev/devbadb 
    /devsche/i_apoext.db using the  JDBC driver "com.progress.sql.jdbc.JdbcProgressDriver" : com.sap.aii.adapter.jdbc.sql.DriverManagerException: Unable to locate a suitable JDBC driver to establish a connection to URL " jdbc:JdbcProgress:T:156.5.31.65:2545:/mfgprodev/devbadb 
    /devsche/i_apoext.db "
    I tried using the following all URLs,
    1. jdbc:JdbcProgress:T:156.5.31.65:2545:i_apoext.       
    2. jdbc:JdbcProgress:T:156.5.31.65:2545:i_apoext.db     
    3.                                                      
    jdbc:JdbcProgress:T:156.5.31.65:2545:/mfgprodev/devbadb 
    /devsche/i_apoext.                                      
    4.                                                      
    jdbc:JdbcProgress:T:156.5.31.65:2545:/mfgprodev/devbadb 
    /devsche/i_apoext.db.                                  
    Can anyone please help me out in solving this issue.
    May be the cause for this is :
    1) The Wrong URL  format
    2) CLASSPATH is not setted properly..
    Can you look more into this stuff.
    Thanks,
    Soorya.

    Hi,
    To access any database fromm XI, using the JDBC adapter, the corresponding drivers have to be installed on the XI server.
    Just check this note 831162.
    Also, check this PDF to install Drivers in XI,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10

  • Some RST are seen during TCP disconnection when using SSL connection

    Some RST are seen during TCP disconnection when using SSL connection
    It is expected that the disconnection sequence for a secure connection to be as follow:
    client ************************* server
    --- alert (warning, close notify) --->
    <--- alert (warning, close notify) ---
    in any order;
    and then:-
    --------------- FIN, ACK ------------>
    <----------- FIN, ACK ---------------
    ------------------ ACK ----------------->
    Instead of the sequence described above, the TCP connection for a secure connection is closed with an RST.
    For instance, Wireshark capture shows that an SSL+SASL TCP connection is closed in the following manner:
    client ************************** server
    --- alert (warning, close notify) ---->
    ---------------- FIN, ACK ------------>
    <--- alert (warning, close notify) ---
    <----------- FIN, ACK ---------------------
    ------------ RST -----------------> *(This RST message should be investigated, an ACK message was expected)*
    Server: OpenLDAP: slapd 2.4.23
    Client: (java version "1.6.0_16")
    import javax.naming.*;
    import javax.naming.directory.*;
    import javax.naming.ldap.InitialLdapContext;
    import java.util.Hashtable;
    import javax.naming.ldap.InitialLdapContext;
    import javax.naming.ldap.StartTlsRequest;
    import javax.naming.ldap.StartTlsResponse;
    class Client {
    private static final String DEFAULT_INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";
    public static void main(String[] args) {
    //SSL
    try {
    System.setProperty("javax.net.ssl.keyStore", "c:\\\keystore");
    System.setProperty("javax.net.ssl.keyStorePassword", "adminadmin");
    System.setProperty("javax.net.ssl.trustStore","c:\\\keystore");
    System.setProperty("javax.net.ssl.trustStorePassword","adminadmin");
    // Set up environment for creating initial context
    Hashtable env = new Hashtable(11);
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    // Must use the name of the server that is found in its certificate
    env.put(Context.PROVIDER_URL, "ldap://1.2.4.4:16415");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, "cn=manager,dc=operator,dc=com");
    env.put(Context.SECURITY_CREDENTIALS, "password");
    env.put(Context.SECURITY_PROTOCOL, "ssl");
    // Create initial context
    InitialLdapContext ctx = new InitialLdapContext(env, null);
    // Close the context when we're done
    ctx.close();
    catch(Exception e)
    e.printStackTrace();
    Is it a bug ? Can I expect to have a patch for this issue?
    Regards,
    Olivier
    Edited by: 975464 on 6-Dec-2012 11:21 AM

    I agree it should be an ACK not an RST but it doesn't really matter. The connection is closed, and as neither the client nor the server has any pending data it is benign. Worth investigating in a later JRE.

  • Problems w/ race conditions when using attachmovie

    Hello,
       I'm having a strange problem w/ race conditions when using attachmovie.
    I have a class linked to a movie clip that I'm attaching to the stage.   The class is
    fired off when the movie clip is attached but also other classes are getting loaded at the same time
    while the movie clips is attached.     Even though the other classes are called after the
    movieclip is attached, they are getting loaded faster and therefor the class linked to the attached movie clip
    cannot access their functions. 
    I'm looking for a listener that will fire off an event ONLY when the attached movieclip is fully loaded but I can't
    seem to find any examples of associating a listener to a attachmovie method.
    Any ideas?
    Thanks,
    Clem C

    flash is single threaded so nothing happens simultaneously.  what do you mean by, "other classes are getting loaded at the same timewhile the movie clips is attached"

  • [原创] 有关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!

  • 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.

  • 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 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.

  • 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

Maybe you are looking for