Results 1 to 3 of 3

Thread: Scaffold works on dev box but not on CF?

  1. #1
    Join Date
    Jan 2010
    Posts
    7

    Default Scaffold works on dev box but not on CF?

    I have the following domain class definition

    Code:
    class Match {
    
        String key
        Date created
        static hasMany = [players:Player, questions:Question, responses:Response]
        Boolean started
        Boolean completed
    
        List questions
        List players
      
    
        static constraints = {
          key(blank:false)
          players(size:1..6)
          questions(size:5..5)
        }
    }
    I have scaffolding turned on in the controller which works fine on my development box, but when I delpoy the project to CF and try to hit the controller I get the following stacktrace....

    Any ideas?

    Code:
    2010-01-21 22:57:14,385 [TP-Processor6] ERROR util.JDBCExceptionReporter  - You have an error in your SQL syntax; check the manual that corresponds to your My
    SQL server version for the right syntax to use near 'match this_ limit 10' at line 1
    2010-01-21 22:57:14,438 [TP-Processor6] ERROR errors.GrailsExceptionResolver  - Executing action [list] of controller [com.ets.trivialive.MatchController]  ca
    used exception: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select this_.id as id1_0_, this_.version as ver
    sion1_0_, this_.created as created1_0_, this_.started as started1_0_, this_.key as key1_0_, this_.completed as completed1_0_ from match this_]; nested excepti
    on is org.hibernate.exception.SQLGrammarException: could not execute query
    org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [list] of controller [com.ets.trivialive.MatchController]
      caused exception: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select this_.id as id1_0_, this_.version as
     version1_0_, this_.created as created1_0_, this_.started as started1_0_, this_.key as key1_0_, this_.completed as completed1_0_ from match this_]; nested exc
    eption is org.hibernate.exception.SQLGrammarException: could not execute query
            at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
            at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
            at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
            at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
            at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
            at java.lang.Thread.run(Thread.java:619)
    Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; S
    QL [select this_.id as id1_0_, this_.version as version1_0_, this_.created as created1_0_, this_.started as started1_0_, this_.key as key1_0_, this_.completed
     as completed1_0_ from match this_]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
            ... 6 more
    Caused by: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select this_.id as id1_0_, this_.version as version1
    _0_, this_.created as created1_0_, this_.started as started1_0_, this_.key as key1_0_, this_.completed as completed1_0_ from match this_]; nested exception is
     org.hibernate.exception.SQLGrammarException: could not execute query
            at com.ets.trivialive.MatchController$_closure2.doCall(script1264132576166823911718.groovy:13)
            at com.ets.trivialive.MatchController$_closure2.doCall(script1264132576166823911718.groovy)
            ... 6 more
    Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
            ... 8 more
    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL se
    rver version for the right syntax to use near 'match this_ limit 10' at line 1
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
            at com.mysql.jdbc.Util.getInstance(Util.java:381)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
            at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228)
            at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
            ... 8 more
    Jan 21, 2010 10:57:14 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet grails threw exception
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versio
    n for the right syntax to use near 'match this_ limit 10' at line 1
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
            at com.mysql.jdbc.Util.getInstance(Util.java:381)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
            at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228)
            at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
            at com.ets.trivialive.MatchController$_closure2.doCall(script1264132576166823911718.groovy:13)
            at com.ets.trivialive.MatchController$_closure2.doCall(script1264132576166823911718.groovy)
            at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
            at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
            at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
            at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
            at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
            at java.lang.Thread.run(Thread.java:619)
    Jan 21, 2010 10:57:14 PM org.apache.catalina.core.StandardWrapperValve invoke

  2. #2
    Join Date
    Jun 2005
    Posts
    102

    Default

    "You have an error in your SQL syntax; check the manual that corresponds to your My
    SQL server version for the right syntax to use near 'match this_ limit 10' at line 1
    "

    'match' is a MySQL reserved word: http://dev.mysql.com/doc/mysqld-vers...words-5-0.html

  3. #3
    Join Date
    Jan 2010
    Posts
    7

    Default

    ah thank you, now i feel like a moron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •