Getting error java.lang.ClassNotFoundException: com.drew.lang.RandomAccessReader not found by com.adobe.granite.poi [74]

Avatar

Avatar
Level 1
lokeshsikharam
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
lokeshsikharam
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
lokeshsikharam
Level 1

15-06-2021

Hello Team,

 

We are using AEM 6.4. We have custom code implemented to listen to Publish event when dam asset is published. Handler parses the contents of the asset

and indexes to apache solr outside AEM. We are using tika parser (AutoDetectParser) which parses the document based on Asset's MIME Type.

 

I am seeing below error when parsing a word document. Does anyone has solution to this problem?

 

14.06.2021 22:35:47.179 *ERROR* [NoRequestId] [sling-threadpool-f9839b70-bb24-4592-8cc2-43df74b20245-(apache-sling-job-thread-pool)-29-<main queue>(solr/indexing/handler)] org.apache.sling.event.impl.jobs.queues.JobQueueImpl.<main queue> Unhandled error occured in job processor com/drew/lang/RandomAccessReader while processing job Sling Job [topic=solr/indexing/handler, id=2021/6/14/22/35/da06c7b7-41b6-4f2d-bdd5-5085e9322fb2_170, properties=slingevent:application=da06c7b7-41b6-4f2d-bdd5-5085e9322fb2,jcr:created=java.util.GregorianCalendar(Mon Jun 14 22:35:46 PDT 2021),slingevent:created=java.util.GregorianCalendar(Mon Jun 14 22:35:46 PDT 2021),event.job.queuename=<main queue>,event.job.queued.time=java.util.GregorianCalendar(Mon Jun 14 22:35:46 PDT 2021),jcr:createdBy=sling-event,sling:resourceType=slingevent:Job,type=ACTIVATE,event.job.application=da06c7b7-41b6-4f2d-bdd5-5085e9322fb2,event.job.retries=10,event.job.started.time=java.util.GregorianCalendar(Mon Jun 14 22:35:47 PDT 2021),paths=[Ljava.lang.String;@6a9361c3,jcr:primaryType=slingevent:Job,event.job.retrycount=0] java.lang.NoClassDefFoundError: com/drew/lang/RandomAccessReader
at org.apache.tika.parser.jpeg.JpegParser.parse(JpegParser.java:58)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
at org.apache.tika.parser.DelegatingParser.parse(DelegatingParser.java:72)
at org.apache.tika.extractor.ParsingEmbeddedDocumentExtractor.parseEmbedded(ParsingEmbeddedDocumentExtractor.java:102)
at org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedFile(AbstractOOXMLExtractor.java:380)
at org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedPart(AbstractOOXMLExtractor.java:263)
at org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedParts(AbstractOOXMLExtractor.java:205)
at org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.getXHTML(AbstractOOXMLExtractor.java:138)
at org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:143)
at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:106)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
at org.demo.cl.solr.search.core.document.builder.AbstractDocumentBuilder.parseStringValue(AbstractDocumentBuilder.java:105)
at org.demo.cl.solr.search.core.document.builder.DamAssetDocumentBuilder.buildInternal(DamAssetDocumentBuilder.java:47)
at org.demo.cl.solr.search.core.document.builder.AbstractDocumentBuilder.build(AbstractDocumentBuilder.java:76)
at org.demo.cl.solr.search.core.document.osgi.SolrDocumentIndexingServiceImpl.addIfIndexable(SolrDocumentIndexingServiceImpl.java:65)
at org.demo.cl.solr.search.core.document.osgi.SolrDocumentIndexingServiceImpl.addUpdateDocument(SolrDocumentIndexingServiceImpl.java:52)
at org.demo.cl.solr.search.core.handler.SolrIndexingJobExecutor.activateDocument(SolrIndexingJobExecutor.java:126)
at org.demo.cl.solr.search.core.handler.SolrIndexingJobExecutor.processDocument(SolrIndexingJobExecutor.java:80)
at org.demo.cl.solr.search.core.handler.SolrIndexingJobExecutor.process(SolrIndexingJobExecutor.java:66)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.drew.lang.RandomAccessReader not found by com.adobe.granite.poi [74]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1414)
at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660)
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590)
at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 31 common frames omitted

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 250
MVP
shelly-goel
MVP

Likes

250 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
Ignite 3
Give Back 10
View profile

Avatar
Boost 250
MVP
shelly-goel
MVP

Likes

250 likes

Total Posts

410 posts

Correct reply

107 solutions
Top badges earned
Boost 250
Affirm 100
Give Back 25
Ignite 3
Give Back 10
View profile
shelly-goel
MVP

15-06-2021

It looks like the dependency for RandomAccessReader is resolved compile time but its not available at the runtime. You might have to make necessary changes in pom.xml to export it to felix console. Check /system/console/depfinder

Answers (1)

Answers (1)

Avatar

Avatar
Boost 100
Level 6
Dipti_Chauhan
Level 6

Likes

126 likes

Total Posts

144 posts

Correct reply

41 solutions
Top badges earned
Boost 100
Give Back 10
Affirm 25
Boost 50
Boost 25
View profile

Avatar
Boost 100
Level 6
Dipti_Chauhan
Level 6

Likes

126 likes

Total Posts

144 posts

Correct reply

41 solutions
Top badges earned
Boost 100
Give Back 10
Affirm 25
Boost 50
Boost 25
View profile
Dipti_Chauhan
Level 6

16-06-2021