AEM 61 - This And That



AEM_61_RECOMPILE_JSPS

1)  In AEM <= 6.0 the compiled classes are placed in CRX /var/classes - http://localhost:4502/crx/de/index.jsp#/var/classes. To force recompile any jsp files, deleting the node in /var/classes helped; with AEM 61, the compiled class files are NOT placed in /var/classes any more, so to recompile jsps, use Felix Console - http://localhost:4502/system/console/slingjsp or to be 100% sure to the naked eye, follow these steps

             a. Stop bundle org.apache.sling.commons.fsclassloader
             b. Search with keyword classes in CQ install folder <author>\crx-quickstart\launchpad\felix
             c. Delete generated java/class files from <author>\crx-quickstart\launchpad\felix\<bundleXYZ>\data\classes
             d. Delete generated java files from /var/classes in CRX (sightly generated java files are placed here)
             e. Restart bundle org.apache.sling.commons.fsclassloader




AEM_61_OSGI_INSTALL_ACTION

2)  OSGI action when updating packages in AEM. Packages with SNAPSHOT in name have special meaning; SNAPSHOT packages are only for Dev environment. Thanks to Ian Boston for the tip

Current VersionNew VersionAction
1.0.221.0.23Install
1.0.221.0.23-SNAPSHOTInstall
1.0.231.0.23-SNAPSHOTIgnore
1.0.23-SNAPSHOT1.0.23-SNAPSHOTInstall
1.0.23-SNAPSHOT1.0.23-r231423423Install
1.0.23-r2314234231.0.23-r231423423Ignore
1.0.23-r2314234231.0.23-r231423424Install (last digit 4 > 3)
1.0.23-SNAPSHOT1.0.23-T1r231423423Install
1.0.23-T1r2314234231.0.23-T2r231423423Install (Patch revision number - T2r > T1r)




AEM_61_ADD_WORKFLOW_ADMINISTRATORS

3)  By default, only administrators can view all workflow instancesto add users/groups for administering workflows (view, terminate, monitor workflows created by other users), give necessary read/write permissions on /etc/workflow/instances and add user/group to Superuser of Adobe Granite Workflow Service - http://localhost:4502/system/console/configMgr/com.adobe.granite.workflow.core.WorkflowSessionFactory







4)  By default, when html tags like hyperlink from an external website are copied into Rich Text Editor (not source edit mode) all attributes are NOT copied (so you may only see href copied and not others ). To copy other attributes like say class, role etc. htmlPasteRules have to be defined in the edit plugin of RTE. For more options check the documentation



To copy css classes, make sure cssMode is defined






5)  To know the hotfixes and feature packs installed on AEM 

curl -u admin -s http://localhost:4502/crx/packmgr/list.jsp | jshon -e results -a -e downloadName -u | grep -E "hotfix|feature"

Sample output:
                     cq-6.1.0-apps-featurepack-1.0.10.zip
                     cq-6.1.0-apps-featurepack-2.0.4.zip
                     cq-6.1.0-featurepack-6563-1.0.0.zip
                     cq-6.1.0-hotfix-6445-1.0.zip
                     cq-6.1.0-hotfix-6449-1.2.zip
                     cq-6.1.0-hotfix-6500-1.0.zip
                     cq-6.1.0-hotfix-6500-1.5.zip
                     cq-6.1.0-hotfix-6570-1.2.zip
                     cq-6.1.0-hotfix-6680-1.0.zip
                     cq-6.1.0-hotfix-6680-1.2.zip
                     cq-6.1.0-hotfix-7285-1.0.zip
                     cq-6.1.0-hotfix-7432-1.0.2.zip
                     cq-6.1.0-hotfix-6446-1.0.zip





6)  In order to reduce time spent on offline compaction, make sure the customer has latest Oak version and also they use memory mapped file access option with compaction command.  Since memory mapped file access would use off-heap memory, it would benefit to have high memory on the server - thanks Can Altuner for the tip

java -Dtar.memoryMapped=true -Dupdate.limit=5000000 -Dcompaction-progress-log=1500000 
     -Dcompress-interval=10000000 -Doffline-compaction=true -Xmx8G -jar oak-run-1.2.7.jar 
     compact /crx-quickstart/repository/segmentstore





7)  To validate user's password during reset or while creation, use password validation action of Authorizable Action Provider - http://localhost:4502/system/console/configMgr/org.apache.jackrabbit.oak.spi.security.user.action.DefaultAuthorizableActionProvider

For detailed error description on Touch UI - check this post, Classic UI - check this post

Configure



TouchUI Error



ClassicUI Error








8)  When a 300 Multiple choices status code is returned by json renderer of GET servlet, try changing your application logic or increase the JSON Max Results of Apache Sling GET Servlet - http://localhost:4502/system/console/configMgr/org.apache.sling.servlets.get.DefaultGetServlet

Demo






9)  CRXDE Lite Tools -> Query provides interface for running search queries; if a query is running for long time (could be because of missing index) and consuming system resources, the following Traversing Cursor warnings are logged in error.log

29.02.2016 11:48:22.174 *WARN* [0:0:0:0:0:0:0:1 [1456768102069] GET /bin/querybuilder.json HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 12000 nodes with filter Filter(query=select [jcr:path], [jcr:score], * from [nt:base] as a where [modelId] = '/etc/workflow/models/request_for_activation/jcr:content/model' and [data/payload/path] = '/content/dam/geometrixx/portraits/alison_parker.jpg' and isdescendantnode(a, '/etc/workflow/instances') order by [endTime] desc /* xpath: /jcr:root/etc/workflow/instances//*[@modelId = '/etc/workflow/models/request_for_activation/jcr:content/model' and data/payload/@path = '/content/dam/geometrixx/portraits/alison_parker.jpg'] order by @endTime descending */, path=/etc/workflow/instances//*, property=[modelId=[/etc/workflow/models/request_for_activation/jcr:content/model], data/payload/path=[/content/dam/geometrixx/portraits/alison_parker.jpg]]); consider creating an index or changing the query

To kill such queries without restarting CQ

       a. Access QueryEngineSettings MBean - http://localhost:4502/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3Dsettings%2Ctype%3DQueryEngineSettings
       b. Set the values LimitInMemory and LimitReads to some lower number like 10000
       c. Queries that exceed one of the limits are cancelled with an UnsupportedOperationException



To automatically kill long running queries - set the startup system properties -Doak.queryLimitInMemory and -Doak.queryLimitReads to some lower number like 10000 (requires restart)

For more information check helpx.adobe.com and jackrabbit.apache.org




10) To workaround org.apache.sling.api.request.TooManyCallsException, increase the Number of Calls per request - sling.max.calls, setting of Apache Sling Main Servlet http://localhost:4502/system/console/configMgr/org.apache.sling.engine.impl.SlingMainServlet

`27.01.2016 15:29:50.021 *ERROR* [0:0:0:0:0:0:0:1 [1453930186556] GET /apps/geometrixx/components/testComponent/_cq_dialog.html/content/geometrixx/en/jcr:content/par/testComponent HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
org.apache.sling.api.request.TooManyCallsException: /libs/granite/ui/components/foundation/form/fieldset/fieldset.jsp
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:517)
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.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:146)








11)  To find the jar file in cq install folder, containing a specific class - look for the bundle id folder


 

No comments:

Post a Comment