Discussions

EJB programming & troubleshooting: Error Connecting to MySQL 4.1 from BEA 8.1

  1. Error Connecting to MySQL 4.1 from BEA 8.1 (3 messages)

    Hello,

    I am facing a problem connecting from my application to MySQL 4.1 from BEA 8.1 on Windows XP m/c.

    I have the MySQL Connector/J entry as weblogic class path mentioned in startmydomain.cmd.

    set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar;
    C:\MySQL\mysql-connector-java-3.0.14-production\mysql-connector-java-3.0.14-production-bin.jar;%CLASSPATH%

    The driver class I am using is - com.mysql.jdbc.Driver

    From weblogic console, I am succesfully able to create & test MySQL connection pool and my application datasource is pointed to that pool.But when I launch my application and try to obtain Connection from the datasource, I get the
    following exception stacktrace...with exception at

    Connection myConn = JDBCConnectorImpl.dataSource.getConnection();

    Any ideas..?

    NOTE - I face no issues with JBoss or Sun Java System.


    Caused by: java.sql.SQLException: Failed to Generate Wrapper Class.
    Nested Exception: java.lang.RuntimeException: Failed to Generate Wrapper Class
    at weblogic.utils.wrapper.WrapperFactory.createWrapper(Ljava.lang.Class;Ljava.lang.Object;Z)Ljava.lang.Object;(WrapperFactory.java:183)
    at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(ILjava.lang.Object;Z)Ljava.lang.Object;(JDBCWrapperFactory.java:171)
    at weblogic.jdbc.jts.Driver.newConnection(Ljava.lang.String;Lweblogic.transaction.Transaction;Ljava.lang.String;)Lweblogic.jdbc.wrapper.JTSConnection;(Driver.java:737)
    at weblogic.jdbc.jts.Driver.createLocalConnection(Lweblogic.transaction.Transaction;Ljava.lang.String;Ljava.util.Properties;)Lweblogic.jdbc.wrapper.JTSConnection;(Driver.java:197)
    at weblogic.jdbc.jts.Driver.connect(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Driver.java:155)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection()Ljava.sql.Connection;(RmiDataSource.java:305)
    at com.xxxxx.core.framework.connectors.JDBCConnector.JDBCConnectorImpl.initialiseDataSource()V(JDBCConnectorImpl.java:96)
    at com.xxxxx.core.framework.connectors.JDBCConnector.JDBCConnectorImpl.getConnection()Ljava.sql.Connection;(JDBCConnectorImpl.java:50)
    at com.xxxxx.core.framework.datainvoker.JDBCDataInvoker.doSelect(Ljava.util.Map;Ljava.lang.String;Ljava.lang.Class;)Ljava.util.List;(JDBCDataInvoker.java:134)
    at com.xxxxx.core.framework.da.JDBCDataAccessor.doSelect(Ljava.util.Map;Ljava.lang.String;Ljava.lang.Class;)Ljava.util.List;(JDBCDataAccessor.java:199)
  2. Have you tried another driver? e.g.
    mmmysql.sourceforge.net
  3. Hi!!!

    i want access to mysql database by weblogic .

    i configure my connection pool the test is right

    i create two datasource one with Global Honor transaction true and another with value false

    to access to first datasource i've the following error:

    Error 500--Internal Server Error
    >
    > java.sql.SQLException: Cannot obtain connection: driverURL = jdbc:weblogic:pool:MyJDBC Connection Pool, props = {enableTwoPhaseCommit=false, jdbcTxDataSource=true, connectionPoolID=MyJDBC Connection Pool, dataSourceName=MyJDBC Data Source}.
    > Nested Exception: java.lang.RuntimeException: Failed to Generate Wrapper Class
    > at weblogic.utils.wrapper.WrapperFactory.createWrapper(WrapperFactory.java:141)
    > at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:73)
    > at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:242)
    > at weblogic.jdbc.pool.Driver.connect(Driver.java:158)
    > at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
    > at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
    > at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
    > at jsp_servlet.__index._jspService(__index.java:142)
    > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    > at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
    > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    > at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    > at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
    > at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
    > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    > at weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:395)
    > at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:448)
    > at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
    > at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
    > at jsp_servlet.__index._jspService(__index.java:142)
    > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    > at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
    > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    > at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    > at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
    > at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
    > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    i don't understand??? do u know how to resolve this pb??

    in the segond datasource

    i've this error : an error has occured

    pleaseee help meee

    thanks
  4. Hi, I am facing the same problem, do you find a solution? Regards, Javier