Unexpected problem processing bytes for class in Grails with Elasticsearch

528 views Asked by At

I'm trying to get Elasticsearch working in my Grails project. I'm using the Java Rest High-level client in Elasticsearch documented here [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-getting-started-maven.html]. I'm using Elasticsearch 6.3.2 version, Java 8, Grails 2.4.4

I have created a service class and added an import statement at the beginning of the file. For eg: import org.elasticsearch.ElasticsearchException And, when I start Grails I get the error below. But if I remove that import statement the application runs fine. So, what's happening in the import ?

Sep 12, 2018 3:05:29 PM 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)
Caused by: java.lang.IllegalStateException: Entry: 14 18
    at org.springsource.loaded.ConstantPoolChecker2.processConstantPoolEntry(ConstantPoolChecker2.java:335)
    at org.springsource.loaded.ConstantPoolChecker2.readConstantPool(ConstantPoolChecker2.java:186)

So, can someone help me understand what's happening here?

Thanks.

1

There are 1 answers

0
SpareTheRod On

I got this error in versions of Java later than Java 7, but was able to get it to work in Java 7