No, I did not. Do I need to import javax.* packages? I use Eclipse PDE with Tycho and Maven and none of them complained about missing packages during build.

Raj

On Tuesday 17 June 2014 12:23 AM, Leschke, Scott wrote:
Simple question.  Did you import package javax.xml.parsers

-----Original Message-----
From: Rajbir Saini [mailto:rajbsa...@yahoo.com]
Sent: Monday, June 16, 2014 1:21 PM
To: user@karaf.apache.org
Subject: Error while deploying bundle using XML parser

Hi,

I am a bundle which uses XML DOM parsing. While installing this bundle in Karaf 
3.0.1, system throws java.lang.NoClassDefFoundError:
javax/xml/parsers/ParserConfigurationException. I am using Oracle JDK
1.7 and javax/xml/parsers is part of the JRE. I looked into the jre.properties 
and javax.xml.parsers is included in Java platform exports. I have looked into 
the endorsed folder and there is 
org.apache.servicemix.specs.jaxp-api-1.4-2.4.0.jar which also exports the 
javax.xml.parser package. I have tried removing this jar from endorsed folder 
as suggested elsewhere. This causes another error
java.lang.ClassNotFoundException: org.xml.sax.SAXException. Relevent part of 
the stack trace is given below. Does someone experienced similar issue with 
Karaf 3.0.1 and are their any work around?

=====================Exception with removing jaxp specs jar ================= 
Caused by: java.lang.NoClassDefFoundError:
javax/xml/parsers/ParserConfigurationException
      at com.viithiisys.web.extender.Activator.start(Activator.java:23)
      at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:2146)
      ... 39 more
Caused by: java.lang.ClassNotFoundException:
javax.xml.parsers.ParserConfigurationException not found by 
com.viithiisys.web.extender [78]
      at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
      at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
      at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_51]
      ... 42 more

=====================Exception after removing jaxp specs jar====================
java.lang.NoClassDefFoundError: org/xml/sax/SAXException
      at com.viithiisys.web.extender.Activator.start(Activator.java:23)
      at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:2146)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:2064)
      at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
      at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
      at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: org.xml.sax.SAXException not found 
by com.viithiisys.web.extender [78]
      at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
      at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
      at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 7 more

Regards,

Raj


Reply via email to