icfnext/aem-groovy-console

Groovy console error onloading the page

Closed this issue · 7 comments

Groovy console error onloading Groovy version 2.3.2

20.06.2017 15:10:48.013 ERROR [] [172.18.248.94 [1497967848009] GET /bin/groovyconsole/services HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.util.NoSuchElementException: Cannot access last() element from an empty List
at org.codehaus.groovy.runtime.DefaultGroovyMethods.last(DefaultGroovyMethods.java:6913)
at org.codehaus.groovy.runtime.dgm$331.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at com.citytechinc.aem.groovy.console.servlets.ServicesListServlet.getAdapterDeclaration(ServicesListServlet.groovy:81)
at sun.reflect.GeneratedMethodAccessor510.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at com.citytechinc.aem.groovy.console.servlets.ServicesListServlet$_getAdaptersMap_closure2_closure5.doCall(ServicesListServlet.groovy:41)
at sun.reflect.GeneratedMethodAccessor1430.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:423)
at groovy.lang.Closure.call(Closure.java:439)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1373)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1304)
at org.codehaus.groovy.runtime.dgm$150.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.citytechinc.aem.groovy.console.servlets.ServicesListServlet$_getAdaptersMap_closure2.doCall(ServicesListServlet.groovy:40)
at sun.reflect.GeneratedMethodAccessor1431.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:423)
at groovy.lang.Closure.call(Closure.java:439)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1373)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1366)
at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.citytechinc.aem.groovy.console.servlets.ServicesListServlet.getAdaptersMap(ServicesListServlet.groovy:39)
at com.citytechinc.aem.groovy.console.servlets.ServicesListServlet.this$6$getAdaptersMap(ServicesListServlet.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1722)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3458)
at com.citytechinc.aem.groovy.console.servlets.AbstractJsonResponseServlet.getProperty(AbstractJsonResponseServlet.groovy)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
at com.citytechinc.aem.groovy.console.servlets.ServicesListServlet.doGet(ServicesListServlet.groovy:24)

20.06.2017 15:10:48.016 WARN [] [172.18.248.94 [1497967848009] GET /bin/groovyconsole/services HTTP/1.1] com.day.cq.wcm.core.impl.components.ComponentCacheImpl No component node found at /bin/groovyconsole/services.servlet
20.06.2017 15:10:48.016 WARN [] [172.18.248.94 [1497967848009] GET /bin/groovyconsole/services HTTP/1.1] com.day.cq.wcm.core.impl.components.ComponentCacheImpl No component node found at /bin/groovyconsole/services.servlet
20.06.2017 15:10:48.175 ERROR [] [172.18.248.94 [1497967848052] GET /bin/groovyconsole/audit.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.lang.NullPointerException: Cannot invoke method readLines() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at com.citytechinc.aem.groovy.console.servlets.AuditServlet$_loadAuditRecords_closure1.doCall(AuditServlet.groovy:63)
at sun.reflect.GeneratedMethodAccessor1450.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
at groovy.lang.Closure.call(Closure.java:423)
at groovy.lang.Closure.call(Closure.java:439)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1373)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1366)
at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.citytechinc.aem.groovy.console.servlets.AuditServlet.loadAuditRecords(AuditServlet.groovy:62)
at com.citytechinc.aem.groovy.console.servlets.AuditServlet.this$6$loadAuditRecords(AuditServlet.groovy)
at com.citytechinc.aem.groovy.console.servlets.AuditServlet$this$6$loadAuditRecords.callCurrent(Unknown Source)
at com.citytechinc.aem.groovy.console.servlets.AuditServlet.doGet(AuditServlet.groovy:40)
screen shot 2017-07-06 at 18 07 31

Hi, can you confirm which version of AEM and which version of the Groovy Console you're using?

Hi,

Thank you for quick response, please see below.

Adobe Experience Manager, Version 6.1.0.SP1
Groovy version 2.3.2 and Bootstrap.

I don't need the Groovy version, rather the version of the Groovy Console you're using - for AEM 6.1 it should be something like 8.x.x.

aem-groovy-console-7.0.1.zip
Version: 7.0.1 | Build: 1 | Last installed 2016/04/25 | admin

7.0.1 is not compatible with AEM 6.1. Please upgrade to 8.1.0, which is the latest 6.1-compatible version.

Hi Lykorian, i came across this issue #49 that is currently on your name. I am going to have the same problem if i upgrade to 8.1.0 as you recommended above.

I believe that issue was linked to another (closed) issue and may have been left open mistakenly. Please confirm if you still have an OSGi dependency issue after installing 8.1.0, I can issue a hotfix with more flexible versioning if necessary.