You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by J- MAN <jm...@hotmail.com> on 2011/08/05 19:56:29 UTC

Cannot find class org.xml.sax.helpers.DefaultHandler

Hi all,

I've created an OSGI project that uses UIMA-core.jar.  UIMA makes use of Class.forName("some.class") to dynamically create classes so i have to put the uima-core.jar inside the OSGI bundle so it can resolve the classname without getting into an import/export loop.  I also modify the bundle-classpath to point to the uima-jar inside the bundle.  If i manually add the import for org.xml.sax.helpers.DefaultHandler into the manifest, it will work until it gets to the next JRE class that it fails to resolve.

The issue is classes that UIMA-core.jar references such as org.xml.sax.helpers.DefaultHandler are not being resolved.  These classes come with the JRE and i assumed they would already be on the classpath.

This used to work with Servicemix 4.3   but it does not work on 4.4.

Any ideas?  Can we no longer embed jars inside an OSGI bundle?

Thanks.
 		 	   		  

RE: Cannot find class org.xml.sax.helpers.DefaultHandler

Posted by J- MAN <jm...@hotmail.com>.
Thanks for the reply.  So has this changed from 4.3 to 4.4?  My bundle works fine in 4.3.  This also make using an embedded jar very difficult.

> From: freeman.fang@gmail.com
> To: users@servicemix.apache.org
> Subject: Re: Cannot find class org.xml.sax.helpers.DefaultHandler
> Date: Mon, 8 Aug 2011 12:38:01 +0800
> 
> Hi,
> 
> You need explicitly import org.xml.sax.helpers package anyway even  
> though it from the jdk, you need import any package unless it's start  
> with "java." per OSGi spec.
> 
> Freeman
> On 2011-8-7, at 上午4:22, jmandawg wrote:
> 
> > I just checked the jre.properties file, and that line "  
> > org.xml.sax.helpers.DefaultHandler" exists in both the jre-1.5 and  
> > the jre-1.6 section.  I am using the fuse version of servicemix if  
> > that matters.  It seems as though it's not available unless I  
> > explicitly import it.  Any other ideas?
> >
> >> -----Original Message-----
> >> From: Willem Jiang [mailto:willem.jiang@gmail.com]
> >> Sent: Saturday, August 06, 2011 3:17 AM
> >> To: users@servicemix.apache.org
> >> Subject: Re: Cannot find class org.xml.sax.helpers.DefaultHandler
> >>
> >> Hi
> >> ServiceMix doesn't use JAXP as osgi bundle since Servicemix 4.4.
> >> You may need to update the jre.properties file in the etc to export  
> >> the
> >> "org.xml.sax.helpers" package.
> >>
> >> On Sat Aug  6 01:56:29 2011, J- MAN wrote:
> >>> Hi all,
> >>>
> >>> I've created an OSGI project that uses UIMA-core.jar.  UIMA makes  
> >>> use of
> >> Class.forName("some.class") to dynamically create classes so i have  
> >> to put the
> >> uima-core.jar inside the OSGI bundle so it can resolve the  
> >> classname without
> >> getting into an import/export loop.  I also modify the bundle- 
> >> classpath to
> >> point to the uima-jar inside the bundle.  If i manually add the  
> >> import for
> >> org.xml.sax.helpers.DefaultHandler into the manifest, it will work  
> >> until it
> >> gets to the next JRE class that it fails to resolve.
> >>>
> >>> The issue is classes that UIMA-core.jar references such as
> >> org.xml.sax.helpers.DefaultHandler are not being resolved.  These  
> >> classes come
> >> with the JRE and i assumed they would already be on the classpath.
> >>>
> >>> This used to work with Servicemix 4.3   but it does not work on 4.4.
> >>>
> >>> Any ideas?  Can we no longer embed jars inside an OSGI bundle?
> >>>
> >>> Thanks.
> >>
> >>
> >>
> >> --
> >> Willem
> >> ----------------------------------
> >> FuseSource
> >> Web: http://www.fusesource.com
> >> Blog:    http://willemjiang.blogspot.com (English)
> >>         http://jnn.javaeye.com (Chinese)
> >> Twitter: willemjiang
> >> Weibo: willemjiang
> >
> >
> 
> ---------------------------------------------
> Freeman Fang
> 
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
 		 	   		  

Re: Cannot find class org.xml.sax.helpers.DefaultHandler

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

You need explicitly import org.xml.sax.helpers package anyway even  
though it from the jdk, you need import any package unless it's start  
with "java." per OSGi spec.

Freeman
On 2011-8-7, at 上午4:22, jmandawg wrote:

> I just checked the jre.properties file, and that line "  
> org.xml.sax.helpers.DefaultHandler" exists in both the jre-1.5 and  
> the jre-1.6 section.  I am using the fuse version of servicemix if  
> that matters.  It seems as though it's not available unless I  
> explicitly import it.  Any other ideas?
>
>> -----Original Message-----
>> From: Willem Jiang [mailto:willem.jiang@gmail.com]
>> Sent: Saturday, August 06, 2011 3:17 AM
>> To: users@servicemix.apache.org
>> Subject: Re: Cannot find class org.xml.sax.helpers.DefaultHandler
>>
>> Hi
>> ServiceMix doesn't use JAXP as osgi bundle since Servicemix 4.4.
>> You may need to update the jre.properties file in the etc to export  
>> the
>> "org.xml.sax.helpers" package.
>>
>> On Sat Aug  6 01:56:29 2011, J- MAN wrote:
>>> Hi all,
>>>
>>> I've created an OSGI project that uses UIMA-core.jar.  UIMA makes  
>>> use of
>> Class.forName("some.class") to dynamically create classes so i have  
>> to put the
>> uima-core.jar inside the OSGI bundle so it can resolve the  
>> classname without
>> getting into an import/export loop.  I also modify the bundle- 
>> classpath to
>> point to the uima-jar inside the bundle.  If i manually add the  
>> import for
>> org.xml.sax.helpers.DefaultHandler into the manifest, it will work  
>> until it
>> gets to the next JRE class that it fails to resolve.
>>>
>>> The issue is classes that UIMA-core.jar references such as
>> org.xml.sax.helpers.DefaultHandler are not being resolved.  These  
>> classes come
>> with the JRE and i assumed they would already be on the classpath.
>>>
>>> This used to work with Servicemix 4.3   but it does not work on 4.4.
>>>
>>> Any ideas?  Can we no longer embed jars inside an OSGI bundle?
>>>
>>> Thanks.
>>
>>
>>
>> --
>> Willem
>> ----------------------------------
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.com (English)
>>         http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>> Weibo: willemjiang
>
>

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










RE: Cannot find class org.xml.sax.helpers.DefaultHandler

Posted by jmandawg <jm...@hotmail.com>.
I just checked the jre.properties file, and that line " org.xml.sax.helpers.DefaultHandler" exists in both the jre-1.5 and the jre-1.6 section.  I am using the fuse version of servicemix if that matters.  It seems as though it's not available unless I explicitly import it.  Any other ideas?

> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com]
> Sent: Saturday, August 06, 2011 3:17 AM
> To: users@servicemix.apache.org
> Subject: Re: Cannot find class org.xml.sax.helpers.DefaultHandler
> 
> Hi
> ServiceMix doesn't use JAXP as osgi bundle since Servicemix 4.4.
> You may need to update the jre.properties file in the etc to export the
> "org.xml.sax.helpers" package.
> 
> On Sat Aug  6 01:56:29 2011, J- MAN wrote:
> > Hi all,
> >
> > I've created an OSGI project that uses UIMA-core.jar.  UIMA makes use of
> Class.forName("some.class") to dynamically create classes so i have to put the
> uima-core.jar inside the OSGI bundle so it can resolve the classname without
> getting into an import/export loop.  I also modify the bundle-classpath to
> point to the uima-jar inside the bundle.  If i manually add the import for
> org.xml.sax.helpers.DefaultHandler into the manifest, it will work until it
> gets to the next JRE class that it fails to resolve.
> >
> > The issue is classes that UIMA-core.jar references such as
> org.xml.sax.helpers.DefaultHandler are not being resolved.  These classes come
> with the JRE and i assumed they would already be on the classpath.
> >
> > This used to work with Servicemix 4.3   but it does not work on 4.4.
> >
> > Any ideas?  Can we no longer embed jars inside an OSGI bundle?
> >
> > Thanks.
> 
> 
> 
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>          http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang



Re: Cannot find class org.xml.sax.helpers.DefaultHandler

Posted by Willem Jiang <wi...@gmail.com>.
Hi 
ServiceMix doesn't use JAXP as osgi bundle since Servicemix 4.4.
You may need to update the jre.properties file in the etc to export the 
"org.xml.sax.helpers" package.

On Sat Aug  6 01:56:29 2011, J- MAN wrote:
> Hi all,
> 
> I've created an OSGI project that uses UIMA-core.jar.  UIMA makes use of Class.forName("some.class") to dynamically create classes so i have to put the uima-core.jar inside the OSGI bundle so it can resolve the classname without getting into an import/export loop.  I also modify the bundle-classpath to point to the uima-jar inside the bundle.  If i manually add the import for org.xml.sax.helpers.DefaultHandler into the manifest, it will work until it gets to the next JRE class that it fails to resolve.
> 
> The issue is classes that UIMA-core.jar references such as org.xml.sax.helpers.DefaultHandler are not being resolved.  These classes come with the JRE and i assumed they would already be on the classpath.
> 
> This used to work with Servicemix 4.3   but it does not work on 4.4.
> 
> Any ideas?  Can we no longer embed jars inside an OSGI bundle?
> 
> Thanks.



-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang