New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not include xml-apis JAR #3444

Closed
ebruchez opened this Issue Jan 11, 2018 · 7 comments

Comments

Projects
1 participant
@ebruchez
Collaborator

ebruchez commented Jan 11, 2018

Following #3365.

+1 from user

It is unclear to me why Xerces is referring to ElementTraversal at all. In fact, I don't find that reference in the source code, so something must be amiss somewhere.

Also, curiously, ElementTraversal is present in the JDK starting with the upcoming version 9.

Maybe check again Xerces source and rebuild + reroot to see if the problem persists. We should have otherwise a pristine Xerces.

@ebruchez ebruchez self-assigned this Jan 11, 2018

@ebruchez ebruchez added this to To do in Orbeon Forms 2017.2.1 via automation Jan 11, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Jan 11, 2018

Next step: download latest stable Xerces 2.11 JARs, run jarjar task, and see if, without bundling xml-apis, the issue persists.

@ebruchez ebruchez added this to In Progress in Orbeon Forms 2018.1 Jan 31, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Feb 6, 2018

Curious: the sources of xml-apis-1.4.01 do not contain ElementTraversal.java.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Feb 6, 2018

org.apache.xerces.dom.ElementImpl implements ElementTraversal, and that is its only use in Xerces proper. We could compile our Xerces by patching ElementImpl to remove that interface.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Feb 6, 2018

And this would work since we jarjar org.apache to orbeon.apache.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Feb 7, 2018

It seems that the jarjar task no longer works. I upgraded to jarjar-1.4.jar and same result. However, running it from the command-line works. So I:

Build script:

cd ~/Orbeon/apache-xerces2-j
ant -Djavac.source=1.6 -Djavac.target=1.6 jar
cp  build/xercesImpl.jar ~/Orbeon/OF/lib/src/xerces-xercesImpl-2.11.jar
cd ~/Orbeon/OF/lib/src
unzip xerces-xercesImpl-2.11.jar -d xerces
unzip xerces-serializer-2.11.jar -d xerces
zip -r ../xerces_tmp.jar *
cd ../../..
java -jar lib_ant/jarjar-1.4.jar process rules.txt lib/src/xerces_tmp.jar lib/runtime/xerces-2.11-orbeon.jar

with rules.txt:

rule org.apache.** orbeon.apache.@1
@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Feb 7, 2018

+1 from customer for a likely related issue

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Feb 7, 2018

When building Xerces with ant jar, the xercesImpl.jar created includes also the contents of xerces-resolver. So removing xerces-resolver-2.11.jar.

@ebruchez ebruchez closed this in 05d3024 Feb 8, 2018

Orbeon Forms 2018.1 automation moved this from In Progress to Done Feb 8, 2018

Orbeon Forms 2017.2.1 automation moved this from To do to Done Feb 8, 2018

ebruchez added a commit that referenced this issue Feb 8, 2018

ebruchez added a commit that referenced this issue Feb 9, 2018

ebruchez added a commit that referenced this issue Feb 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment