• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Spring resource classpath issue in OSGi

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
src/main/resources/repo/test.db4o.

Here's the entry in spring context.

<bean id="objectContainer"
class="org.springmodules.db4o.ObjectContainerFacto ryBean">
<property name="databaseFile"
value="classpath:/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:/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/repo/test.db4o"

I've tried different combinations, but Felix doesn't seem to recognize
this file. Any pointer will be appreciated.

- Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!