Error using mySQL connection Pool

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

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

Similar Messages

  • Fatal error while filling connection pool

    I was not getting a connection to an Oracle database and I was getting the following error in cms.log: "FATAL  Connector - Unable to create connection pool for T_Orbis_Oracle: Fatal error while filling connection pool for jdbc:oracle:thin:@MESDB:1521:ASPENB21" where T_Orbis_Oracle is the xMII link name and the database ASPENB21 is on server MESDB. I changed the database username in the link to SYSTEM and I then got a connection and a Created Connection pool message in the log. I then changed back to the username which originally was giving the error and it now also gave me a successful connection. I am now worried that there is an issue in the background which is gradually building up and will begin to fail again as previously. Can anyone explain what is causing this problem and suggest how I can correct it? Thanks, John.

    John,
    Check you have installed the JDBC driver ojdbc14.jar (works for both 9 and 10).
    Also check the server package:
    MII 11.x--->ServerPackage com.lighthammer.Illuminator.connectors.IDBC
    MII 12.x--->com.sap.xmii.Illuminator.connectors.IDBC
    Carefull when you set up the string because some oracle databases have servicenames instead of SID, and the url was different if you use them instead of the SID.
    For services names the url is jdbc:oracle:thin@host:port:SID
    Also check your Network firewall between MII and DB and ports too.
    Oracle9i installs with a number of default accounts.You must unlock all other accounts before using them. Oracle recommends changing all user passwords immediately after installation.
    -Suresh
    Edited by: Suresh Hiremath on Jul 29, 2009 8:20 AM

  • J2EE mysql connection pool

    Hello,
    I am trying to create a mysql connection pool using the admin console. The mysql JDBC driver is located in <install_dir>/domains/domain1/lib/ext.
    For Datasource Classname I use com.mysql.jdbc.jdbc2.optional.MysqlDataSource
    A ping results in:
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection could not be allocated because: null, message from server: "Host 'localhost.localdomain' is not allowed to connect to this MySQL server"
    When changing the URL property to localhost a ping results in:
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection object cannot be null
    Any ideas about what goes wrong?
    Thanks...

    I did a simple php test:
    <?php
    mysql_connect("localhost.localdomain", "user", "pass") or die(mysql_error());
    echo "Connected to MySQL<br />";
    ?>
    This results in:
    Warning: mysql_connect(): Host 'localhost.localdomain' is not allowed to connect to this MySQL server in /var/www/mathesis/mambo/mysql.php on line 2
    Host 'localhost.localdomain' is not allowed to connect to this MySQL server
    <?php
    mysql_connect("localhost", "user", "pass") or die(mysql_error());
    echo "Connected to MySQL<br />";
    ?>
    results in: Connected to MySQL
    So I see two possible solutions:
    1) Make the appserver use localhost instead of localhost.localdomain (specifying localhost as property doesn't work!).
    2) Make MySQL accept localhost.localdomain connections.
    For both possible solutions I'm searching for answers...
    -Michael

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

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

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

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

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

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

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

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

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

  • Problem in retriving varray when using weblogic connection pool

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

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

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

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

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

  • Error in creating Connection Pool using Oracle Thin Driver

    Hi,
    I am trying to create a connection pool in WS 5.1 with sp #6 using Oracle Thin Driver (oracle.jdbc.driver.OracleDriver) on a Sun box. But I am able to create the pool using weblogic.jdbc.oci.Driver. I get an DBMS Driver exception when I use thin driver. I have LD library path and weblogic class path set correctly. WL shows the following exception :
    weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the
    connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(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)
    Any help on this is greatly appreciated.
    Thanks,
    Ramu

    Hi Ramu,
    Please post your connection pool setting here. You might have missed some
    port/server info. The driver is unable to connect to the db server here.
    sree
    "Ramu" <[email protected]> wrote in message
    news:3d5bbc3a$[email protected]..
    >
    Yes. I am trying to create a connection pool in weblogic and I have theweblogic
    class path setup correctly. It points to classes111.zip andnls_charset11.zip.
    >
    -Ramu
    "Neo Gigs" <[email protected]> wrote:
    Did you setup the JDBC library classpath correctly?
    For me, e.g. Oracle 7.3.4, the classpath should be:
    export CLASSPATH = /oracle7.3.4/jdbc/lib/classes.zip:%CLASSPATH%
    Noted that the JDBC classpath must be the first classpath element in
    the export
    statement.
    Neo

  • MySQL connection pooling (tomcat) problem

    Hi all i just started learning servlets and i want to make a program in order to understand database connection pooling in tomcat.My problem is that when i run the servlet i created i get this error :
    java.lang.NullPointerException org.DB.TestDB2.doGet(TestDB2.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    And that from tomcat log from netbeans :
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' 
    .I configured tomcat server.xml file like this :
    <Context path="/DBTest" docBase="DBTest"         debug="5" reloadable="true" crossContext="true">   <Resource name="jdbc/phonebook_db" auth="Container" type="javax.sql.DataSource"               maxActive="100" maxIdle="30" maxWait="10000"               username="*******" password="********" removeAbandoned="true"               removeAbandonedTimeout="120" driverClassName="com.mysql.jdbc.Driver"               url="jdbc:mysql://localhost:3306/test_phonebook_db?autoReconnect=true"/> </Context>   
    This is the resource reference i have in my web app web.xml file :
    <resource-ref>       <description>DB Connection</description>       <res-ref-name>jdbc/phonebook_db</res-ref-name>       <res-type>javax.sql.DataSource</res-type>       <res-auth>Container</res-auth>   </resource-ref> 
    And this is my servlet class :
    package org.DB;  import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; import javax.naming.*; import javax.sql.*; public class TestDB2 extends HttpServlet { private Connection conn ; private Statement stat ; private ResultSet rs ; private int counter; private Object rsValue; public void init() {     try {             InitialContext ctx = new InitialContext();             DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/phonebook_db");             conn = ds.getConnection();             }         catch(Exception e) {               e.printStackTrace();         }     }     public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {         try {           stat = conn.createStatement();           rs = stat.executeQuery("SELECT * FROM phones_table");            } catch (SQLException sqle) {         sqle.printStackTrace();         }      response.setContentType("text/html; charset=utf-8");     PrintWriter out = response.getWriter();         String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " + "Transitional//EN\">\n";     out.println(docType +"<HTML>\n" + "<HEAD><TITLE>PhoneBook entries</TITLE></HEAD>\n");         counter = 0;     try {         while (rs.next()) {             out.println("<h4>Entry no. " + (++counter) + "</h4>");             out.println("<table width=\"75%\" border=\"1\">");             out.println("<tr>\n"+ "<td width=\21%\"><b>LastName:</b></td>\n"+ "<td width=\"79%\">");             out.println((((rsValue = rs.getObject("LASTNAME"))==null || rs.wasNull())?                 "":(rsValue.toString())));             out.println("</td>\n</tr>\n" +  "<tr>\n"+                     "<td width=\21%\"><b>FirstName:</b></td>\n"+ "<td width=\"79%\">");             out.println((((rsValue = rs.getObject("FIRSTNAME"))==null || rs.wasNull())?                 "":(rsValue.toString())));             out.println("</td>\n"+ "</tr>\n"+                     "<td width=\21%\"><b>Phone:</b></td>\n"+ "<td width=\"79%\">");             out.println((((rsValue = rs.getObject("PHONE"))==null || rs.wasNull())?                 "":(rsValue.toString())));             out.println("</td>\n" + "</tr>\n" +                     "</table>\n"+ "<br>\n<br>");         }     } catch (SQLException sqle) {         sqle.printStackTrace();     }     out.println("</body>\n"+             "</html>"); } public void destroy() {     try {         rs.close();         stat.close();         conn.close();     } catch (SQLException sqle) {         sqle.printStackTrace();         }     } }{code} Any suggestions?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thank you for your answer.Yes my servlet class is something more worse than horrible(i don't use the database connection correct i don't use the MVC pattern i use out.println() ) but i just tried to take a ready example and try to understand .So i write this servlet myself as a starting point :
    package org.DB;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.*;
    import java.sql.*;
    public class DBServlet extends HttpServlet {
        private Connection conn ;
        private Statement stat ;
        private ResultSet rs ;
        private int counter;
        String driver = "com.mysql.jdbc.Driver";
        String dbURL = "jdbc:mysql://localhost:3306/phonebookdb?user=**********&password=************";
        @Override
    public void init() {
         try {
                Class.forName(driver).newInstance();
                conn = DriverManager.getConnection(dbURL);
         }catch(Exception e) {
                  e.printStackTrace();
                  System.err.print("Unable to make connection ");
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                out.println("<html>");
                out.println("<head>");
                out.println("<title>Servlet DBServlet</title>"); 
                out.println("</head>");
                out.println("<body>");
                out.println("<h1>Servlet DBServlet at " + request.getContextPath () + "</h1>");
                out.println("<br /><br /><br />");
                if(conn!=null) 
                    out.println("conn object : "+conn);
                out.println("</body>");
                out.println("</html>");
            } catch(Exception sq) {
                System.out.println("Exception" + sq.getMessage());
                out.close();
        @Override
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        @Override
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
         public void destroy() {
         try {
             conn.close();
         } catch (SQLException sqle) {
             sqle.printStackTrace();
        @Override
        public String getServletInfo() {
            return "A Simple Servlet";
    }And it work for now.
    Edited by: pavlos555 on Oct 21, 2008 10:21 AM

  • MySQL connection pooling guidelines

    Dear tribe,
    Although using autoReconnect=true in my pool definition, I keep running out of connections...
    This morning changed to autoReconnectForPools=true flag (along with autoReconnect) and upgraded to Connector/J 3.0.11.
    While I'm waiting to see if this will work out, can someone please point to some guidelines on setting up connection pools specifically for MySQL and AppServer7 or post a working configuration (jar versions, web.xml fragment etc)?
    Thanks,
    Manos

    My initial configuration was exactly that but was failing to connect after leaving the applicatin running for 8 hours. I then added autoReconnect=true and autoReconnectForPools=true. But after leaving the application running without any requests to it, this morning i tried to load a page and got closed connection errors again...
    javax.servlet.ServletException: Could not execute query
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:478)
         at jasper.monthly_jsp._jspService(_monthly_jsp.java:524)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at gr.netsmart.manos2.jstats.filters.WebStatisticsKeeper.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:265)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    Root Cause
    net.sf.hibernate.JDBCException: Could not execute query
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1478)
         at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
         at jasper.monthly_jsp._jspService(_monthly_jsp.java:158)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at gr.netsmart.manos2.jstats.filters.WebStatisticsKeeper.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:265)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    Caused by: java.sql.SQLException: No operations allowed after connection closed.
    Connection was closed due to the following exception:
    ** BEGIN NESTED EXCEPTION **
    java.sql.SQLException
    MESSAGE: Communication link failure: java.io.EOFException, underlying cause: null
    ** BEGIN NESTED EXCEPTION **
    java.io.EOFException
    STACKTRACE:
    java.io.EOFException
         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1319)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
         at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1164)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2087)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2049)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2030)
         at com.mysql.jdbc.Connection.rollbackNoChecks(Connection.java:3004)
         at com.mysql.jdbc.Connection.rollback(Connection.java:1458)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.getCurrentConnection(JdbcXAConnection.java:640)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.prepareStatement(JdbcXAConnection.java:378)
         at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228)
         at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
         at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703)
         at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
         at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
         at net.sf.hibernate.loader.Loader.doList(Loader.java:949)
         at net.sf.hibernate.loader.Loader.list(Loader.java:940)
         at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:833)
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1475)
         at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
         at jasper.monthly_jsp._jspService(_monthly_jsp.java:158)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at gr.netsmart.manos2.jstats.filters.WebStatisticsKeeper.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:265)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    ** END NESTED EXCEPTION **
    STACKTRACE:
    java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null
    ** BEGIN NESTED EXCEPTION **
    java.io.EOFException
    STACKTRACE:
    java.io.EOFException
         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1319)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
         at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1164)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2087)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2049)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2030)
         at com.mysql.jdbc.Connection.rollbackNoChecks(Connection.java:3004)
         at com.mysql.jdbc.Connection.rollback(Connection.java:1458)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.getCurrentConnection(JdbcXAConnection.java:640)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.prepareStatement(JdbcXAConnection.java:378)
         at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228)
         at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
         at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703)
         at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
         at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
         at net.sf.hibernate.loader.Loader.doList(Loader.java:949)
         at net.sf.hibernate.loader.Loader.list(Loader.java:940)
         at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:833)
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1475)
         at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
         at jasper.monthly_jsp._jspService(_monthly_jsp.java:158)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at gr.netsmart.manos2.jstats.filters.WebStatisticsKeeper.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:265)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    ** END NESTED EXCEPTION **
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1638)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
         at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1164)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2087)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2049)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2030)
         at com.mysql.jdbc.Connection.rollbackNoChecks(Connection.java:3004)
         at com.mysql.jdbc.Connection.rollback(Connection.java:1458)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.getCurrentConnection(JdbcXAConnection.java:640)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.prepareStatement(JdbcXAConnection.java:378)
         at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228)
         at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
         at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703)
         at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
         at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
         at net.sf.hibernate.loader.Loader.doList(Loader.java:949)
         at net.sf.hibernate.loader.Loader.list(Loader.java:940)
         at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:833)
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1475)
         at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
         at jasper.monthly_jsp._jspService(_monthly_jsp.java:158)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at gr.netsmart.manos2.jstats.filters.WebStatisticsKeeper.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:265)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    ** END NESTED EXCEPTION **
         at com.mysql.jdbc.Connection.checkClosed(Connection.java:2225)
         at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:501)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.getCurrentConnection(JdbcXAConnection.java:641)
         at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.prepareStatement(JdbcXAConnection.java:378)
         at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228)
         at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
         at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703)
         at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
         at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
         at net.sf.hibernate.loader.Loader.doList(Loader.java:949)
         at net.sf.hibernate.loader.Loader.list(Loader.java:940)
         at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:833)
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1475)
         ... 27 more

  • Error using mySQL

    Hi. I´m trying use mySQL with SRTutorialADFBC tutorial. I can create connections. I can view my tables, etc. But when I try run the jsp page, I get a error 500:
    java.sql.SQLException: No suitable driver
         at java.sql.DriverManager.getConnection(DriverManager.java:545)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:189)
         at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:135)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:536)
         at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:326)
         at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:87)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Can you help me?

    Thanks javaX. But the error continue... The message begin:
    500 Internal Server Error
    JBO-30003: The pool of applications (oracle.srtutorial.datamodel.AppModuleLocal) failed in the checkout module exception:
    oracle.jbo.JboException: JBO-29000: JBO-29000: JBO-29000: JBO-26061: Erro ao abrir a conexão JDBC.
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Any new idea?

  • How to use my connection pool in multiple servlets?

    I now have a functioning connection pool using these lines in a servlet:
    private Connection getConnection(String lookup) throws NamingException, SQLException {
    Context context = new InitialContext();
    DataSource ds = (DataSource)context.lookup(lookup);
    Connection ocon = ds.getConnection();
    context.close();
    return ocon;
    } // private Connection getConnection(String lookup) throws NamingException, SQLException {
    ========================
    If I want to create additional servlets in the same web app which query the same database,
    do I need to repeat this block of code in every servlet, or can I just put it in one servlet
    and have other servlets access it in some way to get a connection? Should I change the code
    above from a "private" Connection to a "public" Connection?
    An example servlet is shown below. To put my question another way: If I want to
    create a second servlet with a different set of queries, would I just make a copy of the first
    servlet and then change only the queries, or is there a more efficient way to have multiple
    servlets get connections from the pool?
    Any suggestions are greatly appreciated.
    Thank you.
    Logan
    ************************************servlet example**********************************
    package CraigsClasses;
    import javax.servlet.*;
    import javax.servlet.jsp.*;
    import java.net.*;
    import java.util.*;
    import java.io.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.Date;
    import java.text.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class CraigsMain extends HttpServlet {
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    private Connection getConnection(String lookup) throws NamingException, SQLException {
    Context context = new InitialContext();
    DataSource ds = (DataSource)context.lookup(lookup);
    Connection ocon = ds.getConnection();
    context.close();
    return ocon;
    } // private Connection getConnection(String lookup) throws NamingException, SQLException {
    // Process the http Get request
    public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
    try {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String sql = "select formtitle from checkboxforms where cbformid = 157";
    // error occurs at this line
    Connection ocon = getConnection("java:comp/env/jdbc/CraigsList");
    PreparedStatement pStmt = ocon.prepareStatement(sql);
    ResultSet rs1 = pStmt.executeQuery();
    rs1.next();
    out.println("<br>" + rs1.getString(1));
    rs1.close();
    pStmt.close();
    ocon.close();
    } catch(SQLException sqle) {
    System.err.println("sql exception error: " + sqle);
    } catch(NamingException ne) {
    System.err.println("naming exception error: " + ne);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    =======================================================================

    sjasja, Thank you for the reply. What you are suggesting is exactly what I have been looking for. But I'm pretty weak on how to make this separate con pool servlet work. My first attempt is shown below. It doesn't compile this line, which is obviously wrong:
    public static Connection getConnection(String lookup) throws NamingException, SQLException {
    Could you please help me with this servlet code? Thanks.
    package CraigsClasses;
    import javax.servlet.*;
    import javax.servlet.jsp.*;
    import java.net.*;
    import java.io.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class ConPoolInit extends HttpServlet {
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    try {
    public static Connection getConnection(String lookup) throws NamingException, SQLException {
    Context context = new InitialContext();
    DataSource ds = (DataSource)context.lookup(lookup);
    Connection ocon = ds.getConnection();
    context.close();
    return ocon;
    } // private Connection getConnection(String lookup) throws NamingException, SQLException {
    } catch(SQLException sqle) {
    System.err.println("sql exception error: " + sqle);
    } catch(NamingException ne) {
    System.err.println("naming exception error: " + ne);
    =======================================

  • Error while creating connection pool "FATAL: database "null" does not exist

    Hi,
    Iam trying to create a XA connection pool using postgres driver (postgresql-8.3-603.jdbc3.jar) on Weblogic 8.1.6.0 from the Admin Console.
    I have provided the following info in the JDBC config
    Driver Class Name: org.postgresql.xa.PGXADataSource.
    JDBC URL: jdbc:postgresql://192.168.192.112:5432/sample1
    UserName: postgres
    Password: Postgres
    When i click Test Driver Configuration. Iam getting the following error
    "FATAL: database "null" does not exist"
    if i change the Driver Class Name to "org.postgresql.Driver", it is working fine. But as iam trying to create XA datasource i need to use the XA Driver class name.
    Can someone tell me how to resolve this issue ?
    The postgres version iam using is 8.3.1

    Hi Joe,
    The driver is in the classpath.
    Please find the stack trace.
    org.postgresql.util.PSQLException: FATAL: database "null" does not exist
    at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(Conn
    ectionFactoryImpl.java:444)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Conne
    ctionFactoryImpl.java:99)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactor
    y.java:66)
    at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Conn
    ection.java:124)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Conn
    ection.java:30)
    at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
    at org.postgresql.Driver.makeConnection(Driver.java:386)
    at org.postgresql.Driver.connect(Driver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.
    java:83)
    at org.postgresql.xa.PGXADataSource.getXAConnection(PGXADataSource.java:
    47)
    at org.postgresql.xa.PGXADataSource.getXAConnection(PGXADataSource.java:
    32)
    at weblogic.management.console.utils.JDBC.testConnection(JDBC.java:185)
    at weblogic.management.console.actions.mbean.JDBCConnectionPoolTestActio
    n.prePerform(JDBCConnectionPoolTestAction.java:114)
    at weblogic.management.console.actions.mbean.DoMBeanWizardAction.perform
    (DoMBeanWizardAction.java:215)
    at weblogic.management.console.actions.internal.ActionServlet.doAction(A
    ctionServlet.java:182)
    at weblogic.management.console.actions.internal.ActionServlet.doPost(Act
    ionServlet.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:1077)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:465)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:348)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:7047)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3902)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2773)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)

  • How can I use the Connection Pool with DB2

    Hi All,
    I am facing the problem with the usage for the Connection Pool.
    I want to use DB2 via JNDI lookup.
    But when starting the Weblogic server, Error occured with the following message.
    <Error> <JDBC> <Cannot startup connection pool "MyJDBCPool" Cannot load driver class : com.ibm.db2.jdbc.app.DB2Driver>
    DB2 and Weblogic are on the same machine.
    In case of the use of remote DB2 database, I also encountered the same error.
    Configurations are as follows.
    <JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver"
    MaxCapacity="10" Name="MyJDBCPool"
    Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
    TestConnectionsOnReserve="false" TestTableName="test" URL="jdbc:db2://localhost:6789/yongjoo"/>
    <SNMPAgent Name="mydomain"/>
    <JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool" Targets="myserver"/>
    Could you please give some information about this problem? I will appreciate your kindness.

    Hi Joe,
    Thanks your help.
    Perhaps It's my fault for Weblogic console's setting.
    After I reset the target server in console, Error message disappeared.
    But, when I call the TestCode, I encountered another error message. The error
    is NameNotFoundException.
    When lookingup the JNDI name, NameNotFoundException errer occured. I tried to
    change my setting and JNDI name, but the results are the same.
    Would you please give me some information about this one more time? I will be
    appreciated for your help.
    Follows are Config.xml
    <JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver" MaxCapacity="10"
    Name="MyJDBCPool" Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
    TestConnectionsOnReserve="false" TestTableName="test"
    URL="jdbc:db2://localhost:6789/yongjoo"/> <SNMPAgent Name="mydomain"/>
    <JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool"
    Targets="myserver"/>
    and follows are TestCode,
    url = "t3://localhost:7001"; //default URL
    datasource = "jdbc/acsdb";
    Context ctx = null;
    Hashtable p = new Hashtable();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, url);
    try{
    ctx = new InitialContext(p);
    System.err.println("initialContext(p)"+ctx); <-- success
    ds = (DataSource)ctx.lookup("java:comp/env/jdbc/acsdb");
    }catch(NameNotFoundException ne){
    throw new ConnectionException(); .
    }catch(NamingException ne){
    throw new ConnectionException();

Maybe you are looking for

  • Weird New Problem

    Please help - I have many photos in IPhoto. They all had names assigned by the camera. In Finder I created an Automater to rename files. I renamed the files in the Data photo. Now when I open IPhoto they are blank in the window but if I click they op

  • How to change the size of redo file

    Deal all, I finish installed the db,and the size of redo file is 50m by default. I found many "checkpoint not complete" events in alert.log file. Now i want to change it to 100M and try to avoid the event appear again ,how can i do?

  • CRM Middleware help for rookie needed.. Replication of Business Transaction

    Hi guys, I try to set up replication of Business Transactions from R/3 to CRM and vice versa. I have created: - CRM site type (CRM) , R/3 type site (R46CLNT700) then I created a subscription: SalesDocuments (R46CLNT700 is assigned to this subscriptio

  • Exception only on the first attempt

    Hi Gurus,                When i click on a custom pop-up, i get a exception in the last page only on the first attempt.(CX_SY_IMPORT_MISMATCH_ERROR). i have debugged enough, but i am not able to figure out anything. What can be possibly the solution?

  • AR Invoice Posting Error

    Hi, I got error message while posting AR invoice like  " There are Excisable Item(s) with non-CENVAT tax code". Problem is Same data working fine if make AR incoice manually but when using the SDK it throw error. Note: while try to save AR invoice ma