Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table output is broken #41

Closed
andrey-bardashevskiy-nl opened this issue Feb 20, 2023 · 10 comments
Closed

Table output is broken #41

andrey-bardashevskiy-nl opened this issue Feb 20, 2023 · 10 comments

Comments

@andrey-bardashevskiy-nl

A simple table output script fails with an exception.

table {
    columns('Col 1', 'Col 2')
    row('foo', 'bar')
}
20.02.2023 22:33:04.357 *ERROR* [127.0.0.1 [1676932383795] POST /bin/groovyconsole/post.json HTTP/1.1] be.orbinson.aem.groovy.console.impl.DefaultGroovyConsoleService error running script
groovy.lang.MissingPropertyException: No such property: DELEGATE_FIRST for class: be.orbinson.aem.groovy.console.extension.impl.scriptmetaclass.SlingScriptMetaClassExtensionProvider
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:67) [groovy:4.0.9]
	at org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.unwrap(IndyGuardsFiltersAndSignatures.java:161) [groovy:4.0.9]
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at be.orbinson.aem.groovy.console.extension.impl.scriptmetaclass.SlingScriptMetaClassExtensionProvider$_getScriptMetaClass_closure1$_closure4.doCall(SlingScriptMetaClassExtensionProvider.groovy:39) [aem-groovy-console-bundle:19.0.1]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343) [groovy:4.0.9]
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:88) [groovy:4.0.9]
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328) [groovy:4.0.9]
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at Script1.run(Script1.groovy:1)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at be.orbinson.aem.groovy.console.impl.DefaultGroovyConsoleService.runScript(DefaultGroovyConsoleService.groovy:75) [aem-groovy-console-bundle:19.0.1]
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at be.orbinson.aem.groovy.console.servlets.ScriptPostServlet.doPost(ScriptPostServlet.groovy:63) [aem-groovy-console-bundle:19.0.1]
	at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.22.0]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.22.0]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.22.0]
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88) [org.apache.sling.engine:2.7.8]
@royteeuwen
Copy link
Contributor

Thanks for reporting the issue! First time I see the table being used ;). Fixed in aem-groovy-console 19.0.2

@bobi
Copy link

bobi commented Feb 21, 2023

I have developed the Intellij groovy plugin and tested the functionality :), the issue was submitted from my other account.

@royteeuwen
Copy link
Contributor

@bobi super, just learned about your plugin last week because intellij suggested it, will become super handy for myself 😄! If you have any feature proposals, don't hesistate to make a ticket (or a PR 😄)

@bobi
Copy link

bobi commented Feb 21, 2023

Seems fix didn't help, still seeing same error with 19.0.2

21.02.2023 19:02:06.884 *ERROR* [[0:0:0:0:0:0:0:1] [1677006126073] POST /bin/groovyconsole/post.json HTTP/1.1] be.orbinson.aem.groovy.console.impl.DefaultGroovyConsoleService error running script
groovy.lang.MissingPropertyException: No such property: DELEGATE_FIRST for class: Script1
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:67) [groovy:4.0.9]
	at org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.unwrap(IndyGuardsFiltersAndSignatures.java:161) [groovy:4.0.9]
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at be.orbinson.aem.groovy.console.extension.impl.scriptmetaclass.SlingScriptMetaClassExtensionProvider$_getScriptMetaClass_closure1$_closure4.doCall(SlingScriptMetaClassExtensionProvider.groovy:40) [aem-groovy-console-bundle:19.0.2]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343) [groovy:4.0.9]
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:88) [groovy:4.0.9]
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328) [groovy:4.0.9]
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at Script1.run(Script1.groovy:1)
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at be.orbinson.aem.groovy.console.impl.DefaultGroovyConsoleService.runScript(DefaultGroovyConsoleService.groovy:75) [aem-groovy-console-bundle:19.0.2]
	at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) [groovy:4.0.9]
	at be.orbinson.aem.groovy.console.servlets.ScriptPostServlet.doPost(ScriptPostServlet.groovy:63) [aem-groovy-console-bundle:19.0.2]
	at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.22.0]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.22.0]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.22.0]
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.8]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88) [org.apache.sling.engine:2.7.8]

@bobi
Copy link

bobi commented Feb 21, 2023

You mentioned that it was fixed in 19.0.2, the first log was from 19.0.1

@royteeuwen
Copy link
Contributor

Hmm that's weird, worked on my machine 😅 let me retry

@royteeuwen
Copy link
Contributor

You mentioned that it was fixed in 19.0.2, the first log was from 19.0.1

Yes sorry, mislooked, it's indeed 19.0.2

@royteeuwen
Copy link
Contributor

@bobi could you please refresh the packages of the "groovy" bundle? or even more certain, restart AEM ;)? The meta classes are cached and I want to make sure that it isn't the cache that is still returning the 19.0.1 version

@royteeuwen
Copy link
Contributor

@bobi try again after 19.0.3 is released (might still need that restart)

@bobi
Copy link

bobi commented Feb 21, 2023

@royteeuwen thank you, 19.0.3 works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants