Excluding xerces from taverna
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
results in
java.lang.NoClassDefFoundError: org/apache/xerces/util/XMLChar
at org.apache.jena.rdf.model.impl.Util.notNameChar(Util.java:119)
at org.apache.jena.rdf.model.impl.Util.splitNamespaceXML(Util.java:77)
at org.apache.jena.graph.Node_URI.getLocalName(Node_URI.java:80)
at org.apache.jena.rdf.model.impl.ResourceImpl.getLocalName(ResourceImpl.java:152)
at org.apache.jena.rdf.model.impl.PropertyImpl.checkLocalName(PropertyImpl.java:64)
at org.apache.jena.rdf.model.impl.PropertyImpl.<init>(PropertyImpl.java:72)
at org.apache.jena.rdf.model.ResourceFactory$Impl.createProperty(ResourceFactory.java:335)
at org.apache.jena.rdf.model.ResourceFactory.createProperty(ResourceFactory.java:180)
at org.apache.jena.vocabulary.RDF.property(RDF.java:51)
at org.apache.jena.vocabulary.RDF.<clinit>(RDF.java:64)
at org.apache.jena.system.InitJenaCore.init(InitJenaCore.java:57)
at org.apache.jena.system.InitJenaCore.start(InitJenaCore.java:31)
at org.apache.jena.system.JenaSystem.lambda$init$1(JenaSystem.java:111)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:186)
Including xerces results in conflicting classes
java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
The endorsed and included xerces have conflicts.
Deleting the framework/lib/endorsed/xercesImpl-2.11.0.jar crashes the JDK with:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f8ada37fa34, pid=10745, tid=0x00007f8968bbd700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x6d9a34] get_method_id(JNIEnv_*, _jclass*, char const*, char const*, bool, Thread*)+0x84
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/mkoenig/hs_err_pid10745.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<version>3.1.0</version>
<exclusions>
<!-- from core we can exclude xerces -->
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- now xerces is back in, but maven knows it is provided by cytoscape -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
<scope>provided</scope>
</dependency>
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/569dbb0f-9d9e-417c-bce2-a9f39bba88f2%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cytoscape-app-dev@googlegroups.com.
Do you have a version of your apps (with source code) that exhibits the problem? I tried building WikiDataScape from the source on GitHub, but never saw the Xerces error.I did see it when installing SemScape, however. In that case, I was able to work around the problem in that case by editing framework/etc/config.properties (in the Cytoscape install directory) and removing xerces packages from org.osgi.framework.bootdelegation - once I did that, SemScape worked perfectly.However, that really doesn't help as far as currently-installed versions of Cytoscape - not everyone has the permissions to modify the Cytoscape install directory. We could make the change in 3.5, though there should be a way to work around this in the app itself (though I'll need source code demonstrating this problem to actually figure out how).TimP.S. There is an open issue on the Karaf bug tracker relating to xerces entries in bootDelegation that may be related to this issue:
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/CAPdvuaWi3%2B4cWhB-dLcdNkf3i6vgFgxt5%2Buzst51Uj0GBOW8hg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/569dbb0f-9d9e-417c-bce2-a9f39bba88f2%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-app-dev/QpjgPR62ZK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-app-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cytoscape-app-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/4c1766e3-5b3c-45db-aae5-a0a504c4178a%40googlegroups.com.
OK … thanks, for all of the good information, Matthias.
I think this pretty well frames the current situation and points to where you’re hoping to end up.
We’ll take a look at it soon … we need to focus on what’s on our plate before moving on.
--
To unsubscribe from this group and all its topics, send an email to cytoscape-app-...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/4c1766e3-5b3c-45db-aae5-a0a504c4178a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
To unsubscribe from this group and all its topics, send an email to cytoscape-app-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cytoscape-app-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/4c1766e3-5b3c-45db-aae5-a0a504c4178a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Matthias König
Junior Group Leader LiSym - Systems Medicine of the Liver
Humboldt-University Berlin, Institute for Theoretical Biologyhttps://www.livermetabolism.com
koni...@googlemail.com
Tel: +49 30 20938450
Tel: +49 176 81168480
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/CAEUx3ETfavHgPB0bfnO-jzvO2ir_T5oPXBUqacoTQiUbxDfnYA%40mail.gmail.com.
which is the source for the cytoscape app here: http://apps.cytoscape.org/apps/vitalaigraphvisualizationin particular check out: https://github.com/vital-ai/vital-cytoscape/blob/master/pom.xml#L96which is where xerces is relocated.
One question - to clarify, what happens if you try to just embed your own version of Jena and Xerces? From what I'm hearing on the Karaf discussion forum, that should be possible (without any changes to config files)...Tim
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/CAPdvuaVNMTkBF%3DS_UnAtSFZpwkXBsRBumiroN0x404FXWV6a8A%40mail.gmail.com.
That actually seems to work, at least to an extent. I was a bit thrown by the use of maven-shade-plugin - have never seen it used before in a context with maven-bundle-plugin.If I use it with Matthias's code, I no longer get the VerifyError exception, and the app seems to go farther in the startup process. It still seems to throw exceptions, though the one's I'm seeing refer to 404 Not Found/server problems and doesn't seem related to Xerces.To make it work in that case, I did have to remove the "provided" scope for xercesImpl, as it is necessary to embed your own version of Xerces to do this. It also seemed to work the same (with maven-shade-plugin) if I just used jena-osgi and removed all the exclusions+multiple Jena dependencies from that POM.Does this work for everyone? If so, I think this is probably the best solution as long as Karaf continues to export only part of Xerces. Alternatively, you may be able to use an extension bundle and export the missing Xerces packages from the system bundle that way (as I illustrated on the netscape.javascript thread), though that would be more convoluted.Tim
On Fri, Aug 26, 2016 at 8:49 AM, Marc Hadfield <ma...@hadfield.org> wrote:
That's what we do here: (include jena and xerces)which is the source for the cytoscape app here: http://apps.cytoscape.org/apps/vitalaigraphvisualizationin particular check out: https://github.com/vital-ai/vital-cytoscape/blob/master/pom.xml#L96which is where xerces is relocated.
On Fri, Aug 26, 2016 at 12:33 AM, Tim Hull <tmh...@eng.ucsd.edu> wrote:
One question - to clarify, what happens if you try to just embed your own version of Jena and Xerces? From what I'm hearing on the Karaf discussion forum, that should be possible (without any changes to config files)...Tim
--
To unsubscribe from this group and all its topics, send an email to cytoscape-app-...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/4c1766e3-5b3c-45db-aae5-a0a504c4178a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Matthias König
Junior Group Leader LiSym - Systems Medicine of the Liver
Humboldt-University Berlin, Institute for Theoretical Biologyhttps://www.livermetabolism.com
koni...@googlemail.com
Tel: +49 30 20938450
Tel: +49 176 81168480
--Matthias König
Junior Group Leader LiSym - Systems Medicine of the Liver
Humboldt-University Berlin, Institute for Theoretical Biologyhttps://www.livermetabolism.com
koni...@googlemail.com
Tel: +49 30 20938450
Tel: +49 176 81168480
--
You received this message because you are subscribed to the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/CAEUx3ETfavHgPB0bfnO-jzvO2ir_T5oPXBUqacoTQiUbxDfnYA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
Yes - maven-shade-plugin will extend the build process as it is going through all the code and changing all references from one class path (in this case, the default Xerces package name) to another.I'm not sure there's a good way around that - it seems we should be able to import the other internal Xerces packages (they are there, just not exported in boot delegation) and use those, but it isn't working for one reason. We could obviously change config.properties to export all Xerces or no Xerces in boot delegation, though I'm not sure what the impact on Karaf will be (and your app would only work on 3.5+ in that case).Karaf does have an open bug related to this - KARAF-3596:Tim
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cytoscape-app-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/9530b403-bced-4811-bbb4-fdb46080f6f0%40googlegroups.com.