Skip to content

Instantly share code, notes, and snippets.

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.

  1. 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
  1. From that file we copied only the definitions we needed and created index.json (file attached here )
@andrewmkhoury
andrewmkhoury / findLargeBinaries.groovy
Created May 5, 2020 21:18
Apache Oak Groovy Script to find large binary properties in Oak JCR
//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
@andrewmkhoury
andrewmkhoury / README.md
Created August 16, 2021 00:10
Adobe Target + IMS integration "Create offer request failed!"

Issue

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)