You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by ribeiant <ri...@students.zhaw.ch> on 2008/10/08 12:43:47 UTC
Export-Import of a package from a jar file included in a bundle
Hi
I have a bundle "A" that include the xml-apis.jar file. I would like to
export for the other bundles the package "org.w3c.dom". In my manifest of
the bundle "A" I have:
Export-Package: org.xml.sax
and on the others bundles:
Import-Package: org.xml.sax
The problem is that I become a "java.lang.ExceptionInInitializerError"
caused by "Caused by: java.lang.ClassNotFoundException:
org.xml.sax.ContentHandler"
I don't understand the problem...
Thank you for the help
Antonio
--
View this message in context: http://www.nabble.com/Export-Import-of-a-package-from-a-jar-file-included-in-a-bundle-tp19876398p19876398.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Export-Import of a package from a jar file included in a bundle
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Hmm. Well, the actual error is probably misleading and that the real
issue is likely that there is a class missing that ContentHandler needs.
Without playing with it, it is hard to say.
-> richard
ribeiant wrote:
> Hi
> my classpath is
> Bundle-Classpath: .,xml-apis.jar
> and the jar file is direct in the bundle
> a.jar
> xml-apis.jar
>
> Thanks for the help
> Antonio
>
>
> Richard S. Hall wrote:
>
>> Richard S. Hall wrote:
>>
>>> If bundle A has the xml-apis.jar file inside of it, is that file
>>> mentioned on the bundle's class path? For example, if your bundle
>>> contained:
>>>
>>> a.jar
>>> lib/
>>> xml-apis.jar
>>>
>>> Then your manifest for A should contain:
>>>
>>> Bundle-ClassPath: lib/xml-apis.jar
>>>
>> Actually, if you also have classes in your JAR file, you should include
>> "." in the class path value too, such as:
>>
>> Bundle-ClassPath: ., lib/xml-apis.jar
>>
>> -> richard
>>
>>
>>> -> richard
>>>
>>> ribeiant wrote:
>>>
>>>> Hi
>>>> I have a bundle "A" that include the xml-apis.jar file. I would like to
>>>> export for the other bundles the package "org.w3c.dom". In my
>>>> manifest of
>>>> the bundle "A" I have:
>>>> Export-Package: org.xml.sax
>>>> and on the others bundles:
>>>> Import-Package: org.xml.sax
>>>> The problem is that I become a "java.lang.ExceptionInInitializerError"
>>>> caused by "Caused by: java.lang.ClassNotFoundException:
>>>> org.xml.sax.ContentHandler"
>>>> I don't understand the problem...
>>>> Thank you for the help
>>>> Antonio
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Export-Import of a package from a jar file included in a bundle
Posted by ribeiant <ri...@students.zhaw.ch>.
Hi
my classpath is
Bundle-Classpath: .,xml-apis.jar
and the jar file is direct in the bundle
a.jar
xml-apis.jar
Thanks for the help
Antonio
Richard S. Hall wrote:
>
> Richard S. Hall wrote:
>> If bundle A has the xml-apis.jar file inside of it, is that file
>> mentioned on the bundle's class path? For example, if your bundle
>> contained:
>>
>> a.jar
>> lib/
>> xml-apis.jar
>>
>> Then your manifest for A should contain:
>>
>> Bundle-ClassPath: lib/xml-apis.jar
>
> Actually, if you also have classes in your JAR file, you should include
> "." in the class path value too, such as:
>
> Bundle-ClassPath: ., lib/xml-apis.jar
>
> -> richard
>
>>
>> -> richard
>>
>> ribeiant wrote:
>>> Hi
>>> I have a bundle "A" that include the xml-apis.jar file. I would like to
>>> export for the other bundles the package "org.w3c.dom". In my
>>> manifest of
>>> the bundle "A" I have:
>>> Export-Package: org.xml.sax
>>> and on the others bundles:
>>> Import-Package: org.xml.sax
>>> The problem is that I become a "java.lang.ExceptionInInitializerError"
>>> caused by "Caused by: java.lang.ClassNotFoundException:
>>> org.xml.sax.ContentHandler"
>>> I don't understand the problem...
>>> Thank you for the help
>>> Antonio
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Export-Import-of-a-package-from-a-jar-file-included-in-a-bundle-tp19876398p19879020.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Export-Import of a package from a jar file included in a bundle
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Richard S. Hall wrote:
> If bundle A has the xml-apis.jar file inside of it, is that file
> mentioned on the bundle's class path? For example, if your bundle
> contained:
>
> a.jar
> lib/
> xml-apis.jar
>
> Then your manifest for A should contain:
>
> Bundle-ClassPath: lib/xml-apis.jar
Actually, if you also have classes in your JAR file, you should include
"." in the class path value too, such as:
Bundle-ClassPath: ., lib/xml-apis.jar
-> richard
>
> -> richard
>
> ribeiant wrote:
>> Hi
>> I have a bundle "A" that include the xml-apis.jar file. I would like to
>> export for the other bundles the package "org.w3c.dom". In my
>> manifest of
>> the bundle "A" I have:
>> Export-Package: org.xml.sax
>> and on the others bundles:
>> Import-Package: org.xml.sax
>> The problem is that I become a "java.lang.ExceptionInInitializerError"
>> caused by "Caused by: java.lang.ClassNotFoundException:
>> org.xml.sax.ContentHandler"
>> I don't understand the problem...
>> Thank you for the help
>> Antonio
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Export-Import of a package from a jar file included in a bundle
Posted by "Richard S. Hall" <he...@ungoverned.org>.
If bundle A has the xml-apis.jar file inside of it, is that file
mentioned on the bundle's class path? For example, if your bundle contained:
a.jar
lib/
xml-apis.jar
Then your manifest for A should contain:
Bundle-ClassPath: lib/xml-apis.jar
-> richard
ribeiant wrote:
> Hi
> I have a bundle "A" that include the xml-apis.jar file. I would like to
> export for the other bundles the package "org.w3c.dom". In my manifest of
> the bundle "A" I have:
> Export-Package: org.xml.sax
> and on the others bundles:
> Import-Package: org.xml.sax
> The problem is that I become a "java.lang.ExceptionInInitializerError"
> caused by "Caused by: java.lang.ClassNotFoundException:
> org.xml.sax.ContentHandler"
> I don't understand the problem...
> Thank you for the help
> Antonio
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org