Hi Bengt,
You need also add the package import of
"META-INF/services/org/apache/camel/component/"
As the OsgiFactoryFinder is changed to use camel application bundle to
load the resource, you need to make sure your application bundle has the
right to access the file.
BTW, there are some discusses about the refactoring that you can take a
look[1]
[1]
http://old.nabble.com/-DISCUSS--OSGi-improvements-and-type-converters-ts28776216.html#a28776216
Willem
Bengt Rodehav wrote:
Willem,
There might still be some OSGi related problems. When testing different
failing scenarios I got the following exception:
21:44:59,398 | DEBUG | guration Updater | FileEndpoint |
mponent.file.GenericFileEndpoint 138 | No strategy factory defined in
'META-INF/services/org/apache/camel/component/'
org.apache.camel.NoFactoryAvailableException: Could not find factory class
for resource: strategy.factory.file
at
org.apache.camel.core.osgi.OsgiFactoryFinder.findClass(OsgiFactoryFinder.java:71)
at
org.apache.camel.component.file.GenericFileEndpoint.createGenericFileStrategy(GenericFileEndpoint.java:134)
at
org.apache.camel.component.file.GenericFileEndpoint.getGenericFileProcessStrategy(GenericFileEndpoint.java:118)
at
org.apache.camel.component.file.GenericFileConsumer.doStart(GenericFileConsumer.java:397)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:53)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1015)
Seems like Camel cannot find any factory class for "strategy.factory.file".
Sounds fishy to me and seems related to the class loading issues I had
before. Can you check that the OSGi refactoring that has been made in Camel
2.4 takes this into account? I'll try to reproduce the error.
/Bengt