Connection Problem using oracle.jdbc.xa.client.OracleXADataSource

Unable to get a connection from connection pool Realm1tx
Actually there are 5 connection intialized but no connection is there in active pool.Sometimes when I
go to weblogic console and refresh the connection comes alive temporarily.Can anyone help me out for
fixing this problem
Driver Used:
oracle.jdbc.xa.client.OracleXADataSource
Error Message
Unknown error occurred: XA error: XAER_RMERR : A resource manager error has occured in the transaction
branch start() failed on resource 'realm1tx' null sql=[SELECT Person$1.id,NULL,Person$1.id,NULL,NULL
FROM Person Person$1 WHERE (Per
son$1.securityId = 'admin')] throttle=[-1]
java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured in the transaction
branch start() failed on resource 'realm1tx' null
Thanks in advance.
Ragavendra.

Which version of oracle thin driver are you using? Oracle 920 thin driver has some issues.
Thanks,
Mitesh
Ragavendra wrote:
Unable to get a connection from connection pool Realm1tx
Actually there are 5 connection intialized but no connection is there in active pool.Sometimes when I
go to weblogic console and refresh the connection comes alive temporarily.Can anyone help me out for
fixing this problem
Driver Used:
oracle.jdbc.xa.client.OracleXADataSource
Error Message
Unknown error occurred: XA error: XAER_RMERR : A resource manager error has occured in the transaction
branch start() failed on resource 'realm1tx' null sql=[SELECT Person$1.id,NULL,Person$1.id,NULL,NULL
FROM Person Person$1 WHERE (Per
son$1.securityId = 'admin')] throttle=[-1]
java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured in the transaction
branch start() failed on resource 'realm1tx' null
Thanks in advance.
Ragavendra.

Similar Messages

  • Anyone successfully using WL 6.0 and oracle.jdbc.xa.client.OracleXADataSource?

    My final goal is to have two xa pools pointing to different db's and
    have them in the same user transaction and do a 2 phase commit. I
    can't get past connecting to a single xa datasource. I have "Grant
    Select on DBA_PENDING_TRANSACTIONS to public".
    My config.xml snippet:
    <JDBCConnectionPool
    Name="ModelXaPool"
    Targets="WebApp"
    URL="jdbc:oracle:thin:@SERVER1:1521:DB"
    DriverName="oracle.jdbc.xa.client.OracleXADataSource"
    InitialCapacity="2"
    MaxCapacity="10"
    CapacityIncrement="2"
    Properties="user=uid;password=pw"
    RefreshMinutes="10"
    />
    <JDBCTxDataSource
    EnableTwoPhaseCommit="true"
    JNDIName="ModelManagerTxDataSource"
    Name="ModelManagerTxDataSource"
    PoolName="ModelManagerXaPool"
    Targets="WebWORKS"
    />
    My code snippet:
    UserTransaction tx = msgCtx.getUserTransaction();
    tx.begin();
    java.sql.Connection conn =
    (DataSource)ctx.lookup("ModelManagerTxDataSource")).getConnection();
    Statement stmt = conn.createStatement();
    The connection seems to be gotten just fine. On the createStatement,
    I get the following exception.
    java.sql.SQLException: Internal error: Cannot obtain XAConnection
    Creation of XAConnection for pool ModelXaPool failed after
    waitSecs:298
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:772)
    at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:130)
    at weblogic.jdbc.jta.Connection.createStatement(Connection.java:201)
    at weblogic.jdbc.rmi.internal.ConnectionImpl.createStatement(ConnectionImpl.java:71)
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:42)
    Any suggestions/advice?
    Thanks,
    Dale

    Hi Dale,
    What version of Oracle are you using at least 8.1.7 is need to be able to
    use Oracle thin driver/XA. Also the JDBCConnectionPool and TxDataSource tags
    dont seem to match here. Both need to be targeted on to the same server. And
    the name of the pool in TxDataSource need to match the pool you have on the
    server.
    To setup oracle for XA you need to make sure this script is run on the
    server, initjvm.sql (It should be in your oracle installation rdbms scripts)
    and then grant select permission on dba_pending_transactions.
    Are you able to setup a connection pool with a non-XA driver?
    sree
    "Dale Bronk" <[email protected]> wrote in message
    news:[email protected]...
    My final goal is to have two xa pools pointing to different db's and
    have them in the same user transaction and do a 2 phase commit. I
    can't get past connecting to a single xa datasource. I have "Grant
    Select on DBA_PENDING_TRANSACTIONS to public".
    My config.xml snippet:
    <JDBCConnectionPool
    Name="ModelXaPool"
    Targets="WebApp"
    URL="jdbc:oracle:thin:@SERVER1:1521:DB"
    DriverName="oracle.jdbc.xa.client.OracleXADataSource"
    InitialCapacity="2"
    MaxCapacity="10"
    CapacityIncrement="2"
    Properties="user=uid;password=pw"
    RefreshMinutes="10"
    />
    <JDBCTxDataSource
    EnableTwoPhaseCommit="true"
    JNDIName="ModelManagerTxDataSource"
    Name="ModelManagerTxDataSource"
    PoolName="ModelManagerXaPool"
    Targets="WebWORKS"
    />
    My code snippet:
    UserTransaction tx = msgCtx.getUserTransaction();
    tx.begin();
    java.sql.Connection conn =
    (DataSource)ctx.lookup("ModelManagerTxDataSource")).getConnection();
    Statement stmt = conn.createStatement();
    The connection seems to be gotten just fine. On the createStatement,
    I get the following exception.
    java.sql.SQLException: Internal error: Cannot obtain XAConnection
    Creation of XAConnection for pool ModelXaPool failed after
    waitSecs:298
    atweblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:772)
    at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:130)
    at weblogic.jdbc.jta.Connection.createStatement(Connection.java:201)
    atweblogic.jdbc.rmi.internal.ConnectionImpl.createStatement(ConnectionImpl.jav
    a:71)
    atweblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:42)
    >
    Any suggestions/advice?
    Thanks,
    Dale

  • Problem using Oracle JDBC Driver

    Hi,
    I try to configure the Oracle JDBC Driver the following way:
    I load the Oracle drivers ojdbc14_g.jar and nls_charset12.jar
    I configure the DataSource using the Driver Class oracle.jdbc.driver.OracleDriver, the database URL: jdbc:oracle:thin:@h50a430:1521:WLP1E1A0 and the User with Password.
    As soon as its activated I get the following error:
    java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Complex error : server ID 4123350:Cannot start DataSource "Oracle".
         at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:678)
         at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:660)
         at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:535)
         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:324)
    any hint?

    I can't create an Oracle datasource too.
    Uploaded ojdbc14.jar, used the same Oracle jdbc settings as in my jdbc explorer where everything works fine, set initial connections to 1, set SQL Engine to Native SQL,...
    -> won't start.
    I restarted the cluster too. The Datasource is still marked with a red cross in the admin tool.
    This is with the type 1.x setting, as XA seems to be still broken in WAS 6.40.

  • Problem using oracle XA datasource

    Hi everybody:
    I use Weblogic 10.2, I create a datasource with oracle.jdbc.xa.client.OracleXADataSource driver, I can see the content management and change its contents, but when I tried to create a content selector in Weblogic Workshop and tried to create a new query, appear this error:
    <Exception occurred during commit of transaction Name=[EJB com.bea.p13n.property.internal.PropertySetManagerImpl.getPropertySetNames(java.lang.String)],Xid=BEA1-000AA9B4129EAD16FDBB(23668750),Status=Rolled back. [Reason=javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = portalDataSource],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=30,XAServerResourceInfo[dataSourcePersonas]=(ServerResourceInfo[dataSourcePersonas]=(state=rolledback,assigned=AdminServer),xar=dataSourcePersonas,re-Registered = false),XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=AdminServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@1a34463,re-Registered = false),SCInfo[epcs+AdminServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.bea.p13n.property.internal.PropertySetManagerImpl.getPropertySetNames(java.lang.String)], ISOLATION LEVEL=2, weblogic.jdbc=t3://10.10.20.108:7001}),local properties=({weblogic.jdbc.jta.dataSourcePersonas=[ No XAConnection is attached to this TxInfo ]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+10.10.20.108:7001+epcs+t3+, XAResources={WLStore_epcs__WLS_AdminServer, weblogic.jdbc.wrapper.JTSXAResourceImpl, WLStore_epcs_pfProliferationJMSStore, dataSourcePersonas, WLStore_epcs_WseeFileStore},NonXAResources={})],CoordinatorURL=AdminServer+10.10.20.108:7001+epcs+t3+): weblogic.transaction.RollbackException: Could not prepare resource 'weblogic.jdbc.wrapper.JTSXAResourceImpl
    JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = portalDataSource
    I tried to change the driver (NON-XA) but the content management doesn't work.
    Could you help me, please?
    Thanks

    Go to your domain/config/jdbc/portalDataSource-jdbc.xml file. The contents should be like this that is working for me. Make sure that it uses NonXA Driver. Most probably you are using XA Drivers I guess. Take a backup of this file. Manually edit the driver-name and last global transaction stuff. Stop and Restart ther servers.
    <?xml version="1.0" encoding="UTF-8"?>
    <jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/jdbc-data-source">
    <name>portalDataSource</name>
    <jdbc-driver-params>
    <url>jdbc:oracle:thin:@1.2.3.4:1521:abcdef</url>
    <driver-name>oracle.jdbc.OracleDriver</driver-name> ----------------CHECK THIS
    <properties>
    <property>
    <name>user</name>
    <value>XXXXXX</value>
    </property>
    </properties>
    <password-encrypted>YYYYYY</password-encrypted>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
    <initial-capacity>5</initial-capacity>
    <max-capacity>20</max-capacity>
    <test-connections-on-reserve>true</test-connections-on-reserve>
    <test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
    </jdbc-connection-pool-params>
    <jdbc-data-source-params>
    <jndi-name>weblogic.jdbc.jts.commercePool</jndi-name>
    <jndi-name>contentDataSource</jndi-name>
    <jndi-name>contentVersioningDataSource</jndi-name>
    <jndi-name>portalFrameworkPool</jndi-name>
    <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol> -----------Check This
    </jdbc-data-source-params>
    </jdbc-data-source>
    HTH
    Ravi Jegga

  • JDBC connection problems using JDeveloper

    I am using the "Connection Manager" in JDeveloper 2.0 to create
    a connection with the "Oracle JDBC OCI-7" driver. After filling
    in all of the fields and pressing the "Test Connection" button I
    get the following error: "Invalid Oracle URL specified:
    OracleDriver.connect". I have the CLASSPATH set to point
    to "C:\Program Files\Oracle\JDeveloper 2.0\jdbc\lib\oracle7.3.4
    \classes111.zip" and PATH includes "C:\ORANT\bin". Any ideas?
    null

    Rick Wright (guest) wrote:
    : I am using the "Connection Manager" in JDeveloper 2.0 to
    create
    : a connection with the "Oracle JDBC OCI-7" driver. After
    filling
    : in all of the fields and pressing the "Test Connection" button
    I
    : get the following error: "Invalid Oracle URL specified:
    : OracleDriver.connect". I have the CLASSPATH set to point
    : to "C:\Program Files\Oracle\JDeveloper 2.0
    \jdbc\lib\oracle7.3.4
    : \classes111.zip" and PATH includes "C:\ORANT\bin". Any ideas?
    In order for OCI to work JDBC drivers have to be installed on
    your client machine i.e. the computer where Jdev is installed.
    In you installation pack there should be a CD with Oracle 8i
    client installation. Run the installer from that CD and choose
    JDBC drivers. That should help.
    Good luck,
    Michael
    null

  • Connecting to OAS using Oracle JDBC Thin

    Hi,
    When I test connect to OAS residing on another host, using ORACLE JDBC THIN Driver and Named host method, I get the following error message :
    "Got back minus one from a read call"
    Any clues why such a message would come?
    Thks
    Sudha

    If you are using the thin driver, sqlnet.ora does not come into play. None of Oracle networking does. That is one of the great things about using the thin driver, no need to have the client installed.
    That error is due to incorrect connection info you are supplying or the machine you are connection from can't ping the machine it is trying to connect to.

  • Why getting WebLogic Connection when using Oracle Driver?

    Does anyone know why I would be getting back an instance of weblogic.jdbc.rmi.SerialConnection
    when retrieving a connection out of the connection pool, via my JDBC TX DataSource,
    when my JDBC Connection pool is configured to use oracle.jdbc.OracleDriver. Seems
    that since I'm using the Oracle driver I should not be getting back this WebLogic
    connection.
    Any insight is appreciated :)
    thanks,
    Dan

    innumonenu wrote:
    Even we are facing the same problem of ClassCastException when we try to cast to
    OracleCallableStatement from the weblogic pool made of Oracle JDBC driver.
    What is the URL which explains,
    "Our wrappers do provide access to various non-standard
    Oracle methods, and we document how to cast (to our concret class or to an interface
    we define) in order to access these calls." as said by Joseph.http://e-docs.bea.com/wls/docs70/jdbc/thirdparty.html#1043705
    >
    >
    "Dan Branley" <[email protected]> wrote:
    Joseph,
    Thanks for the insight. This answers a lot of questions. I appreciate
    the thorough
    explanation. Your assumption is correct. I am trying to use an Oracle
    extension,
    specifically I need to call PreparedStatement.setBlob() passing an instance
    of
    an Oracle BLOB.empty_lob(). I'll take a look at the WLS documentation
    for an
    alternative.
    thanks,
    Dan Branley
    Joseph Weinstein <[email protected]> wrote:
    We never give application code direct access to pooled connections.We
    always
    supply a wrapper class. These wrapper classes have various extra functionality,
    such as cooperating under-the-covers with the transaction coordinator
    to provide
    EJB/UserTransaction transactional semantics/guarantees, regardless of
    the number
    of EJBs involved in a given transaction. For instance, when in an EJB/UserTransaction,
    our wrapper will cheerfully ignore if application code calls a Connection.commit().
    The
    application code has no idea really when the transaction is done and
    commitable, only
    the transaction coordinator does. Most simply, our pools guarantee that
    whatever
    application reserves a pool connection will have sole use of it until
    they close the connection
    to return it to the pool. If we allowed direct access to a pooled connection,
    one application
    could cache the reference, and re-use it later when we presumed to allow
    another user to
    use it from the pool. Some of our wrapper objects are RMI-enabled so
    they work in
    external client JVMs and will do JDBC over the wire to the weblogicserver
    and it's
    pool connections. This wayt application code need not change to work
    inside or
    outside weblogic.
    I suspect this question is because you want to use some of Oracle's
    non-standard
    extensions to JDBC. Our wrappers do provide access to various non-standard
    Oracle methods, and we document how to cast (to our concret class or
    to an interface we
    define) in order to access these calls. Not all calls can be successfully
    proxied by our wrappers
    because some Oracle methods (which claim to take java.sql object asarguments)
    actually
    require oracle specific classes, and reject our proxies, even if they
    are standard JDBC objects.
    Joe
    Dan Branley wrote:
    Does anyone know why I would be getting back an instance of weblogic.jdbc.rmi.SerialConnection
    when retrieving a connection out of the connection pool, via my JDBCTX DataSource,
    when my JDBC Connection pool is configured to use oracle.jdbc.OracleDriver.Seems
    that since I'm using the Oracle driver I should not be getting backthis WebLogic
    connection.
    Any insight is appreciated :)
    thanks,
    Dan

  • How to use Oracle jdbc driver fixedString property?

    Oracle pads values in char columns so if I insert "a" in a CHAR(2) column then I cannot get that record by comparing that column to "a", I should get it by comparing it to "a ". Right?
    To solve this problem the Oracle jdbc driver has the property fixedString but I cannot make it work. (look for fixedString here )
    I'm using ojdbc14.jar driver for Oracle 10gR2 and accessing an Oracle 10gR2 database.
    This is my code:
    try {
    Properties props = new Properties();
    props.put("user", "****");
    props.put("password", "****");
    props.put("fixedString", true);
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String jdbcUrl = "jdbc:oracle:thin:@<host>:<port>:<sid>";
    Connection connection = DriverManager.getConnection(jdbcUrl, props);
    PreparedStatement ps = connection.prepareStatement(
    "SELECT * FROM MY_TABLE WHERE MY_TABLE_ID = ?");
    ps.setObject(1, "abc"); // (*)
    // MY_TABLE_ID is CHAR(15)
    ResultSet rs = ps.executeQuery();
    while (rs.next())
    System.out.print("data: ");
    System.out.println(rs.getString("MY_TABLE_ID"));
    rs.close();
    ps.close();
    connection.close();
    } catch (SQLException ex) {
    ex.printStackTrace();
    } catch (ClassNotFoundException ex) {
    ex.printStackTrace();
    The above code executes fine (no exceptions thrown) but the ResultSet is empty after executeQuery().
    If I change the line (*) for
    ps.setObject(1, "abc ");
    Then I get the column I wanted. So it seems the driver is ignoring the fixedString option.
    I've also tried changing the line (*) for
    ps.setObject(1, "abc", java.sql.Types.CHAR);
    But the ResultSet I get is empty again. What am I missing?
    Thanks in advance

    Es un Bug se corrige en la versión del OAS 10.1.2.3
    Bug 10222534: UNABLE TO SET FIXEDSTRING PROPERTY IN DATASOURCE

  • Workaround for using Oracle JDBC extension with WLS pooling

    Reading the newsgroup I saw that many of us encountered the problems
    with ClassCastException when tried to use Oracle JDBC extension
    with WLS pooling. I also had.
    In this case BEA recommends to use dangerous
    method getVendorConnection() which exposes
    the physical connection object to your code.
    Yes it's really dangerous because of unsafe usage may breaks
    WLS pooled connection(s).
    Moreover, this practice will make your JDBC code
    unportable (your JDBC code in addition to Oracle dependence
    became Weblogic dependent):
    void doSmth() {
    Connection con = ...;
    Connection vCon = ((WLConnection)con).getVendorConnection();
    // + mess of usage con in one places and vCon in others
    // (where Oracle extensions are needed)
    // !Don't forget to don't close vCon!
    Sux.
    I found the workaround.
    Introduction
    ============
    Yes the real cause of ClassCastException is that
    in depth of Oracle driver the casting
    to class oracle.jdbc.driver.OracleConnection
    (not to interface oracle.jdbc.OracleConnection)
    is performed.
    Someone can say that this is bug or pure desing.
    Weblogic pooled connection provide dynamic
    implementation for all public interfaces
    which real physical (wrapped) connection object implements.
    Great feature!
    But I guess that all interface methods implemented
    by simple call-delegation to physical (wrapped) connection object.
    In case of oracle.jdbc.OracleConnection interface
    this approach doesn't work for at least one its method:
    public OracleConnection unwrap()
    WLS pooled connection shoudn't implement this method by
    delegation to physical connection object BUT should
    return physical connection object itself!
    // Wrong implementation of unwrap()
    // delegation is used
    public OracleConnection unwrap() {
    return physicalConnection.unwrap();
    // Right implementation of unwrap()
    // physical connection returned
    public OracleConnection unwrap() {
    return physicalConnection;
    Workaround
    ==========
    1. Develop your own OracleConnection wrapper class:
    import oracle.jdbc.OracleConnection;
    import weblogic.jdbc.extensions.WLConnection;
    public class MyOracleConnectionImpl implements OracleConnection {
    private OracleConnection con;
    public MyOracleConnectionImpl(OracleConnection connection)
    throws SQLException
    this.con = connection;
    public OracleConnection unwrap() {
    return (OracleConnection)
    ((WLConnection)con).getVendorConnection();
    /* Implement all other methods by delegation to con object */
    2. Don't get Connections directly from DataSource --
    develop your own simple (may be static) utility
    class which retrives Connections from dataSource
    and returns them wrapped into your MyOracleConnectionImpl
    to your code from some method:
    puclic abstract class MyConnectionSource {
    public static Connection getConnection() {
    Connection con = // get it from DataSource
    return new MyOracleConnectionImpl((OracleConnection)con);
    3. Add attribute RemoveInfectedConnectionsEnabled="false"
    to definition of your JDBCConnectionPool within config.xml
    You may do it because of you `safely` use vendorConnection --
    you don't expose it to application code.
    4. Enjoy the Oracle JDBC extensions in your code!
    Example:
    Connection con = MyConnectionSource.getConnection;
    ArrayDescriptor add =
    ArrayDescriptor.createDescriptor("your_type", con);
    Hope it helps to someone.
    Best regards,
    Eugene Voytitsky

    Hello Eugene Voytitsky,
    Thanks Eugene Voytitsky for your idea
    I have tried the solution suggested by You, but it did not work.
    It still throws ClassCastException.
    I am sorry for posting the whole code of two classes below.
    I did this to give you more clarity.
    I am also indicating the place where the exception was thrown..
    Please let me know if I am doing something wrong.
    OracleConnection Wrapper class
    package ejbTesting;
    // sql imports
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.sql.SQLWarning;
    import java.sql.Statement;
    // util imports
    import java.util.Map;
    import java.util.Properties;
    // imports from Oracle Driver Classes
    import oracle.jdbc.OracleConnection;
    import oracle.jdbc.OracleOCIFailover;
    import oracle.jdbc.OracleSavepoint;
    // import from Weblogic extensions
    import weblogic.jdbc.extensions.WLConnection;
    public class WeblogicConnectionWrapper implements OracleConnection
         // oracle connection object
         private OracleConnection connection;
         public WeblogicConnectionWrapper (OracleConnection orclConnection)
              try
                   this.connection = orclConnection;
              catch(Exception unexpected )
                   unexpected.printStackTrace();
         public OracleConnection unwrap()
              try
              // The datasource returns a weblogic.jdbc.pool.Connection
              // This needs to be type casted to weblogic.jdbc.extensions.WLConnection
              // Only this weblogic.jdbc.extensions.WLConnection CAN BE type casted
              // to OracleConnection
         return (OracleConnection) ((WLConnection) connection).getVendorConnection();
         catch(Exception sqlException )
              sqlException.printStackTrace ();
              return null;
         /* Implement all other methods by delegation to connection object */      
    public Connection _getPC()
    return connection._getPC();
    public void archive(int i, int j, String s)
    throws SQLException
    connection.archive(i, j, s);
    public void assertComplete()
    throws SQLException
    connection.assertComplete();
    public void clearWarnings()
    throws SQLException
    connection.clearWarnings();
    public void close()
    throws SQLException
    connection.close();
    public void commit()
    throws SQLException
    connection.commit();
    public Statement createStatement()
    throws SQLException
    return connection.createStatement();
    public Statement createStatement(int i, int j)
    throws SQLException
    return connection.createStatement(i, j);
    public boolean getAutoClose()
    throws SQLException
    return connection.getAutoClose();
    public boolean getAutoCommit()
    throws SQLException
    return connection.getAutoCommit();
    public CallableStatement getCallWithKey(String s)
    throws SQLException
    return connection.getCallWithKey(s);
    public String getCatalog()
    throws SQLException
    return connection.getCatalog();
    public boolean getCreateStatementAsRefCursor()
    return connection.getCreateStatementAsRefCursor();
    public int getDefaultExecuteBatch()
    return connection.getDefaultExecuteBatch();
    public int getDefaultRowPrefetch()
    return connection.getDefaultRowPrefetch();
    public Object getDescriptor(String s)
    return connection.getDescriptor(s);
    public boolean getExplicitCachingEnabled()
    throws SQLException
    return connection.getExplicitCachingEnabled();
    public boolean getImplicitCachingEnabled()
    throws SQLException
    return connection.getImplicitCachingEnabled();
    public boolean getIncludeSynonyms()
    return connection.getIncludeSynonyms();
    public Object getJavaObject(String s)
    throws SQLException
    return connection.getJavaObject(s);
    public DatabaseMetaData getMetaData()
    throws SQLException
    return connection.getMetaData();
    public Properties getProperties()
    return connection.getProperties();
    public boolean getRemarksReporting()
    return connection.getRemarksReporting();
    public boolean getRestrictGetTables()
    return connection.getRestrictGetTables();
    public String getSQLType(Object obj)
    throws SQLException
    return connection.getSQLType(obj);
    public String getSessionTimeZone()
    return connection.getSessionTimeZone();
    public int getStatementCacheSize()
    throws SQLException
    return connection.getStatementCacheSize();
    public PreparedStatement getStatementWithKey(String s)
    throws SQLException
    return connection.getStatementWithKey(s);
    public int getStmtCacheSize()
    return connection.getStmtCacheSize();
    public short getStructAttrCsId()
    throws SQLException
    return connection.getStructAttrCsId();
    public boolean getSynchronousMode()
    return connection.getSynchronousMode();
    public int getTransactionIsolation()
    throws SQLException
    return connection.getTransactionIsolation();
    public Map getTypeMap()
    throws SQLException
    return connection.getTypeMap();
    public String getUserName()
    throws SQLException
    return connection.getUserName();
    public boolean getUsingXAFlag()
    return connection.getUsingXAFlag();
    public SQLWarning getWarnings()
    throws SQLException
    return connection.getWarnings();
    public boolean getXAErrorFlag()
    return connection.getXAErrorFlag();
    public boolean isClosed()
    throws SQLException
    return connection.isClosed();
    public boolean isLogicalConnection()
    return connection.isLogicalConnection();
    public boolean isReadOnly()
    throws SQLException
    return connection.isReadOnly();
    public String nativeSQL(String s)
    throws SQLException
    return connection.nativeSQL(s);
    public Object openJoltConnection(String s, short word0, short word1)
    return connection.openJoltConnection(s, word0, word1);
    public void oracleReleaseSavepoint(OracleSavepoint oraclesavepoint)
    throws SQLException
    connection.oracleReleaseSavepoint(oraclesavepoint);
    public void oracleRollback(OracleSavepoint oraclesavepoint)
    throws SQLException
    connection.oracleRollback(oraclesavepoint);
    public OracleSavepoint oracleSetSavepoint()
    throws SQLException
    return connection.oracleSetSavepoint();
    public OracleSavepoint oracleSetSavepoint(String s)
    throws SQLException
    return connection.oracleSetSavepoint(s);
    public int pingDatabase(int i)
    throws SQLException
    return connection.pingDatabase(i);
    public CallableStatement prepareCall(String s)
    throws SQLException
    return connection.prepareCall(s);
    public CallableStatement prepareCall(String s, int i, int j)
    throws SQLException
    return connection.prepareCall(s, i, j);
    public CallableStatement prepareCallWithKey(String s)
    throws SQLException
    return connection.prepareCallWithKey(s);
    public PreparedStatement prepareStatement(String s)
    throws SQLException
    return connection.prepareStatement(s);
    public PreparedStatement prepareStatement(String s, int i, int j)
    throws SQLException
    return connection.prepareStatement(s, i, j);
    public PreparedStatement prepareStatementWithKey(String s)
    throws SQLException
    return connection.prepareStatementWithKey(s);
    public void purgeExplicitCache()
    throws SQLException
    connection.purgeExplicitCache();
    public void purgeImplicitCache()
    throws SQLException
    connection.purgeImplicitCache();
    public void putDescriptor(String s, Object obj)
    throws SQLException
    connection.putDescriptor(s, obj);
    public void registerApiDescription(String s, short word0, short word1, String
    s1)
    connection.registerApiDescription(s, word0, word1, s1);
    public void registerSQLType(String s, Class class1)
    throws SQLException
    connection.registerSQLType(s, class1);
    public void registerSQLType(String s, String s1)
    throws SQLException
    connection.registerSQLType(s, s1);
    public void registerTAFCallback(OracleOCIFailover oracleocifailover, Object
    obj)
    throws SQLException
    connection.registerTAFCallback(oracleocifailover, obj);
    public void rollback()
    throws SQLException
    connection.rollback();
    public void setAutoClose(boolean flag)
    throws SQLException
    connection.setAutoClose(flag);
    public void setAutoCommit(boolean flag)
    throws SQLException
    connection.setAutoCommit(flag);
    public void setCatalog(String s)
    throws SQLException
    connection.setCatalog(s);
    public void setCreateStatementAsRefCursor(boolean flag)
    connection.setCreateStatementAsRefCursor(flag);
    public void setDefaultExecuteBatch(int i)
    throws SQLException
    connection.setDefaultExecuteBatch(i);
    public void setDefaultRowPrefetch(int i)
    throws SQLException
    connection.setDefaultRowPrefetch(i);
    public void setExplicitCachingEnabled(boolean flag)
    throws SQLException
    connection.setExplicitCachingEnabled(flag);
    public void setImplicitCachingEnabled(boolean flag)
    throws SQLException
    connection.setImplicitCachingEnabled(flag);
    public void setIncludeSynonyms(boolean flag)
    connection.setIncludeSynonyms(flag);
    public void setReadOnly(boolean flag)
    throws SQLException
    connection.setReadOnly(flag);
    public void setRemarksReporting(boolean flag)
    connection.setRemarksReporting(flag);
    public void setRestrictGetTables(boolean flag)
    connection.setRestrictGetTables(flag);
    public void setSessionTimeZone(String s)
    throws SQLException
    connection.setSessionTimeZone(s);
    public void setStatementCacheSize(int i)
    throws SQLException
    connection.setStatementCacheSize(i);
    public void setStmtCacheSize(int i)
    throws SQLException
    connection.setStmtCacheSize(i);
    public void setStmtCacheSize(int i, boolean flag)
    throws SQLException
    connection.setStmtCacheSize(i, flag);
    public void setSynchronousMode(boolean flag)
    connection.setSynchronousMode(flag);
    public void setTransactionIsolation(int i)
    throws SQLException
    connection.setTransactionIsolation(i);
    public void setTypeMap(Map map)
    throws SQLException
    connection.setTypeMap(map);
    public void setUsingXAFlag(boolean flag)
    connection.setUsingXAFlag(flag);
    public void setWrapper(OracleConnection oracleconnection)
    connection.setWrapper(oracleconnection);
    public void setXAErrorFlag(boolean flag)
    connection.setXAErrorFlag(flag);
    public void shutdown(int i)
    throws SQLException
    connection.shutdown(i);
    public void startup(String s, int i)
    throws SQLException
    connection.startup(s, i);
    Util class to get Wrapped Connections from
    datasource
    package ejbTesting;
    // j2ee imports
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    // sql imports
    import java.sql.Connection;
    // imports from Oracle Driver Classes
    import oracle.jdbc.OracleConnection;
    * Wrapper class for the DataSource Connection from Weblogic pool
    public class DataSourceConnectionWrapper
         // datasource variable
         private static transient DataSource datasource = null;
         private static String dbName = "jdbc/workbench";
    * Method that returns the database connection
         public static Connection getConnection()
              try
                   // initialsing the datasource object
                   initialiseDataSource ();
                   // Getting a connection from the datasource
                   Connection con = datasource.getConnection( );
                   // wrapping it custom wrapper class and
                   // returning the connection object
                   return new WeblogicConnectionWrapper((OracleConnection)con);
              catch(Exception exception )
                   exception.printStackTrace();
                   return null;
         private static void initialiseDataSource( ) throws Exception
    if ( datasource == null )
    try
    InitialContext ic = new InitialContext( );
    datasource = (DataSource) ic.lookup( dbName );
    catch (Exception ne )
    throw new Exception( "NamingException while looking up DataSource with
    JNDI name" +
    dbName + ": \n" + ne.getMessage( ) );
    Exception Stack Trace
    The line 46 in DataSourceConnectionWrapper
    corresponds to
    return new WeblogicConnectionWrapper((OracleConnection)con);
    Which I feel is logical as the connection which we get from Weblogic
    datasource cannot be type casted to OracleConnection
    java.lang.ClassCastException: weblogic.jdbc.pool.Connection
    at ejbTesting.DataSourceConnectionWrapper.getConnection(DataSourceConnectionWrapper.java:46)

  • Problem with Oracle jdbc driver and jdk1.4

    Hi
    I have some java code which uses Oracle jdbc driver.
    This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
    I have that exception :
    java.sql.SQLException: The Network Adapter could not establish the connection
    at oracle/jdbc/dbaccess/DBError.check_error(DBError.java)
    at oracle/jdbc/driver/OracleConnection.<init>(OracleConnection.java)
    at oracle/jdbc/driver/OracleDriver.getConnectionInstance(OracleDriver.java)
    at oracle/jdbc/driver/OracleDriver.connect(OracleDriver.java)
    at java/sql/DriverManager.getConnection(DriverManager.java:529)
    at java/sql/DriverManager.getConnection(DriverManager.java:179)
    at SimpleQuery.<init>(SimpleQuery.java:21)
    at SimpleQuery.main(SimpleQuery.java:56)
    when I try a getConnection...
    I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
    Any Idea ?
    Thanks

    Have you tried the drivers shipped with Oracle9i Db R2? they should work against JDK 1.4
    Kuassi
    Hi
    I have some java code which uses Oracle jdbc driver.
    This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
    I have that exception :
    java.sql.SQLException: The Network Adapter could not establish the connection
    at oracle/jdbc/dbaccess/DBError.check_error(DBError.java)
    at oracle/jdbc/driver/OracleConnection.<init>(OracleConnection.java)
    at oracle/jdbc/driver/OracleDriver.getConnectionInstance(OracleDriver.java)
    at oracle/jdbc/driver/OracleDriver.connect(OracleDriver.java)
    at java/sql/DriverManager.getConnection(DriverManager.java:529)
    at java/sql/DriverManager.getConnection(DriverManager.java:179)
    at SimpleQuery.<init>(SimpleQuery.java:21)
    at SimpleQuery.main(SimpleQuery.java:56)
    when I try a getConnection...
    I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
    Any Idea ?
    Thanks

  • Connection problem to Oracle 11.1.0 on Windows Professional XP (SP2)

    Hello
    I've recently performed default installations for 3 Oracle Databases, into seperate homes on a newly formatted Windows
    Professional XP (SP2) standalone laptop. For all databases Oracle 10.2.0 (rover), Oracle XE (xe) and Oracle 11.1.0 (fido) I
    installed APEX and they worked perfectly.
    I then installed my Wireless O2 Broadband for my internet which uses DHCP
    I am unable to connect to my databases with the wireless broadband connected. I then bring down all databases and turn
    off/disable the Broadband,then restart all databases.
    Using commands
    Set ORACLE_SID=ROVER
    sqlplus system/rover@rover
    Set ORACLE_SID=XE
    sqlplus system/xe@xe
    Set ORACLE_SID=FIDO
    sqlplus system/fido@fido
    Connections are successfull apart from the Oracle 11.1.0 (fido) database with error
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    Can anybody identify my connection problem to Oracle 11.1.0 (fido) database by reviewing my listener.ora, tnsnames.ora and
    other configuration files below.
    Many thanks in advance
    Regards
    Ade
    tnsping results
    ===============
    C:\>tnsping rover
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localho
    t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rover)))
    OK (10 msec)
    C:\>tnsping xe
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bascilic
    o)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
    OK (30 msec)
    C:\>tnsping fido
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos
    t)(PORT = 1523)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = fido)))
    OK (20 msec)
    lsnrctl stat - results
    ======================
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1523)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.1.0.7.0 - Production
    Start Date 17-OCT-2009 15:54:12
    Uptime 0 days 0 hr. 32 min. 11 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\product\11.1.0\db_fido\network\admin\listener.ora
    Listener Log File c:\oracle\product\11.1.0\diag\tnslsnr\bascilico\listener\alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1523ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bascilico)(PORT=1523)))
    The listener supports no services
    The command completed successfully
    General configuration - Environment variables
    =============================================
    PATH =
    C:\oracle\product\11.1.0\db_fido\bin;C:\oracle\product\10.2.0\db_rover\bin;C:\oracle\oraclexe\app\oracle\product\10.2.0\serve
    r\bin;C:\oracle\ohs\bin;C:\oracle\ohs\jlib;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI
    Technologies\ATI Control Panel
    TNS_ADMIN = C:\oracle\tns
    C:\oracle\tns\tnsnames.ora
    ==========================
    ROVER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = rover)
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = bascilico)(PORT = 1522))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    FIDO =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = fido)
    Oracle 10.2.0 listener.ora
    ==========================
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_rover)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    Oracle 10.2.0 tnsnames.ora
    ==========================
    ROVER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = rover)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Oracle XE listener.ora
    ======================
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oracle\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = bascilico)(PORT = 1522))
    DEFAULT_SERVICE_LISTENER = (XE)
    Oracle XE tnsnames.ora
    ======================
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = bascilico)(PORT = 1522))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    Oracle 11.1.0 listener.ora
    ==========================
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1523))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    Oracle 11.1.0 tnsnames.ora
    ==========================
    LISTENER_FIDO =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    FIDO =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1523))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = fido)
    )

    For static registration you need to update the 3 listener.ora files.
    Exemple:
    SID_LIST_LISTENER_FIDO =
      (SID_LIST =
        (SID_DESC
          (ORACLE_HOME = <Oracle Home path>)
          (SID_NAME=FIDO)
    )

  • Sql_trace does not work for Java app using Oracle JDBC thin driver

    Hi,
    I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
    Thanks in advance!

    Hi,
    I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
    Thanks in advance!

  • Preparedstatement problem in oracle jdbc 10.1.0, 10.2.0

    Hello,
    Im using oracle jdbc to connect oracle9.0.1.0.1
    i have a table like
    id-NUMBER
    RESULT-VARCHAR2(100)
    E_DATE-DATE
    STATE-VARCHAR2(1)
    when i write the code like
    "update TBMIS_AUDIT_ISSUE_PROJECT set RESULT=? , E_DATE=?      where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(1, "Test");using preparedstatement, the result column will not be updated correct(ex:%|st).
    but if i change the order of columns like:
    "update TBMIS_AUDIT_ISSUE_PROJECT set E_DATE=?  RESULT=?   where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(2, "Test");it will be correct.
    when i put the column which type is VARCHAR2 in the first place like:
    "update TBMIS_AUDIT_ISSUE_PROJECT set STATE=?, E_DATE=?  RESULT=?   where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(1, "1");the same, the state column will not be updated correct(ex:%)
    but result column will be correct
    looks something wrong in preparedstatement at jdbc 10.1.0 or 10.2.0
    it works well when the driver is jdbc 8.1.7(classes12.zip)
    or working without preparedstatement
    so. is it the bug? or something i missed
    thanks

    and..
    it happened when
    VARCHAR2( size ) less then 1829
    when varchar2 ( size > 1829)
    it doen not happend..
    my table scheme like this
    create table TBMIS_AUDIT  (
       ID                   NUMBER(10)                     not null,
       S_DATE               DATE,
       E_DATE               DATE,
       NOTE                 VARCHAR2(200),
       STATUS             VARCHAR2(1)
    );my code is
    String sql = "update TBMIS_AUDIT set  NOTE=? , S_DATE=?"
                    + ",  STATUS=? where ISSUE_NO=?";
    PreparedStatement pstmt = con.prepareStatement(sql);
    pstmt.setString(1, "ok!!");
    pstmt.setTimestamp(2, new Timestamp(System.currentTimeMillis()));
    pstmt.setString(3, "1");
    pstmt.setString(4, "1");the note column will be filled with some wrong character
    if NOTE is VARCHAR2(2000), it works well again..
    or changing E_DATE to Timestamp in oracle

  • Escape characters using Oracle JDBC

    We use Oracle JDBC driver to do some operations on an Oracle 9i database, and ran into some problems with escape characters. Basically we'd like to escape the _ and % characters.
    The following two example statements both work:
    ResultSet rs = stmt.executeQuery("select * from identifier_protein where upper(IDENTIFIER_ACCNO) like 'NM\\_%' escape '\\' ");
    ResultSet rs = stmt.executeQuery("select * from identifier_protein where upper(IDENTIFIER_ACCNO) like 'NM\\_%' {escape '\\' }");
    However, when we have multiple query terms and the "escape" clause doesn't immediately follows EACH "like" clause, we got errors saying the sql statement does not end properly. One such example is the following:
    ResultSet rs = stmt.executeQuery("select * from identifier_protein where upper(IDENTIFIER_ACCNO) like 'NM\\_%' and creator = 'ABC' {escape '\\'} ");
    If we put an "escape" clause following each "like" clause, then it works.
    My question is, is there a smart way of letting JDBC knows that you want to use an escape character everywhere in the query? We often do very complicated dynamic queries, frequently with table joins and boolean logic and subqueries with tons of query terms. Trying to add the escape clause to each "like" clause is very painful. Any help is highly appreciated. Thanks!
    BL

    I'd use PreparedStatements, if you're not already. Let the JDBC driver escape things properly for you. That's what the setString() and setDate() methods are all about.

  • Problems using Anyconnect 3.x client together with Kaspersky AntiVirus

    We have Notebooks with Windows Vista - most of the notebooks have "Kaspersky Anti-Virus 6.0 für Windows Workstation" installed and some "Kaspersky Endpoint Security 8 für Windows".
    Anyconnect 2.5 works perfect on these notebooks.
    But when I upgrade anyconnect to version 3.0 or 3.1, I have the problem that all HTTP traffic is blocked - all other network traffic is still working.
    When I quit the Kaspersky client (or uninstall it), everything is working again - except that I have no working antivirus protection.
    Of course, I have tried different settings for the Kaspersky client (without success) and asked our Kaspersky support (who said that anyconnect is causing this problem and not Kaspersky).
    My first experience with a Windows 7 notebook is that this problem does not exist using Windows 7.
    So maybe the problem is caused by a strange combination of Windows Vista, Anyconnect 3.x and Kaspersky.
    Does anyone else has problems using Anyconnect 3.x client together with Kaspersky AntiVirus?
    Kind regards,
    Peter

    We've recently run into an issue related to this. We found that it was related somehow to Firefox. If one looks inside of
    /Applications/Cisco/Cisco AnyConnect Secure Mobility Client.app/Contents/MacOS/ there are symlinks to Firefox libraries:
    $ ls -lntotal 1800-rwxrwxr-x  1 0     80  891232 Aug  3  2012 Cisco AnyConnect Secure Mobility Clientlrwxr-xr-x  1 1001  80      60 Jun 13 15:57 libmozsqlite3.dylib -> /Applications/Firefox.app/Contents/MacOS/libmozsqlite3.dyliblrwxr-xr-x  1 1001  80      55 Jun 13 15:57 libnspr4.dylib -> /Applications/Firefox.app/Contents/MacOS/libnspr4.dyliblrwxr-xr-x  1 1001  80      54 Jun 13 15:57 libnss3.dylib -> /Applications/Firefox.app/Contents/MacOS/libnss3.dyliblrwxr-xr-x  1 1001  80      58 Jun 13 15:57 libnssutil3.dylib -> /Applications/Firefox.app/Contents/MacOS/libnssutil3.dyliblrwxr-xr-x  1 1001  80      54 Jun 13 15:57 libplc4.dylib -> /Applications/Firefox.app/Contents/MacOS/libplc4.dyliblrwxr-xr-x  1 1001  80      55 Jun 13 15:57 libplds4.dylib -> /Applications/Firefox.app/Contents/MacOS/libplds4.dyliblrwxr-xr-x  1 1001  80      58 Jun 13 15:57 libsoftokn3.dylib -> /Applications/Firefox.app/Contents/MacOS/libsoftokn3.dylib
    So as a simple confirmation we were able to remove Firefox and have AnyConnect connect fine. As a more permanent workaround we replaced the above symlinks with 0 byte files and we were able to have our cake (AnyConnect connecting) and eat it too (Firefox installed as well).

Maybe you are looking for

  • Can no longer access disks on network, all of a sudden happend

    I have been at this for day' now and have no results! Can no longer access disks on network. Connecting to my server (it has one FW HD connected that is in 3 artitions). If I do it over a new window and click on the computer in the network I do see a

  • Special HTML Characters

    Hi, I encountered a problem with regards to the display of special HTML characters(chr 155). Crystal was not able to correctly display the cahracters. Instead a blank space was displayed. In addition to, when the report is exported to PDF, it is disp

  • How do I delete item in my purchased list?

    How do I delete item in my purchased list?i dont want to show them what I download.

  • Dreamweaver CS3 Code Hints

    Has anyone experienced problems with DW CS3's code hints for ColdFusion? I've installed the CF8 extensions, but the code hints don't work properly in Windows XP (My Mac version works fine). Basically, the "hints" for tags work, but only to an extent.

  • Why has Lightroom dropped out of the CC app?

    Why has Lightroom dropped out of the list of installed applications entirely? And this on two independent systems, even. It was originally installed through CC and it is still working - but in the CC app it's now listed under "Install new apps". Here