• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the API docs here for ClassPathResource

It says

Parameters:
path - the absolute path within the class path
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic