Problem using CMP with MySQL

Discussions

General J2EE: Problem using CMP with MySQL

  1. Problem using CMP with MySQL (3 messages)

    Hi,

    I've got problem using a CMP with MySQL. I'm using the Sun J2EE RI and the default SQL statements that the deploytool generates can't work with MySQL......But it works if i use cloudscape.
    Do you guys have any idea how to solve the problem???

    This is the stacktrace:

    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
            java.rmi.RemoteException: nested exception is: java.sql.SQLException: Sy
    ntax error or access violation: You have an error in your SQL syntax near '"Prod
    uctBeanTable" WHERE "productID" = '123-456-7890' ' at line 1; nested exception i
    s:
            java.sql.SQLException: Syntax error or access violation: You have an err
    or in your SQL syntax near '"ProductBeanTable" WHERE "productID" = '123-456-7890
    ' ' at line 1
            at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
    n(ShutdownUtilDelegate.java:64)
            at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
            at ejb._ProductHome_Stub.create(Unknown Source)
            at client.ProductClient.main(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:22
    9)
            at com.sun.enterprise.appclient.Main.main(Main.java:155)
    Caused by: java.rmi.RemoteException: nested exception is: java.sql.SQLException:
     Syntax error or access violation: You have an error in your SQL syntax near '"P
    roductBeanTable" WHERE "productID" = '123-456-7890' ' at line 1; nested exceptio
    n is:
            java.sql.SQLException: Syntax error or access violation: You have an err
    or in your SQL syntax near '"ProductBeanTable" WHERE "productID" = '123-456-7890
    ' ' at line 1
            at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.ja
    va:389)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:43
    1)
            at ejb.ProductBean_PM_RemoteHomeImpl.create(ProductBean_PM_RemoteHomeImp
    l.java:58)
            at ejb._ProductBean_PM_RemoteHomeImpl_Tie._invoke(Unknown Source)
            at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Ge
    nericPOAServerSC.java:520)
            at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Gen
    ericPOAServerSC.java:210)
            at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAS
    erverSC.java:112)
            at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
            at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProces
    sor.java:84)
            at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadP
    ool.java:99)
    Caused by: java.sql.SQLException: Syntax error or access violation: You have an
    error in your SQL syntax near '"ProductBeanTable" WHERE "productID" = '123-456-7
    890' ' at line 1
            at com.mysql.jdbc.MysqlIO.sendCommand(Unknown Source)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
            at com.mysql.jdbc.Connection.execSQL(Unknown Source)
            at com.mysql.jdbc.PreparedStatement.executeQuery(Unknown Source)
            at com.sun.ejb.persistence.PersistenceManagerImpl.primaryKeyExists(Persi
    stenceManagerImpl.java:289)
            at com.sun.ejb.persistence.PartitionImpl.afterEjbCreate(PartitionImpl.ja
    va:640)
            at ejb.ProductBean_PM.ejbCreate(ProductBean_PM.java:109)
            at ejb.ProductBean_PM_RemoteHomeImpl.create(ProductBean_PM_RemoteHomeImp
    l.java:52)
            ... 7 more
    Destroying products..
    Application threw an exception:java.rmi.ServerException: RemoteException occurre
    d in server thread; nested exception is:
            java.rmi.RemoteException: nested exception is: java.lang.NullPointerExce
    ption; nested exception is:
            java.lang.NullPointerException

    Threaded Messages (3)

  2. Problem using CMP with MySQL[ Go to top ]

    RTFM
  3. Problem using CMP with MySQL[ Go to top ]

    Sage advice indeed!
  4. Problem using CMP with MySQL[ Go to top ]

    Have you tried entering your query
    using the mysql shell.
    If it works using the mysql shell.
    Then. This is a problem.
    If not. Then, reexamine your query,