1 Reply Latest reply on Oct 2, 2002 11:10 PM by gateway87

    CMP2 Example problem with mysql

    schwarcz

      Using the CMP2 example and mysql 2.3 I am getting SQL errors from the deployment of EJBTestRunnerEJB. The log shows success messages in creating multiple tables. Any idea where I should look? Obviously I’m not going to find any source for the SQL…

      16:38:56,812 INFO [EjbModule] Created
      16:38:56,812 INFO [EjbModule] Starting
      16:38:58,265 INFO [bank/Bank] Created table 'NEW_BANK' successfully.
      16:38:58,453 INFO [bank/Transaction] Created table 'NEW_TRANSACTION' successfully.
      16:38:58,484 INFO [bank/Account] Created table 'NEW_ACCOUNT' successfully.
      16:38:58,515 INFO [bank/Customer] Created table 'NEW_CUSTOMER' successfully.
      16:38:58,515 INFO [EjbModule] Started
      16:38:58,531 INFO [MainDeployer] Deployed package: file:/C:/jboss/server/default/deploy/ejb-test.jar
      16:38:58,531 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss/server/default/deploy/gangster-cmp2.jar
      16:38:58,796 INFO [EjbModule] Creating
      16:38:58,812 INFO [EjbModule] Deploying OrganizationEJB
      16:38:58,828 INFO [EjbModule] Deploying GangsterEJB
      16:38:58,843 INFO [EjbModule] Deploying JobEJB
      16:38:58,859 INFO [EjbModule] Deploying EJBTestRunnerEJB
      16:38:58,906 INFO [EjbModule] Created
      16:38:58,906 INFO [EjbModule] Starting
      16:38:59,312 INFO [GangsterEJB] Created table 'gangster' successfully.
      16:38:59,375 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB,jndiName=crimeportal/Job
      org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: Syntax
      error or access violation: You have an error in your SQL syntax near 'desc VARCHAR(255) BINARY NOT NULL, the_boss INTEG
      ER, CONSTRAINT pk_organization ' at line 1)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:175)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:84)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:457)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:369)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:764)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:967)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)


        • 1. Re: CMP2 Example problem with mysql
          gateway87

          I also encountered this problem (I use SQL Server). That's because there is a little error in DD file (in ejb-jar or jbosscmp-jdbc.jar). You can just search "desc" and replace it with "description".

          Hope this helps.