Java 11 Modules and Dependency conflicts (e.g. java.xml)

5,119 views
Skip to first unread message

Stephen Brush

unread,
Jan 10, 2022, 10:18:34 PM1/10/22
to DSpace Community
Similar to previous question, was surprised to see conflicts related to Java modules and dependencies when building (in Eclipse). Error is -- "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml"
 
The underlying issue is most easily described here

e.g. import javax.xml.transform.Transformer;  (in OpenSearchController)

Is there a solution or known workaround to this?

Thanks,

Steve

Tim Donohue

unread,
Jan 11, 2022, 9:59:57 AM1/11/22
to DSpace Community
Hi Steve,

I'm wondering if this is something specific to Eclipse?  Or maybe your installation of Eclipse is trying to use an older version of Java?  I also noticed that one person in that StackOverflow question you linked to mentioned an Eclipse specific setting change: https://stackoverflow.com/a/70150897

I admit, I don't use Eclipse myself, so I'm not sure what to recommend here.  But, I can verify that this error doesn't occur when building DSpace 7 via Maven on commandline, and it also doesn't occur in other IDEs. I'm using IntelliJ IDEA Community Edition (which is free) and I'm not seeing those errors.  So, this implies to me that it might not be an issue in our codebase (though I could be wrong, if someone else manages to find some way to fix this, I'm open to it). 

Or, maybe there are some other folks on this list who've tried using DSpace 7 + Eclipse and can provide some hints/tips on doing so.

Tim

Stephen Brush

unread,
Jan 11, 2022, 10:09:41 AM1/11/22
to DSpace Community
You are likely right -- Eclipse is probably just enforcing a stricter version of the newer compilation rules than is really needed. I had the compiler version set to 1.8 already with no luck. I'm not married to Eclipse so will give the IntelliJ CE a try.

Thanks
Reply all
Reply to author
Forward
0 new messages