fcrepo-exts / fcrepo-camel-toolbox

A collection of ready-to-use messaging applications with fcrepo-camel
Apache License 2.0
13 stars 26 forks source link

java.lang.NoClassDefFoundError: org/apache/commons/codec/digest/MurmurHash3 in Indexing Triplestore #192

Closed davidemerlitti closed 2 months ago

davidemerlitti commented 1 year ago

I get this error (MurmurHash3 class not found) while performing triplestore indexing by invoking the command:

curl -XPOST localhost:9080/reindexing -H"Content-Type: application/json" -d '["broker:queue:triplestore.reindex"]'

Is the dependency on the org.apache.commons.codec.digest package missing?

The error only comes up for the following resource which contains blank nodes:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<http://localhost:8080/fcrepo/rest/itinerari-digitali/annotations/2916a139-7e1d-4413-8d65-9178611371aa>
        <http://www.w3.org/ns/oa#motivatedBy>  <http://www.w3.org/ns/oa#describing> ;
        <http://www.w3.org/ns/oa#hasBody>  _:b0 ;
        <http://www.w3.org/ns/oa#hasTarget>  _:b1 ;
        rdf:type  <http://www.w3.org/ns/oa#Annotation> .

_:b1    <http://www.w3.org/ns/oa#hasSource>  <http://localhost:8080/fcrepo/rest/itinerari-digitali/video/video1> ;
        <http://www.w3.org/ns/oa#hasSelector>  _:b2 .

_:b2    rdf:type            <http://www.w3.org/ns/oa#FragmentSelector> ;
        dcterms:conformsTo  <http://www.w3.org/TR/media-frags/> ;
        rdf:value           "t=0,6" .

_:b0    rdf:type   <http://www.w3.org/ns/oa#TextualBody> ;
        rdf:value  "Annotazione di prova." .

<http://localhost:8080/fcrepo/rest/itinerari-digitali/annotations/2916a139-7e1d-4413-8d65-9178611371aa>
        fedora:created       "2023-05-17T15:25:49.924575Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        fedora:lastModified  "2023-05-17T15:25:49.924575Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        rdf:type             ldp:BasicContainer ;
        rdf:type             ldp:Resource ;
        rdf:type             fedora:Resource ;
        rdf:type             ldp:RDFSource ;
        rdf:type             ldp:Container ;
        rdf:type             fedora:Container .

Is there any way to fix this?

Attached the fcrepo-camel-toolbox out.log file.

out.log

davidemerlitti commented 1 year ago

Inside the jar I'm using to execute fcrepo-camel-toolbox (fcrepo-camel-toolbox-app-6.1.0-SNAPSHOT-driver.jar) there is 'org/infinispan/commons/hash/MurmurHash3.class' and not 'org/apache/commons/codec/digest/MurmurHash3'.

whikloj commented 1 year ago

Good question, I'll try to replicate the issue and see if we can resolve it for you.

davidemerlitti commented 1 year ago

Good question, I'll try to replicate the issue and see if we can resolve it for you.

@whikloj Thank you. My quick and dirty fix was to manually add the missing class into the jar. That was enough to make it work.

whikloj commented 2 months ago

This was resolved in https://github.com/fcrepo-exts/fcrepo-camel-toolbox/commit/c959e0b66ff5f32ad9e69d5dad1a6aa491a8544b, so I'm closing this ticket. If there is a problem please open a new ticket.