Pages

Monday, August 19, 2013

MySQL useCursorFetch property and Grails 2.2.4

Just hit a problem with using the useCursorFetch property in Grails 2.2.4. It may be present in earlier versions of Grails 2, but this was working up through Grails 1.3.9. I'm upgrading a Grails 1.3.9 application to Grails 2.2.4 and hit the following runtime exception when the JDBC URL has the useCursorFetch property set to true.


| Error 2013-08-19 09:05:50,365 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: java.lang.LinkageError: Illegal class file encountered. Try running with -Xverify:all in method executeBatchSerially
Message: java.lang.LinkageError: Illegal class file encountered. Try running with -Xverify:all in method executeBatchSerially
   Line | Method
->> 308 | evaluateEnvironmentSpecificBlock in grails.util.Environment
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   301 | executeForEnvironment            in     ''
|   277 | executeForCurrentEnvironment . . in     ''
|   303 | innerRun                         in java.util.concurrent.FutureTask$Sync
|   138 | run . . . . . . . . . . . . . .  in java.util.concurrent.FutureTask
|   895 | runTask                          in java.util.concurrent.ThreadPoolExecutor$Worker
|   918 | run . . . . . . . . . . . . . .  in     ''
^   680 | run                              in java.lang.Thread

Caused by LinkageError: Illegal class file encountered. Try running with -Xverify:all in method executeBatchSerially
->> 4566 | prepareStatement                 in com.mysql.jdbc.ConnectionImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   4479 | prepareStatement                 in     ''
|   281 | prepareStatement . . . . . . . . in org.apache.commons.dbcp.DelegatingConnection
|   313 | prepareStatement                 in org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
|   111 | methodMissing . . . . . . . . .  in org.grails.datastore.gorm.GormStaticApi
|    56 | loadUsersAndRoles                in com.vocabra.eventlogging.services.DefaultDataLoaderService
|    22 | load . . . . . . . . . . . . . . in     ''
|   165 | doCall                           in GrailsMelodyGrailsPlugin$_closure4_closure15_closure16
|    18 | doCall . . . . . . . . . . . . . in BootStrap$_closure1
|   308 | evaluateEnvironmentSpecificBlock in grails.util.Environment
|   301 | executeForEnvironment . . . . .  in     ''
|   277 | executeForCurrentEnvironment     in     ''
|   303 | innerRun . . . . . . . . . . . . in java.util.concurrent.FutureTask$Sync
|   138 | run                              in java.util.concurrent.FutureTask
|   895 | runTask . . . . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   918 | run                              in     ''
^   680 | run . . . . . . . . . . . . . .  in java.lang.Thread

Removing the property from the JDBC URL resolves the issue. Need to do more research into why this is happening.

5 comments:

  1. Fantastic post, Keep sharing.
    Please look here at
    Best Astrologer in Jayanagar

    ReplyDelete
  2. Such a great post, thanks for posting this kind of useful information.
    Visit Best Astrologer in Peddapalli

    ReplyDelete
  3. Good astrologycal post,thank you for sharing with community.
    Visit here
    Sofa Refurbishing in Adugodi

    ReplyDelete
  4. Thanks for providing this information. It's very helpful.

    abhiram astrology center. Best indian Astrologer In grandeprairie

    ReplyDelete
  5. Thank you for your post. This is excellent information.
    For Home Painting Services in Bangalore. Contact us.

    ReplyDelete