felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Spoonauer <mspoona...@tradecard.com>
Subject How can I use XPath in my OSGi bundle?
Date Fri, 02 Dec 2011 03:41:37 GMT
I am working on a bundle in which I want to use XPath.  I'm using Java 1.6, so I don't need
Xalan or Xerces or anything like that.  The JDK 1.6 comes with default implementations for
all of the major XML APIs.

When I attempt, though, to call XPathFactory.newInstance() within my OSGi bundle, it fails
with the following exception stack trace:

java.lang.ClassNotFoundException: com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl
[INFO] [talledLocalContainer]   at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
[INFO] [talledLocalContainer]   at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
[INFO] [talledLocalContainer]   at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
[INFO] [talledLocalContainer]   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[INFO] [talledLocalContainer]   at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:634)
[INFO] [talledLocalContainer]   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1594)
[INFO] [talledLocalContainer]   at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887)
[INFO] [talledLocalContainer]   at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)

What is the appropriate means by which to tell the BundleDelegatingClassloader to find com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl
in rt.jar?

Thanks,
Mike

Michael Spoonauer
Enterprise Systems Management Engineer
TradeCard, Inc.
M: (617) 233-7959 | E: mspoonauer@tradecard.com<mailto:mspoonauer@tradecard.com>

Connect. Transact. Profit.(r)
Find out more at www.tradecard.com<http://www.tradecard.com/>

[cid:image001.jpg@01CCB077.115917B0]<http://twitter.com/TradeCard>  [cid:image002.jpg@01CCB077.115917B0]
<http://www.linkedin.com/company/tradecard>   [cid:image003.jpg@01CCB077.115917B0] <https://www.facebook.com/TradeCard>

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message