Re: Can't read repository file 'repository.xml

Tino Schöllhorn <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi,

read: http://db.apache.org/ojb/docu/guides/ojb-properties.html.

Have a look at the examples. You don't explicitly load the 
repository.xml file.

Tino

Sergio del Amo Caballero wrote:
> Hi all,
> I am getting an error while trying to retrieve my repository.xml file. 
> My repository.xml is under the WEB-INF/classes directory of my struts 
> web application.
> Exactly the line is where i try to read it is:
> 
> PBKey pbKey = new PBKey("repository.xml");
> 
> I tried with relative url-path:
> 
> PBKey pbKey = new PBKey("/WEB-INF/classes/repository.xml");
> 
> and local disk path:
> 
> PBKey pbKey = new 
> PBKey("/home/user/web_app/WEB-INF/classes/repository.xml");
> 
> but without success.  Nothing comes in catalina.out and i do not have 
> any idea where can be the problem. If anyone can point me to a solution, 
> it would be great. Here is the error:
> 
> HTTP Status 500 -
> ------------------------------------------------------------------------
> *type* Exception report
> *message*
> *description* _The server encountered an internal error () that 
> prevented it from fulfilling this request._
> *exception*
> javax.servlet.ServletException: Can't read repository file 'repository.xml'
> org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) 
> 
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) 
> 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) 
> 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> *root cause*
> org.apache.ojb.broker.metadata.MetadataException: Can't read repository 
> file 'repository.xml'
> org.apache.ojb.broker.metadata.MetadataManager.init(Unknown Source)
> org.apache.ojb.broker.metadata.MetadataManager.<init>(Unknown Source)
> org.apache.ojb.broker.metadata.MetadataManager.getInstance(Unknown Source)
> org.apache.ojb.broker.query.QueryFactory.getRepository(Unknown Source)
> org.apache.ojb.broker.query.QueryFactory.newQuery(Unknown Source)
> org.apache.ojb.broker.query.QueryFactory.newQuery(Unknown Source)
> com.softamo.libamo.about.dao.AboutDAO.findAllAbout(AboutDAO.java:209)
> com.softamo.libamo.struts.about.AboutPageAction.execute(AboutPageAction.java:30) 
> 
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) 
> 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) 
> 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> *note* _The full stack trace of the root cause is available in the 
> Apache Tomcat/5.5.17 logs._
> ------------------------------------------------------------------------
> Apache Tomcat/5.5.17
> 
> thanks in advanced for your feeback,
> Sergio del Amo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.