• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

classpath:repository.xml (No such file or directory) - Tomcat / Spring / Jackrabbit error  RSS feed

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Tomcat 7 with Eclipse Luna to run a Spring based web app which also uses Jackrabbit. In Spring's application-context.xml file, I have defined a Jackrabbit repository's reference with



repository.xml is in the same folder as application-context.xml.

Tomcat throws
java.io.FileNotFoundException: /Applications/eclipse/Eclipse.app/Contents/MacOS/classpath:repository.xml (No such file or directory)


It is as if "classpath:repository.xml" were interpreted as a directory path, and not as a Spring's resource string.

<constructor-arg index="0" value="classpath:repository.xml"/>

Is this an issue with Eclipse ? Do I need to specify anything in its .ini ?
Or with Tomcat or with Spring ?


I also tried to deploy the .war in the standalone tomcat server, and take eclipse out of the equation.

I got the same:

java.io.FileNotFoundException: /mypathtoApache/apache-tomcat-6.0.41/bin/classpath:repository.xml (No such file or directory)

It is as if "classpath" were interpreted as part of the dirname, not as a resource string.

Any help ?
 
Grace Green
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works, notice without "classpath:"



That assumes that repository.xml is in the same location, i.e. WEB-INF as the Spring's application context xml file.
If I replace
<constructor-arg value="repository.xml"/>
with
<constructor-arg value="classpath:repository.xml"/>

there is an error stating that classpath:repository.xml cannot be found ...

ANyone can explain why ?
 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the API docs here for ClassPathResource

It says

Parameters:
path - the absolute path within the class path
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!