Hi all,
I wanted to give an update on my progress. I finally have things
working, but there were a couple of steps:
1) I had to add a "BundleSource" to jnati to support the loading from
OSGi bundles. This solved the "Unknown URL protocol: bundle" error.
2) In my pom file, I had to specifically exclude xerces, xalan, and
xml-apis. Really old versions of these were getting pulled in by xom,
which seem to be a requirement in a couple of cdk modules (for cml?).
Once I did that, the cast failures went away.
-- scooter
On 11/25/2014 12:07 AM, Egon Willighagen wrote:
> (Arvid: can you have a glance at this email too, please?)
>
> Scooter,
>
> On Tue, Nov 25, 2014 at 3:15 AM, Scooter Morris <[email protected]> wrote:
>> I'm really struggling with jni-inchi and OSGi. There are two
>> problems I keep running into. First, I keep getting a warning:
> Yeah, it's an annoying combination... it would be so good for the
> InChI if there was a native Java library...
>
>> WARN net.sf.jnati.deploy.repository.ClasspathRepository - Unknown URL
>> protocol: bundle
>>
>> a little debugging and I can see that it's coming from:
>>
>> TRACE net.sf.jnati.deploy.repository.ClasspathRepository - Manifest
>> location:
>> bundle://108.1:46/META-INF/jniinchi/1.03_1/LINUX-AMD64/MANIFEST.xml
> I have seen this before, but don't remember what came out of that...
>
>> So, jnati can't figure out what to do with the bundle URL. I know that
>> some work went into making p2 bundles of jni-inchi, but since I'm
>> working in Cytoscape, that doesn't help me much. Are the sources
>> available for those?
> OSGi bundles have been prepared by Arvid, see [0], and available from:
>
> https://github.com/bioclipse/bioclipse.core/tree/master/net.bioclipse.target.platform/libs
>
> I think you need the three jnati jars, the jni-inchi, and
> net.bioclipse.sea36.util.config.jar ...
>
>> The second problem is probably not really jni-inchi related, but any
>> suggestions would be appreciated. Once things fail over to my local
>> cache, I get a class cast exception:
>>
>> DEBUG net.sf.jnati.deploy.repository.LocalRepository - Artefact path:
>> /home/scooter/.jnati/repo/jniinchi/1.03_1/LINUX-AMD64
>> INFO net.sf.jnati.deploy.artefact.ManifestReader - Reading manifest
>> pool-19-thread-1 WARN [edu.ucsf.rbvi.chemViz2.internal.model.Compound] -
>> Structure generation failed:
>> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to
>> javax.xml.parsers.DocumentBuilderFactory
> Ah, there is Xerces again... it seems to me you have more than one
> Xerces on your classpath... does your plugin pull in a second copy of
> this library?
>
>> I've tried several workarounds, but nothing has really fixed things
>> yet. Looking at the manifest file for my app, xalan gets pulled in from
>> somewhere, but I can't figure out who's pulling it in. As near as I can
>> tell, nothing in cdk or jni-inchi, or my app uses it.
> These Xerces issues have been annoying me for some 15 years now, and
> they are hard to fix...
>
> JNI-InChI should indeed not depend on Xerces...
>
> I think I remember someone using Maven to show a full dependency tree,
> but no idea if a similar thing exists for Eclipse...
>
> Egon
>
> 0.http://www.jcheminf.com/content/5/1/14
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user