Well, that's the part which is puzzling. I don't see any reason why
Spring would use a seperate classloader.I've even tried including the
db4o file under
<input-resource>META-INF/spring/repo/test.db4o=target/classes/META-INF/spring/repo/test.db4o</input-reource>
, but issue remains the same...

On Mon, Jun 13, 2011 at 12:42 PM,  <[email protected]> wrote:
> I'm no expert but my best guess would be that spring is trying to load the
> file from the wrong classloader. If I'm reading the spring source correctly,
> it will attempt to load "classpath:META-INF/spring/repo/test.db4o" from
> Thread.currentThread().getContextClassLoader() and then from
> ClassUtils.class.getClassLoader() if that fails. That's my 2 cents anyway.
>
> Quoting Shamik Bandopadhyay <[email protected]>:
>
>> The file is in the same bundle and located inside
>> src/resources/META-INF/spring/repo/test.db4o. I've confirmed this in
>> the generated bundle as well.
>>
>> On Mon, Jun 13, 2011 at 8:40 AM, Tribon Cheng <[email protected]>
>> wrote:
>>>
>>> Resources are loaded in the same way as classes. Make sure the file is
>>> under
>>> the classpath, and is exported if it is used in different bundle.
>>> 在 2011-6-13 下午11:25,"Shamik Bandopadhyay" <[email protected]>写道:
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to deploy a spring based bundle in osgi (fuse esb).In
>>>> spring context, I'm referring to a db4o file which is inside resources
>>>> folder. As per my understanding, a maven project will make sure that
>>>> any file available under resources folder will be available in project
>>>> classpath. I've kept the file under
>>>> resources/META-INF/spring/repo/test.db4o.
>>>>
>>>> Here's the entry in spring context.
>>>>
>>>> <bean id="objectContainer"
>>>> class="org.springmodules.db4o.ObjectContainerFactoryBean">
>>>>    <property name="databaseFile"
>>>> value="classpath:META-INF/spring/repo/test.db4o" />
>>>> </bean>
>>>>
>>>> Once I install and try to start the application, I'm getting the
>>>> following exception.
>>>>
>>>> "java.io.FileNotFoundException: OSGi
>>>> resource[classpath:META-INF/spring/repo/test.db4o|bnd.id
>>>
>>> =258|bnd.sym=taxonomydaoimplbundle]
>>>>
>>>> cannot be resolved to absolute file path because it does not reside in
>>>> the file system: bundle://258.0:1/META-INF/spring/repo/test.db4o"
>>>>
>>>> I've tried different combinations, but Felix doesn't seem to recognize
>>>> this file. Any pointer will be appreciated.
>>>>
>>>> - Thanks
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to