grails – ClassNotFoundException:org.hibernate.event.spi.PreLoadEventListener

前端之家收集整理的这篇文章主要介绍了grails – ClassNotFoundException:org.hibernate.event.spi.PreLoadEventListener前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我尝试运行我的Grails 2.4.1应用程序时,我得到以下异常,我不太明白.
| Running Grails application
objc[15346]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
| Error 2014-06-19 16:54:40,048 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: org/hibernate/event/spi/PreLoadEventListener
Message: org/hibernate/event/spi/PreLoadEventListener
    Line | Method
->>  800 | defineClass               in java.lang.ClassLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    142 | defineClass               in java.security.SecureClassLoader
|    449 | defineClass . . . . . . . in java.net.URLClassLoader
|     71 | access$100                in     ''
|    361 | run . . . . . . . . . . . in java.net.URLClassLoader$1
|    355 | run                       in     ''
|    354 | findClass . . . . . . . . in java.net.URLClassLoader
|    425 | loadClass                 in java.lang.ClassLoader
|     94 | doCall . . . . . . . . .  in grails.plugin.hibernate4.HibernatePluginSupport$__clinit__closure1
|    754 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
|    584 | beans . . . . . . . . . . in     ''
|    527 | invokeMethod              in     ''
|    262 | run . . . . . . . . . . . in java.util.concurrent.FutureTask
|   1145 | runWorker                 in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run                       in java.lang.Thread
Caused by ClassNotFoundException: org.hibernate.event.spi.PreLoadEventListener
->>  366 | run                       in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    355 | run                       in     ''
|    354 | findClass . . . . . . . . in java.net.URLClassLoader
|    425 | loadClass                 in java.lang.ClassLoader
|    800 | defineClass . . . . . . . in     ''
|    142 | defineClass               in java.security.SecureClassLoader
|    449 | defineClass . . . . . . . in java.net.URLClassLoader
|     71 | access$100                in     ''
|    361 | run . . . . . . . . . . . in java.net.URLClassLoader$1
|    355 | run                       in     ''
|    354 | findClass . . . . . . . . in java.net.URLClassLoader
|    425 | loadClass                 in java.lang.ClassLoader
|     94 | doCall . . . . . . . . .  in grails.plugin.hibernate4.HibernatePluginSupport$__clinit__closure1
|    754 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
|    584 | beans . . . . . . . . . . in     ''
|    527 | invokeMethod              in     ''
|    262 | run . . . . . . . . . . . in java.util.concurrent.FutureTask
|   1145 | runWorker                 in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run                       in java.lang.Thread
| Error Forked Grails VM exited with error

请注意,到目前为止,我的应用程序中没有任何复杂的代码,只有少数域类使用db-reverse-engineer插件从现有数据库进行逆向工程.

解决方法

我想这个错误来自db-reverse-engineer插件,它可能依赖于来自Hibernate 3的类,而Grails 2.4默认使用Hibernate 4.尝试降级Hibernate 3插件删除db-reverse-engineer插件如果你不再需要它
原文链接:https://www.f2er.com/java/120602.html

猜你在找的Java相关文章