8 Replies Latest reply on Jul 31, 2003 9:10 AM by julien1

    Setup nukes with mysql

    chitech

      setup nukes with mysql

      Hsqldb is working just fine but I would like to use mysql database instead.

      I have done this:
      - change ./build/local.properties to match ./build/etc/local.properties-mysql
      - ant ./build/build.xml (build.bat)
      - ant ./distrib/build.xml (build.bat)
      - copy ./nukes/src/resource/mysql/nukes-ds.xml
      & ./distrib/output/lib/nukes-distrib.ear to deploy lib.
      - execute ./nukes/src/resources/mysql/prepare.ddl in my sql editor
      - execute setup.ddl for every module in my sql editor
      - copy mysql-connector-java-3.0.8-stable-bin.jar into %JBOSS_HOME%/server/default/lib
      - start the server

      I get the following error:

      22:34:23,777 INFO [EjbModule] Starting
      22:34:23,777 INFO [EntityContainer] Starting
      22:34:24,739 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Could not load class: org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCo
      mand
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData.(JDBCEntityCommandMetaData.java:61)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:239)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:75)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:737)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:430)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:372)

      Can anybody help me?...Thx a lot

        • 1. Re: Setup nukes with mysql

          what are you using ? what jboss, where did you get nukes ?

          julien

          • 2. Re: Setup nukes with mysql
            alainmg

            I tries jboss_3_2_2RC1 andt I had the same problem yesterday.
            It may be due to the fact that I haven't sync up to nukes for a few weeks. For this reason I went back to jboss_3_2_1, until I'm ready to sync up with Nukes again.

            • 3. Re: Setup nukes with mysql

              the cvs version we have a rarely stale, it compiles and runs well.

              anyway, jboss-3.2.2rc2 is going out tomorrow and nukes will work with it (not under)

              julien

              • 4. Re: Setup nukes with mysql
                chitech

                I am using the jboss included in Jboss 3.2.1-nukes-1.0 alpha and i get the source from cvs.

                • 5. Re: Setup nukes with mysql
                  elaineqs

                  I am using jboss-3.2.2RC2, nukes cvs version and mysql. When I deploy nukes, I get the following error:

                  ...
                  11:35:14,679 ERROR [EntityContainer] Starting failed
                  org.jboss.deployment.DeploymentException: Could not load driver class: com.mysq.jdbc.PreparedStatement; - nested throwable: (java.lang.ClassNotFoundException:
                  com.mysql.jdbc.PreparedStatement) at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.init(JDCMySQLCreateCommand.java:45)at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:128) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDCStoreManager.java:481) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:410) at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:160) at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java: ....

                  What is wrong?

                  Thanks!

                  elaineqs

                  • 6. Re: Setup nukes with mysql

                    you have not installed the mysql jdbc drivers. you can get them at www.mysql.com. the current package is 3.0.8 as far as I know. it is called connectorj.

                    julien

                    • 7. Re: Setup nukes with mysql
                      elaineqs

                      Thanks Julien!

                      Now I have another problem. When I log with admin user, edit and update a html file, I get the error:

                      16:05:03,053 ERROR [STDERR] java.sql.SQLException: General error: Warning: Some non-transactional changed tables couldn't be rolled back
                      16:05:03,053 ERROR [STDERR] at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
                      16:05:03,063 ERROR [STDERR] at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
                      16:05:03,063 ERROR [STDERR] at org.gjt.mm.mysql.MysqlIO.sqlQuery(Unknown Source)
                      16:05:03,063 ERROR [STDERR] at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
                      16:05:03,063 ERROR [STDERR] at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
                      16:05:03,063 ERROR [STDERR] at org.gjt.mm.mysql.Connection.rollback(UnknownSource)
                      16:05:03,063 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.rollback(LocalManagedConnection.java:116)...

                      The file nukes\nukes\output\resources\nukes-ejb-jar\META-INF\jbosscmp-jdbc.xml have the following lines:

                      <entity-commands>
                      <entity-command name="nukes-entity-command"
                      class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand"/>
                      </entity-commands>

                      Is missing anything?

                      Thanks!!

                      elaineqs

                      • 8. Re: Setup nukes with mysql

                        yes, your mysql is not transactionnal, so a rollback is not possible. you should use mysql-max instead.

                        this a no big consequence on nukes except that it is not transactionnal.

                        julien