Code Monkey home page Code Monkey logo

aem-groovy-console's Introduction

AEM Groovy Console

This project has moved to https://github.com/CID15/aem-groovy-console and will no longer be maintained in this repository.

Overview

The AEM Groovy Console provides an interface for running Groovy scripts in Adobe Experience Manager. Scripts can be created to manipulate content in the JCR, call OSGi services, or execute arbitrary code using the AEM, Sling, or JCR APIs. After ainstalling the package in AEM (instructions below), see the console page for documentation on the available bindings and methods. Sample scripts are included in the package for reference.

Screenshot

Requirements

Compatibility

Groovy Console Version(s) AEM Version(s)
15.x.x, 14.x.x, 13.x.x 6.3, 6.4, 6.5
12.x.x 6.4
11.x.x 6.3
10.x.x, 9.x.x 6.2
8.x.x 6.1
7.x.x 6.0
6.x.x, 5.x.x 5.6 (CQ)
3.x.x 5.5, 5.4 (CQ)

Installation

  1. Download the console package. For previous versions, tags can be checked out from GitHub and built directly from the source (e.g. mvn install).

  2. Verify the installation.

Additional build profiles may be added in the project's pom.xml to support deployment to non-localhost AEM servers.

To enable access to the Groovy Console from /groovyconsole, update the Groovy Console Configuration Service via the OSGi console configuration page to enable the vanity path.

Building From Source

To build and install the latest development version of the Groovy Console (or if you've made source modifications), run the following Maven command.

mvn install -P local

Excluding the Groovy OSGi Bundle

If your AEM instance has multiple applications using Groovy and the groovy-all bundle is already deployed, you can exclude this bundle from the Groovy Console package build with the exclude-groovy-bundle Maven profile. This should prevent issues with conflicting Groovy versions at runtime.

mvn install -P local,exclude-groovy-bundle

Context Path Support

If you are running AEM with a context path, set the Maven property aem.context.path during installation.

mvn install -P local -Daem.context.path=/context

OSGi Configuration

Navigate to the OSGi console configuration page and select the Groovy Console Configuration Service.

Property Description Default Value
Email Enabled? Check to enable email notification on completion of script execution. false
Email Recipients Email addresses to receive notification. []
Script Execution Allowed Groups List of group names that are authorized to use the console. By default, only the 'admin' user has permission to execute scripts. []
Scheduled Jobs Allowed Groups List of group names that are authorized to schedule jobs. By default, only the 'admin' user has permission to schedule jobs. []
Vanity Path Enabled? Enables /groovyconsole vanity path. false
Audit Disabled? Disables auditing of script execution history. false
Display All Audit Records? If enabled, all audit records (including records for other users) will be displayed in the console history. false
Thread Timeout Time in seconds that scripts are allowed to execute before being interrupted. If 0, no timeout is enforced. 0

Batch Script Execution

Saved scripts can be remotely executed by sending a POST request to the console servlet with either the scriptPath or scriptPaths query parameter.

Single Script

curl -d "scriptPath=/var/groovyconsole/scripts/samples/JcrSearch.groovy" -X POST -u admin:admin http://localhost:4502/bin/groovyconsole/post.json

Multiple Scripts

curl -d "scriptPaths=/var/groovyconsole/scripts/samples/JcrSearch.groovy&scriptPaths=/var/groovyconsole/scripts/samples/FulltextQuery.groovy" -X POST -u admin:admin http://localhost:4502/bin/groovyconsole/post.json

Extensions

The Groovy Console provides extension hooks to further customize script execution. The console provides an API containing extension provider interfaces that can be implemented as OSGi services in any bundle deployed to an AEM instance. See the default extension providers in the com.icfolson.aem.groovy.console.extension.impl package for examples of how a bundle can implement these services to supply additional script bindings, compilation customizers, metaclasses, and star imports.

Service Interface Description
com.icfolson.aem.groovy.console.api.BindingExtensionProvider Customize the bindings that are provided for each script execution.
com.icfolson.aem.groovy.console.api.CompilationCustomizerExtensionProvider Restrict language features (via blacklist or whitelist) or provide AST transformations within the Groovy script compilation.
com.icfolson.aem.groovy.console.api.ScriptMetaClassExtensionProvider Add runtime metaclasses (i.e. new methods) to the underlying script class.
com.icfolson.aem.groovy.console.api.StarImportExtensionProvider Supply additional star imports that are added to the compiler configuration for each script execution.

Notifications

To provide custom notifications for script executions, bundles may implement the com.icfolson.aem.groovy.console.notification.NotificationService interface (see the com.icfolson.aem.groovy.console.notification.impl.EmailNotificationService class for an example). These services will be dynamically bound by the Groovy Console service and all registered notification services will be called for each script execution.

Scheduler

The Scheduler allows for immediate (asynchronous) or Cron-based script execution. Scripts are executed as Sling Jobs and are audited in the same manner as scripts executed in the console.

Scheduled Job Event Handling

Bundles may implement services extending com.icfolson.aem.groovy.console.job.event.AbstractGroovyConsoleScheduledJobEventHandler to provide additional post-processing or notifications for completed Groovy Console jobs. See com.icfolson.aem.groovy.console.job.event.DefaultGroovyConsoleEmailNotificationEventHandler for an example of the required annotations to register a custom event handler.

Sample Scripts

Sample scripts can be found in the src/main/scripts directory.

Versioning

Follows Semantic Versioning guidelines.

aem-groovy-console's People

Contributors

bryanw avatar christianvozar avatar easingthemes avatar ericvangeem avatar gruberrolandvaltech avatar kairas avatar kitarek avatar markdaugherty avatar mbenesz avatar mszu avatar paul-bjorkstrand avatar royteeuwen avatar steeleforge avatar stefanseifert avatar toniedzwiedz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aem-groovy-console's Issues

Extract Groovy logic from servlet

Is it possible to separate logic responsible for running groovy script and servlet logic. Now to run groovy script we have to call servlet with post method (or run groovy console). If the logic was separated (in new service) it would be possible to inject this service and run groovy script from other class.

Detailed Installation Process

Sorry to be the one to ask for this but I would like some detailed installation instructions.

Once downloaded where do I put the Zip file in relation to the root of my local AEM server?

Do I need to unzip it?

I'm assuming the command: "mvn install -P local,replicate" will be entered in a command terminal. What directory should I run this from? Should it be from within the \cq-groovy-console-develop\ directory?

I've tried several locations but nothing has been successful. Thanks!

Audit records now saved on user but not shown in groovyconsole.html

Dear,

Upgrading to version 11.0.0 we noticed the audit nodes are now saved in a tree structure that begins with the user id from the session.

We perform our patches with a custom system user, so the audit logs are not stored in audit/admin but in audit/ourCustomUser. But these audit records are not being displayed in the History panel of /etc/groovyconsole.html.

As this is a system user, we cannot login with this user.

Groovy Console 8.0.0 Stopped Working on AEM 6.1

I had installed the console in my local AEM 6.1 setup as one of the first things I did when moving to AEM 6.1. It was working initially and has since stopped working. I uninstalled the package in the package manager and manually deleted the stuff under /apps/groovyconsole and /etc/groovyconsole. Then I restarted my server and attempted package installation from scratch. When I try to install, I get the messages below in the server log. I'm not sure what's happening here or why it once worked and no longer does. I'm wondering if there is something about my application's packages that is causing an issue, but I've never seen an error like this, so I'm just not sure.

05.11.2015 22:52:30.266 *INFO* [qtp1897326799-57] org.apache.jackrabbit.vault.packaging.impl.JcrPackageDefinitionImpl unwrapping package :aem-groovy-console:8.0.0
05.11.2015 22:52:30.582 *INFO* [qtp1897326799-56] org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl Creating snapshot for .snapshot:aem-groovy-console:8.0.0.
05.11.2015 22:52:30.695 *WARN* [qtp1897326799-56] org.apache.jackrabbit.oak.jcr.session.ItemImpl Item#refresh invokes Session#refresh!
05.11.2015 22:52:30.699 *INFO* [qtp1897326799-56] org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl Creating snapshot for .snapshot:aem-groovy-console:8.0.0 completed.
05.11.2015 22:52:30.700 *INFO* [qtp1897326799-56] org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage Extracting :aem-groovy-console:8.0.0
05.11.2015 22:52:30.935 *INFO* [qtp1897326799-56] org.apache.jackrabbit.vault.fs.io.AutoSave Threshold of 1024 reached. saving approx 301 transient changes. 0 unresolved
05.11.2015 22:52:31.751 *INFO* [qtp1897326799-56] org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage Extracting :aem-groovy-console:8.0.0 completed.
05.11.2015 22:52:31.777 *INFO* [pool-6-thread-10] com.day.cq.wcm.core.impl.components.ComponentCacheImpl Detecting component change. invalidating cache.
05.11.2015 22:52:31.796 *INFO* [pool-6-thread-15] com.adobe.granite.ui.clientlibs.impl.CompilerProviderImpl no compiler found for txt
05.11.2015 22:52:31.797 *WARN* [pool-6-thread-15] com.adobe.granite.ui.clientlibs.impl.FileBundle Referenced path in /etc/groovyconsole/clientlibs/js.txt does not exist: /etc/groovyconsole/clientlibs/js/theme-kr_theme.js
05.11.2015 22:52:31.797 *INFO* [pool-6-thread-15] com.adobe.granite.ui.clientlibs.impl.CompilerProviderImpl no compiler found for txt
05.11.2015 22:52:31.798 *INFO* [pool-6-thread-15] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl detected [JS, CSS] library: /etc/groovyconsole/clientlibs, sourced from 55 files.
05.11.2015 22:52:31.806 *INFO* [pool-6-thread-15] com.adobe.granite.ui.clientlibs.impl.LibraryCacheImpl Rebuilt 1455 ancestor paths
05.11.2015 22:52:32.368 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.WatchedFolder Watching folder /apps/groovyconsole/install (priority 200)
05.11.2015 22:52:32.887 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Registering resource with OSGi installer: [InstallableResource, priority=200, id=/apps/groovyconsole/install/aem-groovy-extension-bundle-1.0.1.jar, InstallableResource, priority=200, id=/apps/groovyconsole/install/aem-groovy-console-8.0.0.jar, InstallableResource, priority=200, id=/apps/groovyconsole/install/groovy-all-2.4.3.jar]
05.11.2015 22:52:33.092 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.tasks.BundleInstallTask Exception during install of bundle TaskResource(url=jcrinstall:/apps/groovyconsole/install/aem-groovy-console-8.0.0.jar, entity=bundle:aem-groovy-console, state=INSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:24:43:21:, Bundle-SymbolicName=aem-groovy-console, Bundle-Version=8.0.0], digest=1446792750855) : Bundle installation rejected by hook.. Retrying later.
org.osgi.framework.BundleException: Bundle installation rejected by hook.
    at org.apache.felix.framework.Felix.installBundle(Felix.java:3123)
    at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
    at org.apache.sling.installer.core.impl.tasks.BundleInstallTask.execute(BundleInstallTask.java:47)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:847)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:689)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:265)
    at java.lang.Thread.run(Thread.java:722)
05.11.2015 22:52:33.092 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.tasks.BundleInstallTask Exception during install of bundle TaskResource(url=jcrinstall:/apps/groovyconsole/install/aem-groovy-extension-bundle-1.0.1.jar, entity=bundle:aem-groovy-extension-bundle, state=INSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:24:43:21:, Bundle-SymbolicName=aem-groovy-extension-bundle, Bundle-Version=1.0.1], digest=1446792750853) : Bundle installation rejected by hook.. Retrying later.
org.osgi.framework.BundleException: Bundle installation rejected by hook.
    at org.apache.felix.framework.Felix.installBundle(Felix.java:3123)
    at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
    at org.apache.sling.installer.core.impl.tasks.BundleInstallTask.execute(BundleInstallTask.java:47)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:847)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:689)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:265)
    at java.lang.Thread.run(Thread.java:722)
05.11.2015 22:52:33.092 *INFO* [OsgiInstallerImpl] org.apache.sling.installer.core.impl.tasks.BundleInstallTask Exception during install of bundle TaskResource(url=jcrinstall:/apps/groovyconsole/install/groovy-all-2.4.3.jar, entity=bundle:groovy-all, state=INSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:24:43:21:, Bundle-SymbolicName=groovy-all, Bundle-Version=2.4.3], digest=1446792750852) : Bundle installation rejected by hook.. Retrying later.
org.osgi.framework.BundleException: Bundle installation rejected by hook.
    at org.apache.felix.framework.Felix.installBundle(Felix.java:3123)
    at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
    at org.apache.sling.installer.core.impl.tasks.BundleInstallTask.execute(BundleInstallTask.java:47)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:847)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:689)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:265)
    at java.lang.Thread.run(Thread.java:722)

AEM 6.1.0 not worked with groovy console - 8.1.0

I got the same issues as

#45
and
#47

the com.day.cq.wcm.tags version in my AEM installation was 5.7.4 -

com.day.cq.wcm cq-wcm-taglib 5.7.4 provided

and the error after deploying 8.1.0 was com.day.cq.wcm.tags,version=[6.1,7) -- Cannot be resolved

So I had to go back and download version 8.0.0 to make it work on AEM 6.1.0.20150507 .

But why keep strict version range; why not keep it flexible so that the versions are backward compatible?

Show other bindings

It would be great if bindings that are added via API would be shown. Currently, the list is static: /apps/groovyconsole/components/console/bindings

Groovy Console 10.1.1 and AEM6.2: Required script resource could not be located: head.js

If I install aem-groovy-console 10.1.1 in plain AEM6.2 and open aferward the page /etc/groovyconsole.html it throws following exception:

..SightlyUseException: Required script resource could not be located: head.js...

After some research I've found this forum post:
https://forums.adobe.com/thread/2333338

which seems to be related to this issue.

As a workaround I have patched the head.html and the headlibs.html files, see here my branch with the fix: https://github.com/OlsonDigital/aem-groovy-console/compare/master...olimination:aem62-headjs-script-not-found?expand=1

Should I create a Pull Request for it or do you have any other fix for this?

Groovy console is installed before the primary types are available

Hey,

I have the following setup:

The AEM jars gets extracted with java -jar aem.jar -unpack
The install folder is made in crx-quickstart
All my dependencies are put in the install folder so that they get installed on startup

The problem that groovy console is having is that no dependency is set on AEM itself, so the content gets installed before even de cq-content is available, producing following errors:

13.09.2017 12:06:59.763 ERROR [OsgiInstallerImpl] org.apache.jackrabbit.vault.fs.io.Importer E (javax.jcr.nodetype.NoSuchNodeTypeException: Node type cq:Page does not exist)

A dependency should be set on cq-content to make sure that the bundle is installed in the right order

Unresolved compilation problem

After installing the aem groovy console 8.0.2 on an AEM 6.1-SP2, I get the following exception:

Unresolved compilation problem: The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files

Exception:

java.lang.Error: Unresolved compilation problem: 
	The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files
at org.apache.jsp.apps.groovyconsole.components.console.head_jsp.<init>(head_jsp.java:1)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)

This is on author, on publish it works. Any clue on how to fix this? Can I clear some cache files somwehere?

Greets
Roy

Error while processing /bin/groovyconsole/post.json

AEM 6.3 - installed https://github.com/OlsonDigital/aem-groovy-console/releases/tag/11.0.0
Browser Network Tab

Error while processing /bin/groovyconsole/post.json
Status | 500
Message | org.apache.sling.api.SlingException: Exception during response processing.
Location | /bin/groovyconsole/post.json
Parent Location | /bin/groovyconsole
Path | /bin/groovyconsole/post.json
Referer | http://192.168.2.250:4502/etc/groovyconsole.html
ChangeLog |  

error.log

10.11.2017 06:37:25.118 ERROR [192.168.2.60 [1510313845114] POST /bin/groovyconsole/post.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Unable to create resource named groovyconsole in /bin
10.11.2017 06:37:25.118 ERROR [192.168.2.60 [1510313845114] POST /bin/groovyconsole/post.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.
javax.jcr.nodetype.ConstraintViolationException: No default node type available for /bin/groovyconsole
at org.apache.jackrabbit.oak.util.TreeUtil.addChild(TreeUtil.java:186)
at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.addChild(NodeDelegate.java:693)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl$5.perform(NodeImpl.java:298)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl$5.perform(NodeImpl.java:264)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:208)
at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.addNode(NodeImpl.java:264)
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.addNode(NodeImpl.java:249)
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.create(JcrResourceProvider.java:431)
at org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.create(AuthenticatedResourceProvider.java:182)
at org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl.create(ResourceResolverControl.java:378)
at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1159)
at org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.deepGetOrCreateNode(AbstractCreateOperation.java:584)
at org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.processCreate(AbstractCreateOperation.java:107)
at org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:91)
at org.apache.sling.servlets.post.AbstractPostOperation.run(AbstractPostOperation.java:97)
at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:205)
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:156)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)
at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
at com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler.doFilter(AdhocAssetShareAuthHandler.java:436)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:126)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:70)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)
at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)
at com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:154)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:113)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter.doFilter(AssetContentDispositionFilter.java:96)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:180)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:367)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.cognifide.slice.core.internal.filter.ContextRequstFilter.doFilter(ContextRequstFilter.java:84)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:221)
at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:138)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:76)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:221)
at com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet.doFilter(CoreFormHandlingServlet.java:131)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:122)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker.doFilter(CampaignCopyTracker.java:100)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:81)
at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:60)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)
at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:83)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)
at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:219)
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:295)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:72)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)
at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)
10.11.2017 06:37:25.149 INFO [192.168.2.60 [1510313845147] GET /bin/groovyconsole/audit.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /bin/groovyconsole/audit.json not found

Failure if script does not return value

The following script gives me a failure

println "Hello, world!"

Unless the script returns a value it is not executed.

println "Hello, world!"
return 0

Shouldn't this at least be documented?

"Download the console package" link broken in README

I think the title describes the problem well enough. I would've done a PR to fix, but the releases section confuses me.

While I have your attention, what is the difference between the standard aem groovy console and the aem groovy console "exclude groovy bundle"?

Global methods not generally available

I'm trying to build a generic set of helper classes, but I have trouble accessing the "global" methods from withing a class, here's an example for println:

class MyClass {
    def sayHello() {
        println "Hello world"
    }
}

inst = new MyClass()
inst.sayHello()
return 0`

Same thing with getNode()

class Helper{
    def findNode(String path) {
        return getPath(path)
    }
}

inst = new Helper()
println inst.findNode("/content/dam")
return 0

Load/save groovy console scripts from location under the current user

Since the groovy console's power is somewhat limited by the user's privileges, I think it would make sense to have users store their saved scripts into their own location. This location would show up on the "Open" dialog, in addition to the common/provided scripts & samples inside /etc/groovyconsole/scripts. Some benefit include

  • All users can save scripts, without the possibility to overwrite someone else's scripts
  • Custom scripts can be protected within the normal ACL process (by default, users have full access to their own user location under /home/users)
  • Users can modify sample scripts and save them within the tool, while they may only have read-access to the /etc/groovyconsole path

Possible difficulties:

  • browsedialog widget supports one tree root, but a custom tree loader may overcome this difficulty
  • browsedialog may not support having a dynamic path, but again, it may be overcome by a custom tree loader

Detect a "dirty" code buffer and prompt to save any unsaved changes.

I spent some time writing a script in the Groovy console but was encountering a little trouble. While looking through the Help documentation a little further down the console's page, I clicked on a link that took me over to the Javadocs on another site. The console's tab went there directly and when I returned via the Back button, my console's buffer was empty.

Perhaps, each Help link can target a new tab or the more correct thing to do is to wire up the window.onBeforeUnload event to catch any unsaved changes.

Clicking "Cancel" on Save dialog will not reenable the toolbar

Clicking on "Save" in the toolbar and then on "Cancel" in the ExtJS dialog will not reenable the main toolbar of the groovy console. Therefore I have to reload the full page before being able to click on "Save" again.
This happens with version 7.0.0.

Issues with groovy console 3.0.1

Hi Mark,

I am using groovy console 3.0.1 on cq 5.5 instance:

https://github.com/Citytechinc/cq-groovy-console

I am getting the following issues after install with components not registering.

I am using CURL to deploy the packages.

Any additional instructions to do after during the normal install.

Below are the issues:

/system/console/components

com.citytechinc.cqlibrary.groovyconsole.servlets.ScriptSavingServlet registered

The above component is in "registered" state than "active".

Failed creating the component instance; see log for reason
08.08.2014 00:55:05.950 ERROR [OsgiInstallerImpl] org.apache.sling.servlets.resolver.internal.SlingServletResolver bindServlet: Servlet service not available from reference [javax.servlet.Servlet]

The activate method has thrown an exception (java.lang.VerifyError: (class: org/codehaus/groovy/runtime/ArrayUtil, method: createArray signature: ()[Ljava/lang/Object;) Illegal type in constant pool) java.lang.VerifyError: (class: org/codehaus/groovy/runtime/ArrayUtil, method: createArray signature: ()[Ljava/lang/Object;) Illegal type in constant pool

Please let me know if you have seen these issues before and anyways of resolving it.

Thanks,

Mark

Groovy console error onloading the page

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

AEM 6.4 Compatibility?

Hello,

I'm working on an AEM 6.4 project. Do you happen to have a release date set for a production-ready release of version 12.0.0?

How stable is the Snapshot?

Cannot load/execute scripts on 6.1.2 with dispatcher configured

When a CQ instance is behind dispatcher, it is quite often configured to restrict some dangerous paths like package manager (/crx), crxde (/crxde), OSGi console (/system/console). This is also encouraged by Adobe (http://docs.adobe.com/docs/en/dispatcher.html, http://docs.adobe.com/content/docs/en/dispatcher/_jcr_content/par/download/file.res/author_dispatcher_new.any).

Groovy console in order to load the script stored in repository fetches resources through a CRX browser e..g http://integration.groovytest.com/crx/server/crx.default/jcr%3aroot/etc/groovyconsole/scripts/samples/CreatePackage.groovy/jcr%3Acontent/jcr:data. As the crx prefix is usually forbidden, it fails to load the data.

Please change the way the scripts are loaded to get the content directly e.g. http://integration.groovytest.com/etc/groovyconsole/scripts/samples/CreatePackage.groovy/jcr%3Acontent/jcr:data

Content structure reorganisation prior to AEM 6.5

Starting from AEM 6.4 (see https://helpx.adobe.com/experience-manager/6-4/sites/deploying/using/repository-restructuring.html) content repository is to be reorganised prior to 6.5, and finally in 6.5 most probably will follow the rule as below:

  • /etc should not be used (probably to be removed)
  • any application code, clientlibs should be located under /apps
  • any runtime data to be under /var or /content folder, while the configurations should be rather under /conf
    The groovy console should have its own content structure to be reorganised as follows:
  • /etc/clientlibs/groovyconsole should rather go to /apps/groovyconsole/clientlibs
  • /etc/groovyconsole to /apps/groovyconsole
  • /etc/groovyconsole/scripts should go to /conf/groovyconsole/scripts or /var/groovyconsole/scripts
  • /etc/groovyconsole/jcr:content/audit should to to /var/groovyconsole/audit

script fail on post request

While trying to execute a script via post request I receive a following error.
AEM version 6.3
Groovy console v 11.0.0

curl -d "script=print 'test'" -X POST -u admin:admin http://localhost:4502/bin/groovyconsole/post.json 
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method org.apache.jackrabbit.oak.jcr.session.NodeImpl#setProperty.
Cannot resolve which method to invoke for [class java.lang.String, null] due to overlapping prototypes between:
	[class java.lang.String, interface javax.jcr.Binary]
	[class java.lang.String, interface javax.jcr.Node]
	[class java.lang.String, interface javax.jcr.Value]
	at groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.java:3263)
	at groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:3216)
	at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:3159)
	at groovy.lang.MetaClassImpl.getMethodWithCachingInternal(MetaClassImpl.java:1331)
	at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3391)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:132)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:166)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at javax.jcr.Node$setProperty$1.call(Unknown Source)
	at com.icfolson.aem.groovy.console.audit.impl.DefaultAuditService.createAuditRecord(DefaultAuditService.groovy:56)
	at com.icfolson.aem.groovy.console.audit.AuditService$createAuditRecord$0.call(Unknown Source)
	at com.icfolson.aem.groovy.console.impl.DefaultGroovyConsoleService.auditAndNotify(DefaultGroovyConsoleService.groovy:163)
	at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
	at com.icfolson.aem.groovy.console.impl.DefaultGroovyConsoleService.runScript(DefaultGroovyConsoleService.groovy:106)
	at com.icfolson.aem.groovy.console.GroovyConsoleService$runScript.call(Unknown Source)
	at com.icfolson.aem.groovy.console.servlets.ScriptPostServlet.doPost(ScriptPostServlet.groovy:29)
	at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
	at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
	at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:71)
	at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:126)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler.doFilter(AdhocAssetShareAuthHandler.java:436)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)
	at com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:154)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:70)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:113)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter.doFilter(AssetContentDispositionFilter.java:96)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:180)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:367)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:221)
	at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:138)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:76)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:221)
	at com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet.doFilter(CoreFormHandlingServlet.java:125)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:122)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker.doFilter(CampaignCopyTracker.java:100)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.acs.commons.httpcache.filter.impl.AbstractHttpCacheFilter.doFilter(AbstractHttpCacheFilter.java:87)
	at com.adobe.acs.commons.httpcache.filter.impl.HttpCacheRequestFilter.doFilter(HttpCacheRequestFilter.java:67)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:81)
	at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:60)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)
	at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:83)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)
	at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:219)
	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
	at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
	at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
	at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:295)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
	at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
	at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:72)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)
	at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:748)```

Discussion: How to protect against malicious users' scripts (or, how to get Groovy Console approved for use in production)

In Groovy, it is possible to blacklist certain coding patterns from being compiled using SecureASTCustomizer. Initially, protecting against basic harmful code (e.g. System.exit(), using ResourceResolverFactory.getAdministrativeResourceResolver(..) to get a generic administrative resource resolver, etc).

It would be nice to have a way to plug this in, to be more secure. On some projects, due to security concerns, they do not allow the Groovy Console to be used in certain environments (some going as far as not allowing it in any integrated environment). This would be a step along the way to make this tool secure enough to be used in production, everywhere.

If SecureASTCustomizer isn't enough, then a possible alternative could be http://groovy-sandbox.kohsuke.org/

Provide a dry run

It would be great if Groovy Console could provide a dry-run method. So some second button to run the script without saving any changes.

This could be done by using a wrapper around the used ResourceResolver and its session object. This could then ignore calls to resolver.commit() and session.save().

On the other hand, for non-dry-runs the session.save() could be called directly by Groovy Console. This way there is no more need for session.save() at the end of all scripts.

Bindings also need to know about the dry-run. So the information needs to be provided to them, too.

7.0.1 Fails to resolve after installing Hotfix 6167 on AEM 6.0

We've encountered an issue where groovy console 7.0.1 fails to resolve after the installation of Hotfix 6167 on AEM 6.0

The reason we found for the failure is that that there is an update to the cq-wcm-taglib package (to version 5.7.10) that bumps the "com.day.cq.wcm.tags" package from "5.7.0" to "6.0.0". this causes the version range that is generated by bnd on the build of "[5.7,6.0)" to fail.

There are other Adobe bundles that refer to this package without an associated version range, so this is inclining that groovy console should likely not also be restricted to the version.
We've locally made a change to the maven-bundle-plugin section to support this:
<Import-Package>com.day.cq.wcm.tags;version=!,*</Import-Package>

We're not sure completely sure how to proceed further on providing this alteration for 6.0, since master and develop have both updated to AEM 6.1

Dead documentation link in Groovy Console 7

dead link

There's a useful link in version 7 (and possibly others) of the Groovy Console that has gone dead.

http://code.citytechinc.com/aem-groovy-extension/groovydocs/com/citytechinc/aem/groovy/extension/services/impl/DefaultMetaClassExtensionProvider.html

When clicked, it takes me to http://www.digitalatolson.com/open-source

Can you do a release of a version compatible with AEM 6.0 that links to the current docs (or simply inlines them as it once used to)? Or maybe set up redirects taking one to an equivalent page on your new website?

Executing scripts via POST not working in AEM 6.1 with version 8.0.5

Hi,

/etc/groovyconsole.html is working great, but I am unable to run a script via POST servlet.

curl -d "scriptPath=/etc/groovyconsole/scripts/samples/JcrSearch.groovy" -X POST -u admin:admin http://dev-author.hm.com/bin/groovyconsole/post.json

Getting the following response:

{
    "output": "",
    "script": null,
    "runningTime": "",
    "result": "",
    "exceptionStackTrace": "groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method groovy.lang.GroovyShell#parse.\nCannot resolve which method to invoke for [null] due to overlapping prototypes between:\n\t[class groovy.lang.GroovyCodeSource]\n\t[class java.io.File]\n\t[class java.io.Reader]\n\t[class java.lang.String]\n\t[class java.net.URI]\r\n\tat groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.java:3238)\r\n\tat groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:3191)\r\n\tat groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:3134)\r\n\tat groovy.lang.MetaClassImpl.getMethodWithCachingInternal(MetaClassImpl.java:1325)\r\n\tat groovy.lang.MetaClassImpl.createPogoCallSite(MetaClassImpl.java:3402)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.createPogoSite(CallSiteArray.java:147)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)\r\n\tat com.citytechinc.aem.groovy.console.impl.DefaultGroovyConsoleService.runScript(DefaultGroovyConsoleService.groovy:88)\r\n\tat com.citytechinc.aem.groovy.console.GroovyConsoleService$runScript.call(Unknown Source)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)\r\n\tat com.citytechinc.aem.groovy.console.servlets.ScriptPostServlet.doPost(ScriptPostServlet.groovy:39)\r\n\tat org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)\r\n\tat org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:345)\r\n\tat org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:376)\r\n\tat org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:547)\r\n\tat org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)\r\n\tat com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:133)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:371)\r\n\tat com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:171)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat io.wcm.sling.commons.request.impl.RequestContextFilterImpl.doFilter(RequestContextFilterImpl.java:63)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)\r\n\tat org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:71)\r\n\tat com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:81)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:155)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)\r\n\tat com.adobe.cq.dam.s7imaging.impl.auth.MemoryTokenAuthHandler.doFilter(MemoryTokenAuthHandler.java:156)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:201)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:181)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:364)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:106)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:240)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.analytics.provisioning.impl.UserAuthenticationRequestFilter.doFilter(UserAuthenticationRequestFilter.java:119)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:95)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:269)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:76)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:74)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:107)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.day.cq.wcm.designimporter.CanvasPageDeleteRequestFilter.doFilter(CanvasPageDeleteRequestFilter.java:88)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:77)\r\n\tat com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:56)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.hm.cms.common.filters.OnlineStatusFilter.doFilter(OnlineStatusFilter.java:93)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.startupfilter.impl.StartupFilterImpl.doFilter(StartupFilterImpl.java:95)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.hm.cms.common.filters.HeaderFilter.doFilter(HeaderFilter.java:34)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.hm.cms.common.filters.ClientLibraryFilter.doFilter(ClientLibraryFilter.java:60)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServletStarterFilter.java:135)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:132)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:124)\r\n\tat org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)\r\n\tat org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)\r\n\tat org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:217)\r\n\tat org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:336)\r\n\tat org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:297)\r\n\tat org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat com.adobe.acs.commons.wcm.impl.AemEnvironmentIndicatorFilter.doFilter(AemEnvironmentIndicatorFilter.java:133)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:115)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:84)\r\n\tat org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)\r\n\tat org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)\r\n\tat org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76)\r\n\tat org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49)\r\n\tat org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:725)\r\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:497)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\r\n\tat org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n"
}

Thanks!

java.lang.NullPointerException: Cannot invoke method recurse() on null object

I just installed the Groovy 11.0 package to my local instance of AEM 6.3. Most of the sample scripts don't work. Scripts that worked on my existing CQ 5.5 / Groovy 3 instances don't work in AEM6.3/Groovy11.0.

getPage should work but does not.

Any suggestions?

getPage("/content").recurse { page ->
}

java.lang.NullPointerException: Cannot invoke method recurse() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)

2017-12-17_14-12-17

6.1.2 : build failure during tests

Hi,
I have checkout the 6.1.2 tag locally and i got an issue during at the end of the build.
Tests are actually failing:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.citytechinc.cq.groovyconsole.services.impl.DefaultGroovyConsoleServiceSpec
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 9.813 sec <<< FAILURE! - in com.citytechinc.cq.groovyconsole.services.impl.DefaultGroovyConsoleServiceSpec
run script(com.citytechinc.cq.groovyconsole.services.impl.DefaultGroovyConsoleServiceSpec)  Time elapsed: 0.554 sec  <<< FAILURE!
org.spockframework.runtime.SpockComparisonFailure: Condition not satisfied:

map.outputText == "BEER\n"
|   |          |
|   BEER
     false
|              1 difference (83% similarity)
|              BEER(\r)\n
|              BEER(-~)\n
[executionResult:null, outputText:BEER
, stacktraceText:, runningTime:00:00:00.006]

        at com.citytechinc.cq.groovyconsole.services.impl.DefaultGroovyConsoleServiceSpec.assertScriptResult(DefaultGroovyConsoleServiceSpec.groovy:107)
        at com.citytechinc.cq.groovyconsole.services.impl.DefaultGroovyConsoleServiceSpec.run script(DefaultGroovyConsoleServiceSpec.groovy:61)


Results :

Failed tests:
  DefaultGroovyConsoleServiceSpec.run script:61->assertScriptResult:107 Condition not satisfied:

map.outputText == "BEER\n"
|   |          |
|   BEER
     false
|              1 difference (83% similarity)
|              BEER(\r)\n
|              BEER(-~)\n
[executionResult:null, outputText:BEER
, stacktraceText:, runningTime:00:00:00.006]


Tests run: 3, Failures: 1, Errors: 0, Skipped: 0

Any hints about this one ?

Script name badge not always accurate

If working with multiple console instances in different browser tabs/windows, the script name can get out of sync with the script contents. Consider removing script name from localStorage for consistency.

build failure

This looks super useful, but I can't get it installed. I've cloned the project, and am attempting to install cq-groove-console using maven 3.1.1 and java 7.0_51. I'm running AEM6 SP2 locally on port 4502. I've tried mvn install -Plocal from develop and master branches. Any suggestions would be muy apreciado

Tests in error:
DefaultAuditServiceSpec>ProsperSpec.setupSpec:79->ProsperSpec.getRepository:380 » NoClassDefFound
DefaultAuditServiceSpec>ProsperSpec.cleanupSpec:94->ProsperSpec.removeAllNodes:111 » NullPointer
DefaultExtensionServiceSpec>ProsperSpec.setupSpec:79->ProsperSpec.getRepository:380 » NoClassDefFound
DefaultExtensionServiceSpec>ProsperSpec.cleanupSpec:94->ProsperSpec.removeAllNodes:111 » NullPointer
DefaultGroovyConsoleServiceSpec>ProsperSpec.setupSpec:79->ProsperSpec.getRepository:380 » NoClassDefFound
DefaultGroovyConsoleServiceSpec>ProsperSpec.cleanupSpec:94->ProsperSpec.removeAllNodes:111 » NullPointer

console 10.1.1 not working on 6.3 beta

the groovy console bundle wont start in AEM version 6.3 beta.
the bundle imports: com.day.cq.mailer,version=[5.9,6) -- Cannot be resolved.
Current beta exports the package in version 6.0.0.
Would be nice if this can be updated before official release to ensure smooth upgrades.

Null pointer exception with 3.0.1 in author environment

We have your tool setup successfully in all of our environments, except for our production author. When attempting to run a script, we get the following

java.lang.NullPointerException: Cannot invoke method recurse() on null object
    at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
    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.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at Script1.run(Script1.groovy:3)
    at Script1$run.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    at Script2.run(Script2.groovy:65)
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346)
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146)
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:123)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463)
    at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:500)

any help would be appreciated.

Broken link in console's "Enhancements" collapsible

<p>See the AEM Groovy Extension documentation <a href="http://code.digitalatolson.com/aem-groovy-extension/groovydocs/com/citytechinc/aem/groovy/extension/services/impl/DefaultMetaClassExtensionProvider.html" target="_blank">here</a> for details on registered metaclasses.</p>

Should be
http://code.digitalatolson.com/aem-groovy-extension/groovydocs/com/icfolson/aem/groovy/extension/services/impl/DefaultMetaClassExtensionProvider.html

I'll try to get a PR out there sometime next week if someone has not fixed it by then.

RE: Build requires cq5 libraries

I tried just cloning and building the source but it seems to fail as it the pom files do not include the adobe cq5 dependencies. This is the error I got.

[ERROR] Failed to execute goal on project groovyconsole: Could not resolve dependencies for project com.citytechinc.cqlibrary:groovyconsole:jar:2.1.0-SNAPSHOT: The following artifacts could not be resolved: com.day.cq:cq-commons:jar:5.5.0, com.day.cq.wcm:cq-wcm-api:jar:5.5.0: Could not find artifact com.day.cq:cq-commons:jar:5.5.0 in central (http://repo1.maven.org/maven2) -> [Help 1]
[ERROR]

Groovy Console does not install under AEM 6.1 SP2

The latest service pack for AEM 6.1 introduces an new version of the tag api and hence the installation fails.

com.day.cq.wcm.tags,version=[5.7,6) -- Cannot be resolved

The version exported by the /system/console has been increased.

com.day.cq.wcm.tags,version=6.0.0

After installing package the included clientlib is not loaded

After following the installation instructions I the console is not fully visible. This seems to be because the clientlib at /etc/groovyconsole/clientlibs is not found/loaded. If I copy the node /etc/groovyconsole/clientlibs to /etc/clientlibs/groovyconsole the console shows up in all it's glory again.

screen shot 2017-02-07 at 4 44 11 pm

Environment:
AEM 6.2
Chrome
macOS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.