15.08.2021 16:57:24.511 *ERROR* [[0:0:0:0:0:0:0:1] [1629071844241] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] com.adobe.cq.xf.impl.adobetarget.exporter.AbstractExperienceFragmentExporter Create offer request failed!
API request failed
com.day.cq.analytics.testandtarget.TestandtargetException: Create offer request failed!
at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.create(RestApiAdapter.java:115)
at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.createOffer(RestApiAdapter.java:98)
at com.day.cq.analytics.testandtarget.impl.TestandtargetServiceImpl.createHTMLOffer(TestandtargetServiceImpl.java:65)
at com.day.cq.analytics.testandtarget.impl.TestandtargetCampaignMediatorImpl.syncOffer(TestandtargetCampaignMediatorImpl.java:537)
at com.adobe.cq.xf.impl.adobetarget.exporter.AbstractExperienceFragmentExporter.exportVariation(AbstractExperienceFragmentExporter.java:115)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Adaptation of @stillalex's script from here https://gist.github.com/stillalex/06303f8cc1d3780d3eab4c72575883ae | |
//This version works with Oak 1.6 and later versions | |
import java.io.InputStream; | |
import java.util.concurrent.atomic.AtomicInteger | |
import org.apache.jackrabbit.oak.api.Type | |
import org.apache.jackrabbit.oak.spi.state.NodeState | |
import org.apache.jackrabbit.oak.spi.state.NodeStore | |
import org.apache.jackrabbit.oak.commons.PathUtils | |
import com.google.common.collect.Lists | |
import java.util.List |
The objective here is to find all SegmentNotFoundException type corruption and remove it (as we don't have a valid backup)
Before running any of the below steps we created an index.json file (see the file below) which contains only the index definitions of the corrupted indexes.
- This generates the file indexing-results\index-definities.json
java -Xmx8g -jar oak-run-1.8.12.jar index --fds-path=crx-quickstart\repository\datastore crx-quickstart\repository\segmentstore --index-definitions
- From that file we copied only the definitions we needed and created index.json (file attached here )
The latest version of this article now exists here instead: https://github.com/cqsupport/fix-instructions/blob/master/version-issues/
When deleting versions from Apache Jackrabbit Oak you observe errors in the logs similar to the one below:
java.lang.NullPointerException: null
- Find the location of the oak-lucene jar file:
Example output:find crx-quickstart/launchpad/felix -name "bundle.info" -exec grep oak-lucene {} \; -print
launchpad:resources/install.crx3/15/oak-lucene-1.2.2.jar crx-quickstart/launchpad/felix/bundle96/bundle.info
- Take the second line of the output and remove bundle.info from the path, following the example above, we have:
NOTE: Steps moved here instead https://github.com/cqsupport/fix-instructions/tree/master/count-nodes
- Go to http://host:port/system/console/bundles and install these two bundles
- Go to http://host/system/console/configMgr/org.apache.sling.jcr.base.internal.LoginAdminWhitelist
- Add org.apache.felix.webconsole.plugins.scriptconsole to "Whitelist regexp" and save
- After the two bundles fully install then go to http://host:port/system/console/slinglog
- Click "Add New Logger" and set log level to "Info", "Log File" to "logs/countnodes.log", and "Logger" to "countNodes.groovy"
- Install the Felix script console and groovy bundle - http://felix.apache.org/documentation/subprojects/apache-felix-script-console-plugin.html
- Go to http://host:port/system/console/sc
- Select Groovy as the language
- Paste the contents of setRepExternalId.groovy to the script field
- Click Execute
To run this script:
- Download the oak-run version matching the version of Oak installed in AEM: http://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run
- Download the attached adminUtils.groovy script
- Upload the adminUtils.groovy script and the oak-run jar to your AEM server
- Run the command to start the oak-run console. For example:
java -Xmx2048m -jar /tmp/oak-run-1.6.1.jar console /app/aem/aem63/crx-quickstart/repository/segmentstore --read-write
- Once the oak-run console is open then load the groovy script using this command:
- Migrate users and groups (If users were not imported automatically via LDAP)
Package users and groups (2 separate packages) on the old system (excluding admin and anonymous OOTB users)
- Go to CRXDE lite app /crx/de/index.jsp and log in as admin user (on the old system)
- Go to "Tools" => "Query"
- In the bottom "Query" box enter this query to find the admin user: /jcr:root/home/users//element(*,rep:User)[@rep:principalName="admin"]
- Click "Execute" and copy the path of the admin user node in the results to a text file
- Repeat step 3 with a query for anonymous user: /jcr:root/home/users//element(*,rep:User)[@rep:principalName="anonymous"]
- Click "Execute" and copy the path of the anonymous user node in the results to a text file (so now you should have two paths, one for "admin" and one for "anonymous")
- Arrows -
=>
defines function sharing lexical this as function body (unlike subfunctions). - Classes -
class
,extends
,constructor
,get
,set
,static
are syntactic sugar over prototypes patterns (i.e. proper-interoperable class definitions).class SkinnedMesh extends THREE.Mesh { constructor(geometry, materials) { super(geometry, materials); this.idMatrix = SkinnedMesh.defaultMatrix(); this.bones = [];
this.boneMatrices = [];
NewerOlder