Grails没有选择修补的jar文件

时间:2013-08-26 11:57:03

标签: java hibernate grails grails-2.0 datastore

我正在研究grails 2.0.3项目。在路上我注意到grails 2.0.3依赖: org.grails:grails-datastore-core:1.1.4.RELEASE 有一个错误。所以我修补了jar文件并将其放在grails的 lib 文件夹中。在 BuildConfig.groovy 中排除了grails jar文件并给出了我自己的依赖关系,如下所示

inherits("global") {
    excludes "grails-datastore-core"
}

dependencies {
    compile 'org.grails:grails-datastore-core:1.1.4.RELEASE'
}

然后执行以下步骤:

  • grails clean
  • grails compile --refresh-dependencies
  • grails run-app

但出现以下错误:

2013-06-05 16:39:14,613 20831 ERROR     [org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager] (pool-7-thread-1:) Error configuring dynamic methods for plugin [domainClass:2.0.3]: java.lang.NoClassDefFoundError: org/grails/datastore/mapping/core/SoftThreadLocalMap
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: org/grails/datastore/mapping/core/SoftThreadLocalMap
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoClassDefFoundError: org/grails/datastore/mapping/core/SoftThreadLocalMap
at org.grails.datastore.mapping.core.AbstractDatastore.<clinit>(AbstractDatastore.java:46)
at java.lang.Class.forName(Class.java:171)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.grails.datastore.mapping.core.SoftThreadLocalMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 7 more
2013-06-05 16:39:14,714 20932 ERROR [org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager] (pool-7-thread-1:) Error configuring dynamic methods for plugin [hibernate:2.0.3]: java.lang.NoClassDefFoundError:     org.grails.datastore.mapping.core.AbstractDatastore
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: org.grails.datastore.mapping.core.AbstractDatastore
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoClassDefFoundError: org.grails.datastore.mapping.core.AbstractDatastore
at java.lang.Class.forName(Class.java:171)
... 5 more

我已尝试重命名jar 文件并将依赖关系范围更改为运行时,但没有运气。

我还尝试使用this链接进行升级,但仍然遇到同样的错误。

感谢任何形式的帮助

0 个答案:

没有答案