ERROR context.GrailsContextLoader - Error initializing Grails: Error creating bean with name 'grailsApplication'

340 Views Asked by At

I use grails 2.3.11 version with JDK 1.8_0_131, my project build correctly in my pc and works also when I deploy to my server, but the problem is the same version I checkout to my another pc, it gives the error when I deploy to my server:

[localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing Grails: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.VerifyError: (class: privateserver/BulkExportService$EmptyResults, method: super$1$stream signature: ()Ljava/util/stream/Stream;) Illegal use of nonvirtual function call
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.VerifyError: (class: privateserver/BulkExportService$EmptyResults, method: super$1$stream signature: ()Ljava/util/stream/Stream;) Illegal use of nonvirtual function call
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.VerifyError: (class: privateserver/BulkExportService$EmptyResults, method: super$1$stream signature: ()Ljava/util/stream/Stream;) Illegal use of nonvirtual function call
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getDeclaredConstructors(Class.java:2020)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at privateserver.BulkExportService.<clinit>(BulkExportService.groovy:198)
        at java.lang.Class.forName(Class.java:348)
        ... 5 more

any idea what this error means?

1

There are 1 best solutions below

1
On

I use grails 2.3.11 version with JDK 1.8_0_131

Grails 2.5 is the first version of Grails for which we support Java 1.8.