You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by bobshort <je...@check-it.ca> on 2012/06/11 19:35:56 UTC
Install refresh issue
Hi,
Here is the scenario:
1. I install the Karaf Spring feature.
2. I install my feature which includes FreeMarker and uses Spring's
SpringTemplateLoader class.
When my bundle attempts to use the SpringTemplateLoader I get:
/Caused by: java.lang.ClassNotFoundException:
freemarker.cache.TemplateLoader
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)[osgi-3.6.2.R36x_v20110210.jar:]
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.2.R36x_v20110210.jar:]
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.2.R36x_v20110210.jar:]
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.2.R36x_v20110210.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_29]
... 58 more/
Once I refresh the "Spring Context Support" bundle and try again everything
works fine. It seems that the Spring bundle cannot resolve the optional
FreeMarker dependency until it is refreshed.
Is this a bug, or is there a better way of installing my feature so I don't
get the classloading exception?
Thanks!
--
View this message in context: http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Install refresh issue
Posted by Romain Gilles <ro...@gmail.com>.
Clearly on the last version of Gemini blueprint they have work to make
compatible with spring 3.1. Therefore I think Sprint-DM 1.2 is not
compatible with spring 3.1.
I have a question. For you if I want to use Gemini Blueprint does I need to
try to replace Aries Blueprint or 2 implementation of the Blueprint
specification can coexist in karaf at runtime?
Romain.
2012/6/12 Raman Gupta <ro...@gmail.com>
> Another interested party re. Gemini-Blueprint here...
>
> Gemini-blueprint offers integration with Spring application contexts
> whereas Aries Blueprint does not. Without integration with Spring and/or
> Guice, I'm not sure how useful Aries can really be... The DI capabilities
> of raw Blueprint are ok for basic bundles but are pretty limited for
> advanced use-cases.
>
> For now, Spring-DM 1.2, which works out of the box on Karaf via the
> feature, seems to have pretty much all the capabilities of
> Gemini-Blueprint, but obviously this will become less and less true as time
> goes on.
>
> Regards,
> Raman
>
>
>
> On 06/12/2012 04:40 PM, Romain Gilles wrote:
>
> Hi all,
> I'm really interesting too! I have try last week to make Spring 3.1.1
> and Gemini-blueprint works on karaf. I finally succeeded but with a patch
> on gemini and now I trying to work with the gemeni team to see if they
> accept my patch. So if you think that blueprint from aries is better let me
> know. I think blueprint from aries is not able to mix standard spring +
> blueprint as gemini does.
> I think if you have a strong adherence with spring then you will have to
> go on gemini-blueprint as I does. I my case it is not me but a third party
> that use massively spring features.
> Any way if I have time I will try to replace aries blueprint by
> gemini-blueprint. I'm not sure that is possible?
>
> Romain.
>
> 2012/6/12 bobshort <je...@check-it.ca>
>
>> I added the Spring feature dependency to my feature and it refreshes
>> everything on install. Thanks for the tip!
>>
>> On a slightly different topic, I'm curious about the "Aries usually works
>> better than Spring DM" comment? We are pretty heavy Spring users. I've
>> considered switching to Blueprint but haven't seen anything definitive on
>> what makes it better. There is a lot of Spring specific logic in our app
>> I'd
>> have to replace, particularly the use of annotations and some aop
>> functionality, but I'd consider it if there was a significant benefit.
>>
>> Can you elaborate on the what makes Aries better?
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804p4024817.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
Re: Install refresh issue
Posted by Raman Gupta <ro...@gmail.com>.
Another interested party re. Gemini-Blueprint here...
Gemini-blueprint offers integration with Spring application contexts
whereas Aries Blueprint does not. Without integration with Spring
and/or Guice, I'm not sure how useful Aries can really be... The DI
capabilities of raw Blueprint are ok for basic bundles but are pretty
limited for advanced use-cases.
For now, Spring-DM 1.2, which works out of the box on Karaf via the
feature, seems to have pretty much all the capabilities of
Gemini-Blueprint, but obviously this will become less and less true as
time goes on.
Regards,
Raman
On 06/12/2012 04:40 PM, Romain Gilles wrote:
> Hi all,
> I'm really interesting too! I have try last week to make Spring
> 3.1.1 and Gemini-blueprint works on karaf. I finally succeeded but
> with a patch on gemini and now I trying to work with the gemeni team
> to see if they accept my patch. So if you think that blueprint from
> aries is better let me know. I think blueprint from aries is not
> able to mix standard spring + blueprint as gemini does.
> I think if you have a strong adherence with spring then you will
> have to go on gemini-blueprint as I does. I my case it is not me but
> a third party that use massively spring features.
> Any way if I have time I will try to replace aries blueprint by
> gemini-blueprint. I'm not sure that is possible?
>
> Romain.
>
> 2012/6/12 bobshort <jeremy@check-it.ca <ma...@check-it.ca>>
>
> I added the Spring feature dependency to my feature and it refreshes
> everything on install. Thanks for the tip!
>
> On a slightly different topic, I'm curious about the "Aries
> usually works
> better than Spring DM" comment? We are pretty heavy Spring
> users. I've
> considered switching to Blueprint but haven't seen anything
> definitive on
> what makes it better. There is a lot of Spring specific logic in
> our app I'd
> have to replace, particularly the use of annotations and some aop
> functionality, but I'd consider it if there was a significant
> benefit.
>
> Can you elaborate on the what makes Aries better?
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804p4024817.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
Re: Install refresh issue
Posted by Romain Gilles <ro...@gmail.com>.
Hi all,
I'm really interesting too! I have try last week to make Spring 3.1.1 and
Gemini-blueprint works on karaf. I finally succeeded but with a patch on
gemini and now I trying to work with the gemeni team to see if they accept
my patch. So if you think that blueprint from aries is better let me know.
I think blueprint from aries is not able to mix standard spring + blueprint
as gemini does.
I think if you have a strong adherence with spring then you will have to go
on gemini-blueprint as I does. I my case it is not me but a third party
that use massively spring features.
Any way if I have time I will try to replace aries blueprint by
gemini-blueprint. I'm not sure that is possible?
Romain.
2012/6/12 bobshort <je...@check-it.ca>
> I added the Spring feature dependency to my feature and it refreshes
> everything on install. Thanks for the tip!
>
> On a slightly different topic, I'm curious about the "Aries usually works
> better than Spring DM" comment? We are pretty heavy Spring users. I've
> considered switching to Blueprint but haven't seen anything definitive on
> what makes it better. There is a lot of Spring specific logic in our app
> I'd
> have to replace, particularly the use of annotations and some aop
> functionality, but I'd consider it if there was a significant benefit.
>
> Can you elaborate on the what makes Aries better?
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804p4024817.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
Re: Install refresh issue
Posted by bobshort <je...@check-it.ca>.
I added the Spring feature dependency to my feature and it refreshes
everything on install. Thanks for the tip!
On a slightly different topic, I'm curious about the "Aries usually works
better than Spring DM" comment? We are pretty heavy Spring users. I've
considered switching to Blueprint but haven't seen anything definitive on
what makes it better. There is a lot of Spring specific logic in our app I'd
have to replace, particularly the use of annotations and some aop
functionality, but I'd consider it if there was a significant benefit.
Can you elaborate on the what makes Aries better?
--
View this message in context: http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804p4024817.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Install refresh issue
Posted by Freeman Fang <fr...@gmail.com>.
Hi Johan,
To be clear, what I mean by "how OSGi package resolve works" I mean
this scenario,
Step 1. Bundle A already get installed and started in OSGi container,
but Bundle A has optional import X.Y.Z
Step 2. Bundle B installed and started in OSGi container which export
X.Y.Z
In OSGi container unless you explicitly refresh Bundle A, Bundle A
can't pick up the optional import X.Y.Z, this is by design because
refresh BundleA will cause all other bundles which depend on Bundle A
get refreshed as well, just like chain-action, this is a CPU-cost task
so container want you explicitly refresh the bundle. This behavior is
from OSGi container level and has nothing to do with spring or aries(I
know aries works better then spring-osgi in most cases and aries may
not need optional import at all but it's another story).
And karaf feature service provide a mechanism that will automatically
refresh all bundles in a certain feature if necessary(likely when
optional import package is available), this mechanism is configurable
IIRC, you can disable/enable the refresh.
Freeman
On 2012-6-12, at 上午9:30, Johan Edstrom wrote:
> It actually isn't how osgi package resolvers work, it is how the
> Spring-Osgi extender works.
> Move this to Aries Blueprint.
>
> On Jun 11, 2012, at 7:10 PM, Freeman Fang wrote:
>
>> Hi,
>>
>> Yeah, it's nto a bug, it's just how OSGi package resolve works.
>> Anyway, if you put spring feature also in your customer feature
>> along with the freemarker bunle, the spring bundle which have new
>> optional import package available can get refreshed automatically
>> when you install your customer feature, this is the default
>> behavior from karaf feature service. Your customer feature should
>> be like
>>
>> <feature name='your_customer_feature' version='...'>
>> <feature version="[3,4)">spring</feature>
>> <bundle>mvn:org.apache.servicemix.bundles/
>> org.apache.servicemix.bundles.freemarker/2.3.18_1</bundle>
>> <bundle>...any bundle you need in your feature</bundle>
>> </feature>
>>
>> The key point is you need put spring feature in your feature, so
>> that all bundles from spring feature are also in your feature,
>> hence get chance to refresh automatically if necessary when you
>> install your_customer_feature.
>>
>> Freeman
>> On 2012-6-12, at 上午2:44, Achim Nierbeck wrote:
>>
>>> Hi,
>>>
>>> this is no bug this is actually a resolving "issue".
>>> Since in your first startup the Spring Bundle was successfully
>>> resolved without the optional dependencies there was no need
>>> to refresh the bundle after the FreeMarker Bundle was installed.
>>>
>>> You might try to use the OBR-Resolver to work around this. This way
>>> the features-service might realize
>>> that a new opitonal dependency was installed and might refresh the
>>> Spring Bundle.
>>>
>>> If this still doesn't work I suggest writing a Fragment-Bundle that
>>> attaches to the Spring-bundle
>>> and alters the Import-Package of the Host-Bundle to work without the
>>> optional flag.
>>> If you keep this Fragment-Bundle with your Features it might work
>>> around this issue. Though a restart of the Host-Bundle
>>> might be needed also, but this way it'll survive a Server restart :)
>>>
>>> Regards, Achim
>>>
>>> 2012/6/11 bobshort <je...@check-it.ca>:
>>>> Hi,
>>>>
>>>> Here is the scenario:
>>>>
>>>> 1. I install the Karaf Spring feature.
>>>>
>>>> 2. I install my feature which includes FreeMarker and uses Spring's
>>>> SpringTemplateLoader class.
>>>>
>>>> When my bundle attempts to use the SpringTemplateLoader I get:
>>>>
>>>> /Caused by: java.lang.ClassNotFoundException:
>>>> freemarker.cache.TemplateLoader
>>>> at
>>>> org
>>>> .eclipse
>>>> .osgi
>>>> .internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
>>>> 506)[osgi-3.6.2.R36x_v20110210.jar:]
>>>> at
>>>> org
>>>> .eclipse
>>>> .osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
>>>> 422)[osgi-3.6.2.R36x_v20110210.jar:]
>>>> at
>>>> org
>>>> .eclipse
>>>> .osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
>>>> 410)[osgi-3.6.2.R36x_v20110210.jar:]
>>>> at
>>>> org
>>>> .eclipse
>>>> .osgi
>>>> .internal
>>>> .baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:
>>>> 107)[osgi-3.6.2.R36x_v20110210.jar:]
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:
>>>> 1.6.0_29]
>>>> ... 58 more/
>>>>
>>>> Once I refresh the "Spring Context Support" bundle and try again
>>>> everything
>>>> works fine. It seems that the Spring bundle cannot resolve the
>>>> optional
>>>> FreeMarker dependency until it is refreshed.
>>>>
>>>> Is this a bug, or is there a better way of installing my feature
>>>> so I don't
>>>> get the classloading exception?
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> View this message in context: http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> --
>>>
>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>> Committer & Project Lead
>>> OPS4J Pax for Vaadin
>>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter &
>>> Project
>>> Lead
>>> blog <http://notizblog.nierbeck.de/>
>>
>> ---------------------------------------------
>> Freeman Fang
>>
>> FuseSource
>> Email:ffang@fusesource.com
>> Web: fusesource.com
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>> http://blog.sina.com.cn/u/1473905042
>> weibo: http://weibo.com/u/1473905042
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
Re: Install refresh issue
Posted by Johan Edstrom <se...@gmail.com>.
It actually isn't how osgi package resolvers work, it is how the Spring-Osgi extender works.
Move this to Aries Blueprint.
On Jun 11, 2012, at 7:10 PM, Freeman Fang wrote:
> Hi,
>
> Yeah, it's nto a bug, it's just how OSGi package resolve works.
> Anyway, if you put spring feature also in your customer feature along with the freemarker bunle, the spring bundle which have new optional import package available can get refreshed automatically when you install your customer feature, this is the default behavior from karaf feature service. Your customer feature should be like
>
> <feature name='your_customer_feature' version='...'>
> <feature version="[3,4)">spring</feature>
> <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker/2.3.18_1</bundle>
> <bundle>...any bundle you need in your feature</bundle>
> </feature>
>
> The key point is you need put spring feature in your feature, so that all bundles from spring feature are also in your feature, hence get chance to refresh automatically if necessary when you install your_customer_feature.
>
> Freeman
> On 2012-6-12, at 上午2:44, Achim Nierbeck wrote:
>
>> Hi,
>>
>> this is no bug this is actually a resolving "issue".
>> Since in your first startup the Spring Bundle was successfully
>> resolved without the optional dependencies there was no need
>> to refresh the bundle after the FreeMarker Bundle was installed.
>>
>> You might try to use the OBR-Resolver to work around this. This way
>> the features-service might realize
>> that a new opitonal dependency was installed and might refresh the
>> Spring Bundle.
>>
>> If this still doesn't work I suggest writing a Fragment-Bundle that
>> attaches to the Spring-bundle
>> and alters the Import-Package of the Host-Bundle to work without the
>> optional flag.
>> If you keep this Fragment-Bundle with your Features it might work
>> around this issue. Though a restart of the Host-Bundle
>> might be needed also, but this way it'll survive a Server restart :)
>>
>> Regards, Achim
>>
>> 2012/6/11 bobshort <je...@check-it.ca>:
>>> Hi,
>>>
>>> Here is the scenario:
>>>
>>> 1. I install the Karaf Spring feature.
>>>
>>> 2. I install my feature which includes FreeMarker and uses Spring's
>>> SpringTemplateLoader class.
>>>
>>> When my bundle attempts to use the SpringTemplateLoader I get:
>>>
>>> /Caused by: java.lang.ClassNotFoundException:
>>> freemarker.cache.TemplateLoader
>>> at
>>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)[osgi-3.6.2.R36x_v20110210.jar:]
>>> at
>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.2.R36x_v20110210.jar:]
>>> at
>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.2.R36x_v20110210.jar:]
>>> at
>>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.2.R36x_v20110210.jar:]
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_29]
>>> ... 58 more/
>>>
>>> Once I refresh the "Spring Context Support" bundle and try again everything
>>> works fine. It seems that the Spring bundle cannot resolve the optional
>>> FreeMarker dependency until it is refreshed.
>>>
>>> Is this a bug, or is there a better way of installing my feature so I don't
>>> get the classloading exception?
>>>
>>> Thanks!
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>>
>>
>> --
>>
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> OPS4J Pax for Vaadin
>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>> Lead
>> blog <http://notizblog.nierbeck.de/>
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: http://weibo.com/u/1473905042
>
>
>
>
>
>
>
>
>
>
Re: Install refresh issue
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Yeah, it's nto a bug, it's just how OSGi package resolve works.
Anyway, if you put spring feature also in your customer feature along
with the freemarker bunle, the spring bundle which have new optional
import package available can get refreshed automatically when you
install your customer feature, this is the default behavior from karaf
feature service. Your customer feature should be like
<feature name='your_customer_feature' version='...'>
<feature version="[3,4)">spring</feature>
<bundle>mvn:org.apache.servicemix.bundles/
org.apache.servicemix.bundles.freemarker/2.3.18_1</bundle>
<bundle>...any bundle you need in your feature</bundle>
</feature>
The key point is you need put spring feature in your feature, so that
all bundles from spring feature are also in your feature, hence get
chance to refresh automatically if necessary when you install
your_customer_feature.
Freeman
On 2012-6-12, at 上午2:44, Achim Nierbeck wrote:
> Hi,
>
> this is no bug this is actually a resolving "issue".
> Since in your first startup the Spring Bundle was successfully
> resolved without the optional dependencies there was no need
> to refresh the bundle after the FreeMarker Bundle was installed.
>
> You might try to use the OBR-Resolver to work around this. This way
> the features-service might realize
> that a new opitonal dependency was installed and might refresh the
> Spring Bundle.
>
> If this still doesn't work I suggest writing a Fragment-Bundle that
> attaches to the Spring-bundle
> and alters the Import-Package of the Host-Bundle to work without the
> optional flag.
> If you keep this Fragment-Bundle with your Features it might work
> around this issue. Though a restart of the Host-Bundle
> might be needed also, but this way it'll survive a Server restart :)
>
> Regards, Achim
>
> 2012/6/11 bobshort <je...@check-it.ca>:
>> Hi,
>>
>> Here is the scenario:
>>
>> 1. I install the Karaf Spring feature.
>>
>> 2. I install my feature which includes FreeMarker and uses Spring's
>> SpringTemplateLoader class.
>>
>> When my bundle attempts to use the SpringTemplateLoader I get:
>>
>> /Caused by: java.lang.ClassNotFoundException:
>> freemarker.cache.TemplateLoader
>> at
>> org
>> .eclipse
>> .osgi
>> .internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
>> 506)[osgi-3.6.2.R36x_v20110210.jar:]
>> at
>> org
>> .eclipse
>> .osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
>> [osgi-3.6.2.R36x_v20110210.jar:]
>> at
>> org
>> .eclipse
>> .osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
>> [osgi-3.6.2.R36x_v20110210.jar:]
>> at
>> org
>> .eclipse
>> .osgi
>> .internal
>> .baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:
>> 107)[osgi-3.6.2.R36x_v20110210.jar:]
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:
>> 1.6.0_29]
>> ... 58 more/
>>
>> Once I refresh the "Spring Context Support" bundle and try again
>> everything
>> works fine. It seems that the Spring bundle cannot resolve the
>> optional
>> FreeMarker dependency until it is refreshed.
>>
>> Is this a bug, or is there a better way of installing my feature so
>> I don't
>> get the classloading exception?
>>
>> Thanks!
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> OPS4J Pax for Vaadin
> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
> Lead
> blog <http://notizblog.nierbeck.de/>
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
Re: Install refresh issue
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
this is no bug this is actually a resolving "issue".
Since in your first startup the Spring Bundle was successfully
resolved without the optional dependencies there was no need
to refresh the bundle after the FreeMarker Bundle was installed.
You might try to use the OBR-Resolver to work around this. This way
the features-service might realize
that a new opitonal dependency was installed and might refresh the
Spring Bundle.
If this still doesn't work I suggest writing a Fragment-Bundle that
attaches to the Spring-bundle
and alters the Import-Package of the Host-Bundle to work without the
optional flag.
If you keep this Fragment-Bundle with your Features it might work
around this issue. Though a restart of the Host-Bundle
might be needed also, but this way it'll survive a Server restart :)
Regards, Achim
2012/6/11 bobshort <je...@check-it.ca>:
> Hi,
>
> Here is the scenario:
>
> 1. I install the Karaf Spring feature.
>
> 2. I install my feature which includes FreeMarker and uses Spring's
> SpringTemplateLoader class.
>
> When my bundle attempts to use the SpringTemplateLoader I get:
>
> /Caused by: java.lang.ClassNotFoundException:
> freemarker.cache.TemplateLoader
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)[osgi-3.6.2.R36x_v20110210.jar:]
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.2.R36x_v20110210.jar:]
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.2.R36x_v20110210.jar:]
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.2.R36x_v20110210.jar:]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_29]
> ... 58 more/
>
> Once I refresh the "Spring Context Support" bundle and try again everything
> works fine. It seems that the Spring bundle cannot resolve the optional
> FreeMarker dependency until it is refreshed.
>
> Is this a bug, or is there a better way of installing my feature so I don't
> get the classloading exception?
>
> Thanks!
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Install-refresh-issue-tp4024804.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
OPS4J Pax for Vaadin
<http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
Lead
blog <http://notizblog.nierbeck.de/>