Adding config files in classpath

Help
2008-10-24
2012-12-04
  • Michael Scott

    Michael Scott - 2008-10-24

    I have a problem where when my application launches, it needs to access a hibernate configuration file (and associated dtd file) via the classpath. I have added the "root" folder of the application, from which the relative path to the config file should be accessible. However, when I try to launch via Marathon, the dtd is not found.

    e.g

    Application is located at C:/MyApp

    config file is located at C:/MyApp/com/MyCompany/hibernate/hibernate.cfg.xml

    dtd is located at C:/MyApp/com/MyCompany/hibernate/hibernate-configuration-3.0.dtd

    I added the folder C:/MyApp (which is also the working directory) to the classpath, but when I try to launch, I get Hibernate exceptions about not being able to parse the dtd file:

    Caused by: org.dom4j.DocumentException: Error on line 4 of document  : Relative URI "com/MyCompany/hibernate/hibernate-configuration-3.0.dtd"; can not be resolved without a document URI.

    Is this a problem with the way I am specifying the classpath (works on when launching normally), a problem with the way I am specifying the location of the dtd file, or something else? Has anyone run into this kind of thing before?

    For confidentiality reasons, the paths above are obviously artificial, and I cannot publish the contents of the xml or dtd files, but hopefully this gives an idea of what the problem is.

    Thanks!

     
    • Dakshinamurthy Karra

      This forum will not be used for support requests and will be deleted soon. A google group for Marathon related discussions and support is created. Please subscribe to marathon-testing group and post your message there. 

      To subscribe visit: http://groups.google.com/group/marathon-testing 

      Thanks and Regards
      KD

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks