gpt4 book ai didi

Grails Elasticsearch 插件严重 : Unexpected transforming call sites grails elasticsearch

转载 作者:行者123 更新时间:2023-12-01 03:43:17 25 4
gpt4 key购买 nike

我正在尝试在我的 Grails 项目(grails 版本 2.4.4)上安装 Elasticsearch 插件 (elasticsearch:0.0.4.4),在添加插件依赖项并运行应用程序 (grails run-app) 后,我遇到了一些相当严重的错误.

堆栈跟踪:

Apr 02, 2015 9:44:08 AM org.springsource.loaded.agent.SpringLoadedPreProcessor preProcess
SEVERE: Unexpected problem transforming call sites
java.lang.IllegalStateException: Unexpected problem processing bytes for class
at org.springsource.loaded.ConstantPoolChecker2.readConstantPool(ConstantPoolChecker2.java:196)
at org.springsource.loaded.ConstantPoolChecker2.<init>(ConstantPoolChecker2.java:128)
at org.springsource.loaded.ConstantPoolChecker2.getReferences(ConstantPoolChecker2.java:102)
at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:300)
at org.springsource.loaded.MethodInvokerRewriter.rewriteUsingCache(MethodInvokerRewriter.java:156)
at org.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:828)
at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:321)
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:102)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:765)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule.newModule(MetaInfExtensionModule.java:72)
at org.codehaus.groovy.runtime.m12n.StandardPropertiesModuleFactory.newModule(StandardPropertiesModuleFactory.java:48)
at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:76)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:152)
at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.initialiseGroovyExtensionModules(DefaultGrailsApplication.java:710)
at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.initialise(DefaultGrailsApplication.java:684)
at org.codehaus.groovy.grails.project.plugins.GrailsProjectPluginLoader$_loadPlugins_closure2.doCall(GrailsProjectPluginLoader.groovy:132)
at org.codehaus.groovy.grails.project.plugins.GrailsProjectPluginLoader$_loadPlugins_closure2.call(GrailsProjectPluginLoader.groovy)
at org.codehaus.groovy.grails.cli.api.BaseSettingsApi.profile(BaseSettingsApi.java:342)
at org.codehaus.groovy.grails.project.plugins.GrailsProjectPluginLoader.loadPlugins(GrailsProjectPluginLoader.groovy:99)
at org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean.afterPropertiesSet(GrailsPluginManagerFactoryBean.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:687)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:71)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Entry: 39 15
at org.springsource.loaded.ConstantPoolChecker2.processConstantPoolEntry(ConstantPoolChecker2.java:335)
at org.springsource.loaded.ConstantPoolChecker2.readConstantPool(ConstantPoolChecker2.java:186)
... 58 more

这重复了很多次。更有意思的:
| Error 2015-04-02 09:44:29,658 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: No datastore implementation specified
Message: No datastore implementation specified
Line | Method
->> 135 | doCall in ElasticsearchGrailsPlugin$_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
^ 745 | run in java.lang.Thread
| Error Forked Grails VM exited with error

编辑:
我尝试了一些其他的东西。我下载了elasticsearch-1.5.0,创建了环境变量ELASTIC_SEARCH_HOME,并将其添加到我的路径中,这消除了之前运行时出现的环境变量错误 grails package .

我还在 Config.groovy 文件的底部添加了用于 Elasticsearch 的默认配置(位于 this 页面的底部)。我还补充说:
elasticsearch {
datastoreImpl = "hibernateDatastore"
}

到我的 Config.groovy 文件中的默认配置。

所以在 grails run-app 之后我像以前一样得到了几个第一个堆栈跟踪,但不是第二个。此外,我的应用程序确实可以运行,并且功能似乎没有被破坏。

编辑 2:

一些可能感兴趣的额外信息。我创建了一个新的 grails 应用程序(grails 2.4.4),在 BuildConfig.groovy 文件中添加了 elasticsearch 插件依赖声明(':elasticsearch:0.0.4.4'),在我的 Config.groovy 文件中添加了默认配置和 datastoreImpl,并且做了一个 grails run-app我得到了多次重复的相同堆栈跟踪(上面的第一个),但该应用程序仍在运行。

最佳答案

我有一个类似的问题 - 为了解决,我确保:

  • 我的域对象有“static searchable = true”(稍后将调整为
    微调)
  • Config.groovy 具有“elasticSearch.datastoreImpl”
    设置
  • 使用 Grails 2.5.0(它有最新的 Spring jar
    它)

  • chalice 干净; grails run-app - 没有异常(exception),应用程序运行

    基本上,升级到 grails 2.5.0

    关于Grails Elasticsearch 插件严重 : Unexpected transforming call sites grails elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29418419/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com