Making shared classes available on the classpath of an OSGi application deployed on Tomcat [message #92780] |
Tue, 24 July 2007 10:05 |
Eclipse User |
|
|
|
Originally posted by: mehow.infogenia.pl
Hi,
I guess the title says it all. I wish to make some classes shared
between web applications deployed on Tomcat available to bundles
deployed using servletbridge. How can I achieve that?
I tried to use extendedFrameworkExports property, but I don't think it's
the way to go. Well, at least it doesn't work.
Help will be appreciated,
Michal
|
|
|
|
Re: Making shared classes available on the classpath of an OSGi application deployed on Tomcat [message #92991 is a reply to message #92837] |
Wed, 25 July 2007 09:02 |
Eclipse User |
|
|
|
Originally posted by: mehow.infogenia.pl
Simon Kaegi pisze:
> Hi Michal,
>
> Using extendedFrameworkExports is the way to go and should work for usecase.
> These exports are not made available to your bundles automatically; you
> still have to explicitly import them.
If I edit web.xml like follows:
<init-param>
<param-name>extendedFrameworkExports</param-name>
<param-value>my.imported.package</param-value>
</init-param>
I still get
org.osgi.framework.BundleException: The bundle could not be resolved.
Reason: Missing Constraint: Import-Package: my.imported.package;
version="0.0.0"
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:305)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:252)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:260)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java
:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:294)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:279)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:214)
at java.lang.Thread.run(Thread.java:619)
even though in MANIFEST.MF I have
Import-Package: my.imported.package
> Also, you have to make sure the visible dependencies of these shared classes
> are also imported.
Could this be the reason of the above behaviour?
Thanks,
Michal
> -Simon
>
>
>
> "Michał Tkacz" <mehow@infogenia.pl> wrote in message
> news:f84iua$ijl$1@build.eclipse.org...
>> Hi,
>>
>> I guess the title says it all. I wish to make some classes shared between
>> web applications deployed on Tomcat available to bundles deployed using
>> servletbridge. How can I achieve that?
>>
>> I tried to use extendedFrameworkExports property, but I don't think it's
>> the way to go. Well, at least it doesn't work.
>>
>> Help will be appreciated,
>>
>> Michal
>
>
|
|
|
|
Re: Making shared classes available on the classpath of an OSGi application deployed on Tomcat [message #93048 is a reply to message #93006] |
Thu, 26 July 2007 08:45 |
Eclipse User |
|
|
|
Originally posted by: mehow.infogenia.pl
Simon Kaegi wrote:
>> even though in MANIFEST.MF I have
>>
>> Import-Package: my.imported.package
>>
>>> Also, you have to make sure the visible dependencies of these shared
>>> classes are also imported.
>> Could this be the reason of the above behaviour?
>>
> It shouldn't be since we're just try to resolve the dependency.
> It is possible that the old version of the extension bundle is around.
> Perhaps try either running "sp_redeploy" or cleaning out the "work"
> directory for your web application.
That did the job! Thanks!
Michal
|
|
|
Powered by
FUDForum. Page generated in 0.03381 seconds