XFire

services.xml on filesystem doesn't work with relative path

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1-RC1
  • Fix Version/s: 1.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    jdk-1.4, OS Linux
  • Number of attachments :
    0

Description

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [services.xml]; nested exception is java.io.FileNotFoundException: class path resource [services.xml] cannot be opened because it does not exist

web.xml:
<servlet>
<servlet-name>XFire</servlet-name>
<display-name>XFire Servlet</display-name>
<servlet-class>
org.codehaus.xfire.transport.http.XFireConfigurableServlet
</servlet-class>

<init-param>
<param-name>config</param-name>
<param-value>services.xml</param-value>
</init-param>
</servlet>

Activity

Hide
Adam Kramer added a comment -

Is the services.xml within the webapp context directory structure or outside of it?

Show
Adam Kramer added a comment - Is the services.xml within the webapp context directory structure or outside of it?
Hide
Ondrej Svetlik added a comment -

I tried many locations inside the webapps folder, but relative path didn't work. Then Dan told me to use absolute path as a workaround and it really helped.

Show
Ondrej Svetlik added a comment - I tried many locations inside the webapps folder, but relative path didn't work. Then Dan told me to use absolute path as a workaround and it really helped.
Hide
Dan Diephouse added a comment -

This is fixed in SVN now. Thanks Ondrej.

Show
Dan Diephouse added a comment - This is fixed in SVN now. Thanks Ondrej.
Hide
Henry Brownson Occleston added a comment -

I don't think this is fixed, at least not in 1.1 or 1.2.6 which I tried. I would like to say that I have maybe misunderstood the documentation but there doesn't really seem to be any

All the examples I have found on the internet seem to gloss over what the allowable values are for the config init-param. In particular, since all our other spring config is under WEB-INF and because I want to avoid a wild goose chase to find the config file on the classpath (since we have a lot of jars in WEB-INF/lib), I am interested in picking it up from WEB-INF.

But both relative (WEB-INF/myfile.xml) and absolute (/WEB-INF/myfile.xml) do not work. The only file name that seems to work is the default one META-INF/xfire/service.xml when I copy that file to WEB-INF/classes.

Show
Henry Brownson Occleston added a comment - I don't think this is fixed, at least not in 1.1 or 1.2.6 which I tried. I would like to say that I have maybe misunderstood the documentation but there doesn't really seem to be any All the examples I have found on the internet seem to gloss over what the allowable values are for the config init-param. In particular, since all our other spring config is under WEB-INF and because I want to avoid a wild goose chase to find the config file on the classpath (since we have a lot of jars in WEB-INF/lib), I am interested in picking it up from WEB-INF. But both relative (WEB-INF/myfile.xml) and absolute (/WEB-INF/myfile.xml) do not work. The only file name that seems to work is the default one META-INF/xfire/service.xml when I copy that file to WEB-INF/classes.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: