6 Replies Latest reply on Jun 24, 2004 11:52 AM by jae77

    Error deploying News Modul!

    lcb

      I haven en error deploying the news module on mysql:

      Created table 'nuke_news_topics' successfully.
      2004-06-24 14:00:22,937 INFO [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.TopicEJB] Created index 'nuke_news_topics_idx0' on 'nuke_news_topics' success
      fully.
      2004-06-24 14:00:22,943 INFO [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.TopicEJB] issuePostCreateSQL::sql: [CREATE UNIQUE name ON nukes_news_topics (
      name);] on table nuke_news_topics
      2004-06-24 14:00:22,955 INFO [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.TopicEJB] Executing SQL: CREATE UNIQUE name ON nukes_news_topics (name);
      2004-06-24 14:00:22,962 WARN [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.TopicEJB] Issuing sql CREATE UNIQUE name ON nukes_news_topics (name); failed:
       java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax. Check the manual that corresponds to
       your MySQL server version for the right syntax to use near 'name ON nukes_news_topics (name)' at line 1"
      2004-06-24 14:00:22,983 ERROR [org.jboss.ejb.EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Error while issuing sql in post-table-create; - nested throwable: (java.sql.SQLException: Syntax error or access v
      iolation, message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax
      to use near 'name ON nukes_news_topics (name)' at line 1")
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.issuePostCreateSQL(JDBCStartCommand.java:392)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:110)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:484)
      


      It seems the table name is false, but that's not all. The complete statement isn't correct, it must be "ALTER TABLE `nuke_news_topics` ADD UNIQUE (`name`)".
      This works fine.



        • 1. Re: Error deploying News Modul!
          jae77

          thx for that update - i'll correct the database property files to add the correct alter table statement.

          i did look up the syntax in the manul and i could have sworn they said that the "CREATE UNIQUE" syntax was just an alias around the alter table statement.

          • 2. Re: Error deploying News Modul!
            jae77

            fixed - could you pls update against the tag or the head and retest this for me.

            • 3. Re: Error deploying News Modul!
              lcb

              Tested, looks pretty good.

              Taking al look at the postgres and oracle properties shows me that the table names there are false too. But i cant say if the statement ist wrong or false.

              • 4. Re: Error deploying News Modul!
                jae77

                i'm not understanding what you mean by the "table names are false".

                • 5. Re: Error deploying News Modul!
                  lcb

                  The table name in the statement is "nukes_news_topics" an should be "nuke_news_topics".
                  Here the patches:

                  Index: oracle8.properties
                  ===================================================================
                  RCS file: /cvsroot/jboss/nukes/build/etc/oracle8.properties,v
                  retrieving revision 1.5
                  diff -u -r1.5 oracle8.properties
                  --- oracle8.properties 16 Jun 2004 01:41:50 -0000 1.5
                  +++ oracle8.properties 24 Jun 2004 15:39:19 -0000
                  @@ -53,4 +53,4 @@
                   #
                   # unique constraint for nukes_news_topics
                   #
                  -nukes.news.topic.constraint = CREATE UNIQUE name ON nukes_news_topics (name);
                  +nukes.news.topic.constraint = CREATE UNIQUE name ON nuke_news_topics (name);
                  

                  Index: postgresql.properties
                  ===================================================================
                  RCS file: /cvsroot/jboss/nukes/build/etc/postgresql.properties,v
                  retrieving revision 1.6
                  diff -u -r1.6 postgresql.properties
                  --- postgresql.properties 16 Jun 2004 01:41:50 -0000 1.6
                  +++ postgresql.properties 24 Jun 2004 15:40:40 -0000
                  @@ -53,4 +53,4 @@
                   #
                   # unique constraint for nukes_news_topics
                   #
                  -nukes.news.topic.constraint = CREATE UNIQUE name ON nukes_news_topics (name);
                  +nukes.news.topic.constraint = CREATE UNIQUE name ON nuke_news_topics (name);
                  



                  • 6. Re: Error deploying News Modul!
                    jae77

                    d'oh - i always end up adding that extra "s". thx for catching that - i'll make sure those get updated appropritely.