JDBC Connector Pool problem?

I deployed my app to Sun App Server 8.2 and keep getting this error sequence:[#|2007-09-06T16:45:27.421-0400|INFO|sun-appserver-pe8.2|javax.enterprise.resource.resourceadapter|_ThreadID=18;|
RAR7005 : Cannot register pool from monitoring registry: null |#]
[#|2007-09-06T16:45:40.453-0400|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=17;|
WebModule[/Design_2]null
java.lang.NullPointerException
     at com.sun.rave.web.ui.appbase.AbstractPageBean.afterPhase(AbstractPageBean.java:147)
     at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:441)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:235)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
     at sun.reflect.GeneratedMethodAccessor456.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
     at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
     at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
     at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
     at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
     at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
     at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
     at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
|#]The documentation says this is an internal server error and that I should notify Sun, but I'm not sure how to do that.
One thing I noticed is that none of the connections to MySQL get released. So I eventually run out of connections. (I plan to operationally deploy to Tomcat, so I hope this problem doesn't migrate there.)
Has anyone else encountered this problem?

If I explicitly open a connection, I always close close it when I am done with it. I assume code "written" by JSC does its own cleanup, which I believe it does.
Note that this is not a problem when I deploy my app to Tomcat. DB connections do no accumulate the way they do when I deploy to SunAppServer.
That's why I think it's an app server bug.

Similar Messages

  • JDBC Connector : pool gets depleted

    Hi,
    we are currently working with SAP EP 6.0 SP2 and trying out some development work with the connector framework.
    We are writing a component which uses the CF to retrieve information from a Microsoft SQL Server 2000.
    The portal component works, we are able to retrieve the information from the DB, but after some time the request times out.
    We monitored the connections for a while both on the J2EE platform and on the backend database and came to this conclusion : apparently each request - even by the very same user looking at the very same component, just but pressing the refresh button in the browser window - creates a new connection in the pool managed by the connector framework.
    - result : the number of successful views of the components is equal to the number of Maximum Connections defined for the JDBC connector on the J2EE platform.
    In our code we are using the close() method on the IConnection interface as indicated in the documentation that comes with the PDK.
    Is this a known problem OR are we doing something wrong here ?
    We suspect that there is something wrong in the implementation of the JDBC connector, which isn't handling the close method correctly.

    In more general terms this issue raises the following questions :
    - how does the Connector framework manage the pool of JDBC connections ?
    - the fact that our component at each request (even after a refresh in the browser) causes  the CF to create a new connection, does that mean we are writing our code incorrectly so that each request is indeed considered to be a unique and in need of its own database connection ?
    We have tried to avoid as much reason as possible for the CF to generate a new connection : e.g. we have set up user mapping so that all users access the database with the same account. This should already eliminate the requirement to have a separate for each user. => in general : what are the different ways by which to control the generation of connections by the Connector Framework, for the JDBC Connector in particular ?
    - So far we are writing the code accessing the SQL server straight into a JSPDynpage. Am I wrong in thinking that this is allowed. Although we intend to write a portal service as a wrapper for all database interaction in a later stage, for the simple exercises now we are directly using the CF service API in the portal components.
    - by what algorithms does CF determine whether to take a connection from the pool or to create a new connection to the back-end system.
    - Am I wrong in thinking that connection pool management is no longer the task of the developer when using CF ?

  • JDBC connection pools problems: weblogic doesn't release connections

    Hi all,
    we use Weblogic 5.1 in conjunction with Content Server 3.6 and Oracle
    8.1.6;
    We have this strange problem:
    Calling a page the connections, in the content server connection pool,
    grows up till the maximum. We think the problem is that Weblogic
    doesn't release used connections.
    Does anybody can help us? Did anybody had the same problem?
    Best Regards,
    Marcello Villani

    Hi. I'd have to see the code. When a pool connection is closed, it gets
    back into the pool. Until it's closed, it doesn't.
    Marcello Villani wrote:
    Hi all,
    we use Weblogic 5.1 in conjunction with Content Server 3.6 and Oracle
    8.1.6;
    We have this strange problem:
    Calling a page the connections, in the content server connection pool,
    grows up till the maximum. We think the problem is that Weblogic
    doesn't release used connections.
    Does anybody can help us? Did anybody had the same problem?
    Best Regards,
    Marcello Villani

  • JDBC Connector and pooling problems.  Should be ConnectionPoolDataSource ?

    Ciao all,
    I am testing the JDBC Connector by Sun.
    As you know, such JDBC connector is a JCA connector which can be used to
    wrap a JDBC Driver or a JDBC Data Source or a JDBC
    ConnectionPoolDataSource into a JCA connector.
    Such JDBC Connector exposes to the client component the usual DataSource
    interface, so that an application that was developed using a DataSource
    can be easily migrated to a JCA enabled application: the application in fact will use the JDBC connector as if it was a DataSource, without
    knowing that actually it is a JCA connector.
    Here is my problem: the JCA architecture provides a pool. Therefore, I'd like the JDBC Connector to appear to the client as a
    ConnectionPoolDataSource rather than a simple DataSource.
    In fact, I have an application that performs a JNDI lookup to retrieve a JDBC data source. Then, if the obtained data source is instance of ConnectionPoolDataSource then the applications will use the SQL Connection and will closes it to release it back to the pool.
    But if the data source is instance of DataSource, then the application
    will retrieve a SQL connection, will use it, and will keep it in its own pool in order to reuse the SQL connection for better performance.
    Now, if such application works with either a DataSource or a ConnectionPoolDataSource everything works properly, but when it works
    with the JDBC Connector it fails: the JDBC Connector in fact appears as
    a simple DataSource without pooling, so the application keeps the
    obtained SQL connections in its own pool. But actually, the JDBC
    Connector is a JCA connector which has a pool too, so the SQL connection
    is kept in two pools and as a consequence, the JDBC Connector pool invalidates or destroy the connection in its pool, and the application, which is unaware, keeps in its pool a reference to an invalid connection, which leads to a SQLException at runtime.
    So my question is: don't you think that the JDBC Connector should implement ConnectionPoolDataSource rather then DataSource, since it is a
    JCA connector that offers pool services ?
    And if so, is there a way to submit this question to someone working for Sun ?
    Thank you for your time.
    Gian Maria Romanato.

    You can send your comments and feedbacks to [email protected]

  • JDBC connector problem

    Hi All,
    I installed SAP BW 3.5 by following Installation Seqence in the mySAP ERP 2004 SR1 master guide,
    there are two servers under Visual Administator -> Cluster -> sapsid: one is "Server 0 10_37758"(I think this is Central Instance), another is "Server 0 12_93726" (it maybe dialog instance). The first server is empty, and I can see JDBC Conncetor, Connector Container and etc.
    In the runtime tab of JDBC Connector, the Drivers only inculdes System_Driver, is it correct?
    and the status of the connector jdbc, odbo, smla and sapq in the Connector Container, Connector 1.0 display as sap.com/com.sap.ip.bi.sdk.dac.connector.sapq/null
    sap.com/com.sap.ip.bi.sdk.dac.connector.xmla/null
    sap.com/com.sap.ip.bi.sdk.dac.connector.odbo/null
    sap.com/com.sap.ip.bi.sdk.dac.connector.jdbc/null
    and they are not activity. what problem are these?
    I tried to add JDBC Driver in JDBC Connector, the problem can't be fixed, please help me.
    I install all ECC IDES 5.0 and java components and database on same host which is windows 2003 with Oracle9i

    Hi there,
    Do i have to to put mysql.connecto.jar to the
    j2dk\lib\ext? I have not copy the files maybe this is
    a problem with the connector. What do you think?Good God, no. Your code does not belong there.
    You have to add the MySQL Connector JAR to your CLASSPATH when you run. If you're running on the command line, that means using the -classpath option on java.exe. If you're using an IDE, that means adding the JAR to your CLASSPATH using the mechanism provided by the IDE. If you're using an app server, that means packaging the JAR with your app.
    %

  • Problem using JDBC Connector

    Hi,
    I have problem connecting to MS SQL Server using the JDBC Connector. I have 2 main questions, one is on the DQE and the other is on user mapping.
    I have a created a JDBC System Landscape using the portal component com.sap.portal.systems.jdbc.
    Following are the properties I have set and also I have listed where I am finding propblems.
    - User Management
    User MApping Type : Admin, User
    - Connection Properties
    Connection Timeout: 1000
    Connection URL: jdbc:microsoft:sqlserver://10.7.1.5:1433;DatabaseName=SAPEP
    Driver Class Name: com.sap.portals.jdbc.sqlserver.SQLServerDriver
    (Here I do not know whihc driver to use. Do I have to use the above one or this one com.microsoft.jdbc.sqlserver.SQLServerDriver. Anyway, both of them Did not work)
    - Distributed Query Engine (DQE) (What is this, and what Parameters I need to pass here)
    Also, While doing the user mapping, we need to provide the username and password. What username and password is that? Is it the DB user name and Password?
    Any help will be well appriciated.
    Thanks and regards,
    Babu

    Hi Babu,
    Here's what's needed in the system (examples are from my system):
    CONNECTION PROPERTIES:
       -- Connection URL: jdbc:sap:sqlserver://p031617:1433;DatabaseName=pubs
       -- DRIVER CLASS NAME: com.sap.portals.jdbc.sqlserver.SQLServerDriver
       -- VALIDATE CONNECTION: yes
    USER MANAGEMENT:
       -- USER MAPPING TYPE: admin, user
    DQE: Put in admin user/password (DQE is for distributed queries between multiple, heterogeneous databases, but you still need to use it for simple queries)
    Create an alias
    Go to User Administration and set user mapping for the admin user
    Test connection
    Each user that access the system will need user mapping.
    Hope this helps.
    Daniel

  • ResultSet problem with a jdbc connection pool implementation

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

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

  • JDBC Connection Pool to DB2 database - Problem

    When trying to create a new JDBC Connection Pool in WebLogic using BEA Type 4 driver
    for DB2, I get the following error:
    [BEA][DB2 JDBC Driver]A commitment command has been received on a protected conversation.
    The commit and rollback commands are not allowed on protected conversations.
    DB2 v8.1 Enterprise Edition on Sun Solaris v8
    WebLogic 8.1 SP2 on Windows 2000/XP
    Please help!

    Sorry forgot to add the exception, this is the exception,
    java.sql.SQLException: RSR0029: Missing Password for Application Authorization
    Any idea as when we get this exception?

  • HELP:Problem in creating a temporary CLOB using JDBC connection pooling

    Hi All,
    i am inserting a large xml document in an xml type column by creating a temporary clob of this document
    tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    I am not having any success getting the following statement working using a JDBC connection pool rather than a hard coded URL connection
    it works with:
    "jdbc:oracle:thin:@server:port:dbname" connection
    Does NOT work with:
    datasource.getConnection()
    Does any one know how to successfully get this to work?
    urgently plz........

    Hi Dharmi
    Here is a quote of Dafna's post in [another thread in this forum|Re: Copy VC controls]
    CE7.1.1 will be released at September 2008 for ramp-up customers.
    There are many improvements and new capabilities in the new release of Visual Composer for CE7.1.1. Among the new features you can find:
    The missing features from Visual Composer 7.0 (Html view, portal Eventing support (EPCM), JDBC, Undo/Redo, and more..)
    Many layout & modeling improvements
    Additional ALV table functionality - export to Excel, switch to chart, configure ALV behavior at design time
    Integration of Visual Composer in Eclipse - additional entry point to the Visual Composer models from the NWDS. This integration provides the option to add a WD component (in case of missing functionality in Visual Composer), as a black box component to the Visual Composer model. Right-clicking the component will open the Web Dynpro perspective for creating/modifying the component.
    Regards,
       Shai

  • Can't connect to external Oracle DB with JDBC connector

    Hello guys,
    I had failed to connect to connect external Oracle  via JDBC connector .
    Could you please help me to resolve the problem ?
    Backgroud:
    We need to connect the external Oracle DB with JDBC connector, because BI need to connect to the target Oracle. If the JDBC connector suceed, BI will create a UD which use the datasource
    we create in Visual admin to connect to the external Oracle DB.
    Environment:
    Our EP version is NW04S SP17 , OS is AIX .
    The target Oracle DB version is 10g(10.1.0.2.0, 64bi).
    Configuration procedure :
    1. Import Oracle driver "ojdbc14.jar" and create new driver which named "Oracle "  under
    JDBC Connector ->Run time ->Driver  in Visual Admin.
    2. Create datasource "Mydatasource" under JDBC Connector ->Run time ->Data Source,
    Name : Mydatasource
    Driver Name : Oracle
    JDBC version: 2.0(with XA support)
    JDBC compliant:
    Object Factory :oracle.jdbc.pool.OracleDataSourceFactory
    DataSource Type: ConnectionPoolDataSource
    *CPDS class name :oracle.jdbc.pool.OracleConnectionPoolDataSource
    Additional:
    Additional Properties:
    DatabaseName:LPAR8TEST
    DriverName:oracle.jdbc.OracleDriver
    Password: *****
    PortNumber:1521
    ServerName: 10.1.16.208
    URL :jdbc:oracel:[email protected]:1521:LPAR8TEST
    User:IMPL
    Connectoin Pool:
    Initial Connectons: 1                                         Expiration:  (check)
    Maximum Connections: 25                                  Connection Lifetime :600
    Maximum time wait of connection : 60                  Cleanup Thread : 200
    Default Connectoin Isolaton :Default
    SQL Engine:
    Open SQL
    3.Create Connector :
       Copy the standard connector :SDK_JDBC to SDK_JDBC_Oracle,
      Resource Adopter:
      Loader References:
      Add "libray:Oracle" .
    Managed Connection Factory:
    Configuration Property:
    DriverName:oracle.jdbc.OracleDriver
    Password: ****
    User:IMPL
    URL: jdbc:oracle:[email protected]:1521:LPAR8TEST
    All fo my configuration had been listed.
    And I had created JCO RFC : JT-BIDEV_PORTAL_BD1 , and created RFC connection with SM59 in BI.
    Please give me some suggesiton.
    Thanks.
    Louis

    When I try to start datasoure "Mydatasource" , it display error, error detail:
    java.rmi.RemoteException: com.sap.engine.services.dbpool.exceptions.BaseRemoteException: Error during start of application "sap.com/Mydatasource". [id = StartupError]
         at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:608)
    Caused by: java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "CGNPC".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "Mydatasource".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
              u2026.
    When I try to test JDBC with URL : http://jt-pldev:50000/TestJDBC_Web/TestJDBCPage.jsp,
    First I choose connection name "SDK_JDBC_Oracle" .
    If I click "Check Connectons", it display :
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      java.lang.NoClassDefFoundError: com.sap.ip.bi.sdk.dac.connector.odbo.impl.Connection (initialization failure)
    Exception id: [001A64A86F2C006B000004C40010302A000469C74E86A096]
    If I click "Slecton Connection", it display:
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      com.sap.engine.frame.core.load.SAPNoClassDefFoundError: javax.resource.Referenceable
    Exception id: [001A64A86F2C0063000004C00010302A000469C74FA2BB59]

  • Weblogic 7.0 , MySQL 3.23 JDBC Connection Pools

    i am using weblogic 7.0 and MySQL 3.23 and right now my objective is to create,
    configure and test a JDBC
    connection pool using the Administrative console.
    Here is what i have done till now
    - set the classpath of the MySQL driver in the startWLS.cmd like this
    SET MYSQL_DRIVER=C:\mysqldriver\mysql-connector-java-2.0.14\mysql-connector-java-2.0.14-bin.jar
    set CLASSPATH=%MYSQL_DRIVER%;%CLASSPATH%
    - using the weblogic administrative console i have created a new connection pool
    named as
    testpool.
    - Here is what i have in the testpool general tab
    Name: testpool
    URL: jdbc:mysql//localhost:3306/test (test is the name of the database in mysql)
    Driver Classname: org.gjt.mm.mysql.Driver
    I have not entered any Properties, ACL Name, Password or Open String Password.
    - Now i go the the Testing tab and enter a name of a table in my test database
    and click on Apply
    and on the command window i am getting the following exception
    java.sql.SQLException No suitable driver
    Thanks in advance,
    Ashish

    Thanks a lot Slava. After reading your mail and the post i was able to get it working.
    "Slava Imeshev" <[email protected]> wrote:
    Hi Ashish,
    I figured out what's the problem. URL in the connection pool
    definition is malformed. It's
    jdbc:mysql//localhost:3306/test
    while the correct one should have colon after mysql:
    jdbc:mysql://localhost:3306/test
    Regards,
    Slava Imeshev
    "Ashish Sureka" <[email protected]> wrote in message
    news:[email protected]...
    I am sorry, the program that i posted here is not comming properlyformatted but
    i am able to run a simple java program that connects to MySQL and alsoa
    servlet
    that connects to the MySQL. The only problem i am having is includingthe
    MySQL
    driver jar files to the weblogic server classpath.
    Thanks,
    Ashish.
    "Ashish Sureka" <[email protected]> wrote:
    Hello Joseph Weinstein,
    Actually, i already tried the same approach that you have mentioned
    in
    your reply
    before i posted my message here. Following is the program that i use
    to check
    MySQL connection.
    import java.sql.*;
    public class MySQLConnect
    public static void main(String[] args) throws Exception
    try {
    Class.forName ( "org.gjt.mm.mysql.Driver" );
    System.out.println ( "MySQL Driver Found" );
    } catch ( java.lang.ClassNotFoundException e ) {
    System.out.println("MySQL JDBC Driver not found ... ");
    throw ( e );
    String url = "";
    Connection con = null;
    try {
    url = "jdbc:mysql://" + "localhost:3306" + "/" + "test";
    con = DriverManager.getConnection(url);
    System.out.println("Connection established to " + url + "");
    } catch ( java.sql.SQLException e ) {
    System.out.println("Connection couldn't be established to " + url);
    String sqlStatement = "SELECT * FROM testtable";
    try {
    Statement s = con.createStatement();
    s.execute (sqlStatement);
    s.close ( );
    } catch ( SQLException e ) {
    System.out.println ( "Error executing sql statement" );
    con.close();
    The classpath that i use to run this program is
    SET PATH=C:\bea\jdk131_03\bin
    SETCLASSPATH=C:\bea\jdk131_03\jre\lib\rt.jar;C:\bea\weblogic700\ebcc\lib\ext\se
    rvlet.jar;C:\CSC413\Demos\HelloApp\HelloAppJAR
    SET CLASSPATH=%CLASSPATH%;C:\bea\weblogic700\server\lib\weblogic.jar
    SETMYSQL_DRIVER=C:\mysqldriver\mysql-connector-java-2.0.14\mysql-connector-java
    -2.0.14-bin.jar
    set CLASSPATH=.;%MYSQL_DRIVER%;%CLASSPATH%
    I have also written a Servlet which checks the MySQL connection. For
    the servlet
    i added the MySQL driver jar files in the WEB-INF/lib directory ofthe
    servlet
    web application and it is working fine.
    do you want me to attach the startWLS.cmd file that i changed to include
    the MySQL
    driver classpath.
    Thanks for your replies,
    Ashish.
    Joseph Weinstein <[email protected]> wrote:
    Ashish Sureka wrote:
    When i start the weblogic server using the command prompt by executingthe startWLS.cmd,
    i can see the classpath the server is using on the command window
    and
    that includes
    the jar file for the MySQL driver but still it is throwing a
    SQLException
    and
    saying that No Suitable driver.
    How do i include a external library or jar file on the weblogic
    server's
    classpath.
    is there a specific directory where i should put the MySQL driver
    jar
    file .
    Thanks,
    Ashish.No. Let's simplfy the problem. Please run a tiny standalone Java
    program
    that
    just makes a JDBC connection to your MySQL DBMS, with no weblogic
    code in the picture. When you succeed at this, show me the CLASSPATH
    and
    PATH of the shell that ran the program successfully, and show methe
    few lines
    of code that made the connection. Then we will know the problem.It
    may
    be that
    the URL you're passing to the pool is not exactly correct for that
    driver.
    Joe
    Joseph Weinstein <[email protected]> wrote:
    Ashish Sureka wrote:
    i am using weblogic 7.0 and MySQL 3.23 and right now my objective
    is
    to create,
    configure and test a JDBC
    connection pool using the Administrative console.
    Here is what i have done till now
    - set the classpath of the MySQL driver in the startWLS.cmd
    like
    this
    SET
    MYSQL_DRIVER=C:\mysqldriver\mysql-connector-java-2.0.14\mysql-connector-java
    -2.0.14-bin.jar
    set CLASSPATH=%MYSQL_DRIVER%;%CLASSPATH%
    - using the weblogic administrative console i have created anew
    connection
    pool
    named as
    testpool.
    - Here is what i have in the testpool general tab
    Name: testpool
    URL: jdbc:mysql//localhost:3306/test (test is the name of
    the
    database
    in mysql)
    Driver Classname: org.gjt.mm.mysql.Driver
    I have not entered any Properties, ACL Name, Password or
    Open
    String
    Password.
    - Now i go the the Testing tab and enter a name of a table in
    my
    test
    database
    and click on Apply
    and on the command window i am getting the following exception
    java.sql.SQLException No suitable driverWatch the first lines that the server prints out when the script
    starts
    it. The script
    shows the classpath that was constructed for the server. It is
    likely
    that you need
    to do something else to ensure your driver is really in the classpath
    the server uses.
    Joe
    Thanks in advance,
    Ashish

  • JDBC Connector in NetWeaver Dev Studio WebAS

    Hello,
    I am attempting to deploy a web module that utilizes a WebAS datasource for an external Oracle database. I expect to add a JDBC Connector leveraging the Oracle JDBC driver. I have been unable to deploy the Oracle datasource.
    I receive the stack trace below whenever I attempt to Start the datasource. I find many posts asking about this error but never have I found an answer as to the cause or resolution. OSS Note 751175 describes this as a classloader problem with connectors but it does not offer any repair method that works with this problem (in my case).
    I've had this problem with NetWeaver SP7 and it remains with SP10.
    Does anyone have explanation? Can I expect to test such applications in NetWeaver's standalone WebAS?
    Best regards,
    Gary
    ava.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 4114150:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot create DataSource "CMR".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSources(ContainerImpl.java:1836)

    Hello Benny,
    One of my co-workers resolved the problem which boiled down to driver configuration confusion. Here's what we learned:
    No SDA component was required though this was a good exercise for us to go through.
    The driver (JAR or ZIP) file can be added simply using the Visual Administrator JDBC Connector Runtime tab.
    We were not able to activate more than one type of datasource at a time (feature, bug or something else?)
    The following configurations start okay:
    **Starts***
    Driver: Oracle's classes12.zip
    JDBC Version: 1.x
    Driver class: oracle.jdbc.driver.OracleDriver
    Database URL: jdbc:oracle:thin:@host:port:instance
    User&Password specified.
    **Starts***
    Driver: Oracle's 1.4 ojdbc14.jar
    JDBC Version: 2.0
    Driver class: oracle.jdbc.pool.OracleDataSourceFactory
    Datasource type: ConnectionPoolDataSource
    CPDS Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Additional properties:
    URL = jdbc:oracle:thin:@host:port:instance
    User = xxxx
    Password = yyyyy
    **Will not start but the failure is expected***
    Driver: Oracle's classes12.zip
    JDBC Version: 1.x
    Driver class: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Database URL: jdbc:oracle:thin:@host:port:instance
    User&Password specified.
    We do need to run multiple datasources using Oracle and Sybase so I'm hoping the issue we encountered is simply configuration issues again.
    I appreciate your time and feedback Benny!
    Best regards,
    Gary

  • Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2

    Hello,
    I am experiencing an issue with pinging a JDBC connection Pool.
    I installed the following without any warnings or errors:
    Operating System: Oracle Enterprise Linux 5
    Oracle XE 11gR2 (11.2.0.2.0) database
    Glassfish 3.1.2.2
    I will refer to the steps I did after the installations
    1) In the .profile file of the OS I add the following:
    JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
    JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
    GLASSFISH_DIR=/u01/glassfish3
    GLASSFISH_HOME=/u01/glassfish3/glassfish
    DERBY_HOME=$GLASSFISH_DIR/javadb
    OPEN_MQ_HOME=$GLASSFISH_DIR/mq
    PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
    export GLASSFISH_HOME
    export DERBY_HOME
    export OPEN_MQ_HOME
    export PATH
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
    . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib
    3) I login to the Glassfish admin console and created a new JDBC Connection Pool.
    Pool Name: ds_orasys
    Resource Type: javax.sql.DataSource
    Datasource Classname: oracle.jdbc.pool.OracleDataSource
    User: [myschema]
    Password: [myschema password]
    URL: jdbc:oracle:thin:@localhost:1521:xe
    When I ping the connection pool I get the following message in the server log:
    [#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]
    [#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]
    I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.
    I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log
    Can anybody help me out or point me to the right direction.
    Thank you in advance

    The error is in the URL. It was in front of my eyes and I couldn't see the error. I skipped the ':' before the '@' when I created the pool. It is working fine now.

  • JDBC Connection pool recovery after DB server restart

    I am finding that Kodo is throwing the following exception after I restart
    my database server (mysql). I am doing the database server restart while my
    application server is idle, so it is not during a transaction.
    Communication link failure: java.net.SocketException [code=0;state=08S01]
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    This is presumably due to the JDBC connection pooling. Is there a
    configuration setting that allows Kodo to detect such failures and reconnect
    to the database server without exposing this problem to the application
    code? For example, WebLogic Server's JDBC connection pool has a setting that
    enables testing a connection and recovering from such failures before
    allocating it from the pool.
    Ben

    This is presumably due to the JDBC connection pooling. Is there a
    configuration setting that allows Kodo to detect such failures and reconnect
    to the database server without exposing this problem to the application
    code?Not right now. You can log an enhancement request with our bug database:
    http://bugzilla.solarmetric.com/

  • JDBC connection pool failures when used by JMS stores

              We are using WebLogic 6.1 sp2. We defined a separate connection pool for use by
              a JMS Store.
              <JDBCConnectionPool Name="sybaseJMSPool"
              Targets="cluster00"
              InitialCapacity="2"
              MaxCapacity="10"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;charset=utf8"
              URL="jdbc:sybase:Tds:@jms.db.host@/@jms.db.name@"/>
              (note that the @xxx@ string are replaced by actual values).
              We are using Sybase Jconnect 5.5 to a Sybase ASE 12.5 database.
              We deployed this configuration on a number of environments (testing, staging,
              ..). The actual hardware and network configuration is different for the different
              system, but the WebLogic domain stays the same regarding this issue.
              On the test system we frequently get the following exceptions:
              <Aug 13, 2002 1:56:04 PM CEST> <Alert> <JMS> <www00-test> <node00>
              <ExecuteThread: '6' for queue: 'JMS.TimerClientPool'> <> <> <040048>
              <JMSServer "JMSServer00", store failure while writing message for topic
              OrderChangeTopic, java.io.IOException: JMS JDBC store, connection pool =
              <sybaseJMSPool>, prefix = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              .>
              java.io.IOException: JMS JDBC store, connection pool = <sybaseJMSPool>, prefix
              = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              at weblogic.jms.store.JDBCIOStream.throwIOException
              (JDBCIOStream.java:1213)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1256)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Before that this message appeared:
              <Aug 13, 2002 11:31:16 AM CEST> <Error> <ConnectionManager> <www00-test>
              <node00> <ExecuteThread: '26' for queue: 'default'> <> <> <000000>
              <Closing: 'weblogic.rjvm.t3.T3JVMConnection@795af6' because of: 'Server
              received a message over an uninitialized connection: 'JVMMessage from: 'null'
              to: '-4555218188801970213S:192.168.13.1:[7001,7001,7002,7002,7001,7002,-
              1]:ADIS:node00' cmd: 'CMD_REQUEST', QOS: '101', responseId: '1',
              invokableId: '287', flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev
              offset: '34'''>
              This problem did not occur on another system which was used during a 2 day stress
              testing session.
              It seems that the problem occurs after a period in which no user request where
              made. The user requests trigger EJB's that start sending JMS messages.
              When the problem occurs, the JMS messaging systems seems to lock up as no messages
              are received anymore by the different listeners (MDBs).
              Undeploying and redeploying the JBDC connection pool solves the problem. This
              solution is unacceptable in case of a production system.
              A similarly defined connection pool, which is used by the EJBs to make database
              connection, does not manifest this problem.
              <JDBCConnectionPool Name="sybasePool"
              Targets="cluster00"
              InitialCapacity="10"
              CapacityIncrement="5"
              MaxCapacity="50"
              PreparedStatementCacheSize="150"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;JCONNECT_VERSION=6;charset=utf8"
              URL="jdbc:sybase:Tds:@db.host@/@db.name@"/>
              The JDBC connection pool is used as follows by the JDBC store
              <JMSJDBCStore ConnectionPool="sybaseJMSPool" Name="JDBCStore00" PrefixName="JMS00"/>
              <JMSServer Name="JMSServer00" Store="JDBCStore00" Targets="node00">
              <JMSTopic JNDIName="ADIS.JMSError" JNDINameReplicated="false" Name="ErrorTopic"/>
              <JMSTopic JNDIName="ADIS.Status"
              Name="StatusTopic" RedeliveryDelayOverride="300000"/>
              <JMSTopic JNDIName="ADIS.OrderChange" JNDINameReplicated="false"
              Name="OrderChangeTopic" RedeliveryLimit="3"/>
              </JMSServer>
              Turning on the "Test Reserved Connection" with a appropriate test table does not
              help.
              Some sources on the internet tell us that JZ0C0 errors in the Jconnect driver
              can be related to network problems. Nevertheless the connection pool should be
              able to cope with this.
              Can you provide any solution for this ? Or give us hints what can cause the problem
              

    Zhenhao Qi wrote:
    thanks! Joe.
    The SQL statement itself can no longer be simplified, the long excuation time is due to the database size and complicated Select criteria. I can easily reproduce the problem by using this SQL. I tried "BEA's Oracle driver (Type 4): Version 8.1.7,9.0.1,9.2.0". the question can be dissect into 2 pieces:
    1) why the jdbc connection (using oracle.jdbc.OracleDriver) won't return anything if the SQL execution time > 5min, that is probably the Oracle's problem
    2) why the occupied connection pool won't release even I set "Statementtimeout=600", this is Weblogic's problem.
    ZhenhaoHi. Yes, (1) is oracle's problem. (2) may also be. The JDBC spec has very few
    allowances for one thread to interrupt a second thread's JDBC call. If we
    transmit your timeout request by calling setQueryTimeout() on the oracle
    statement, and if you have a weblogic-controlled transaction we call
    Statement.cancel() on any ongoing statement, we end up relying on whether
    the Oracle driver implements and responds to those calls.
    Are you doing weblogic-controlled transactions? Are you/can you
    call Statement.setQueryTimeout() on your statements, or are these
    generated JDBC queries?
    If you can duplicate the problem using the weblogic.jdbc.oracle.OracleDriver
    we have some other debug avenues. This would be good even if you really
    want to use the thin driver, because we will do the same JDBC calls to
    either driver, and the debug would prove (if) we set up a query timeout
    and if we call cancel(). If we do, then we can know that it is the Oracle
    driver failing in these regards.
    Joe

Maybe you are looking for

  • SCVMM 2012 R2 VM on SMB 3.0 file share cloning is not offloaded and painfully slow

    I setup a test environment, it appears the SCVMM always use BITS to clone VM that was painfully slow SCVMM1: SCVMM 2012 R2 with the latest windows update VHOST1 and VHOST2: Hyper-V Host. Windows Server 2012 R2 with the latest update SERVER1: Windows

  • [help] Transcoding for Bluray using a CS5 project on CS4

    Hey guys, I'm back again. I'm not sure how to approach this, but I am currently using Encore CS5 but my school uses CS4. I created a full project (the same film that I have had issues with previously) and changed the build from DVD to Bluray and trie

  • Smart Playlist Not Syncing Correctly

    I downloaded Version 8 yesterday. Today I synced my iPod to iTunes. I had a smart playlist called "Newer Stuff" which consisted of my 60 most recently added songs, with automatic updating. When I hooked up and synced the iPod, I noticed that about 40

  • Installing Photoshop 10 on a MAC that is running Lion?

    Akaimai download manager is not supported on Lion (yet?), is there any other way to get the software I purchased downloaded?

  • Data between stacked sequences

    I need to transfer a large array from one sequence to next sequence in stacked sequence structure. I made a property  node in next sequence, it works. But I did not feel it is the best way to do it. Please advice if any better way to do this job. Tha