DSpace 7.x issues with classloader and customisations in additions-7.x.jar

75 views
Skip to first unread message

Agustina Martinez

unread,
Sep 12, 2022, 8:56:42 AM9/12/22
to DSpace Technical Support
Dear all,

I am consistently experiencing issues with the order of JARs by the classloader in all of the 7.x versions that we have tested: 7.2.1 and 7.3.

additions-7.x.jar no longer is loaded first, and this causing for any customised class that we have to not being used when running DSpace.

It was my understanding that this was fixed since DSpace 6.x and for DSpace 5.x there is the documentation for a workaround here: https://wiki.lyrasis.org/display/DSDOC5x/Advanced+Customisation (under the Additions module section)

Is anybody else experiencing the same issue? This is a bit of a blocker for anyone requiring to customise DSpace classes.

Best and many thanks,
Agustina

Tim Donohue

unread,
Sep 12, 2022, 11:29:27 AM9/12/22
to DSpace Technical Support
Hi Agustina,

Searching our bug reports, I did find a ticket related to this: https://github.com/DSpace/DSpace/issues/3248

So, it appears others have seen this as well.

However, I would like to also point out that *most custom code* could likely now just be added to [src]/dspace/modules/server/  instead of [src]/dspace/modules/additions/

In the past, the purposes of the "additions" folder was to allow it to be shared to all webapps.  Now, in DSpace 7 there is only one webapp ("server").  See the note here: https://github.com/DSpace/DSpace/issues/3248#issuecomment-825873474

That said, I'm not against trying to find a fix for this.  It's just lower priority as there are no longer many use cases left for keeping the "additions" module & it seems to not have impacted many people (yet).

Tim

Mark H. Wood

unread,
Sep 12, 2022, 12:05:39 PM9/12/22
to dspac...@googlegroups.com
On Mon, Sep 12, 2022 at 05:56:42AM -0700, Agustina Martinez wrote:
> I am consistently experiencing issues with the order of JARs by the
> classloader in all of the 7.x versions that we have tested: 7.2.1 and 7.3.
>
> additions-7.x.jar no longer is loaded first, and this causing for any
> customised class that we have to not being used when running DSpace.
>
> It was my understanding that this was fixed since DSpace 6.x and for DSpace
> 5.x there is the documentation for a workaround
> here: https://wiki.lyrasis.org/display/DSDOC5x/Advanced+Customisation
> (under the Additions module section)

I don't see why that wouldn't work for 7.x as well.

IIRC the fix in 6.x was to unpack the JAR into 'WEB-INF/classes'.
That should work too. This should be happening automatically, but if
not, you can just do it manually until the problem is understood and
fixed.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Agustina Martinez

unread,
Sep 14, 2022, 4:04:49 AM9/14/22
to DSpace Technical Support
Hi,

Thank you both Tim and Mark! Will give a go at your suggestions.

Best,
Agustina

Reply all
Reply to author
Forward
0 new messages