Results 1 to 2 of 2

Thread: classpath* and running the spring app in WAS problem

  1. #1

    Default classpath* and running the spring app in WAS problem

    Hello,
    With reference to packaging spring config files, I have the following scenario:
    My project architecture is like:
    MyProj
    JavaSource/...
    WebContent/WEB-INF/config/some_config.xml
    I am componentizing my business component into a jar file which will be put into another application as a library file[in the WEB-INF/lib folder].
    I am required to read this some_config.xml during server startup and do context loading for the objects mapped in the xml file.I have put this jar in the lib of other application. I am able to load the xml file by giving the path as "classpath:/WebContent/WEB-INF/config/some_config.xml" [as suggested in http://www.jroller.com/comments/raib...g_config_files]. But when I try to load the xml using "classpath*" the server throws an error saying "unindetified path/resource" (something to that effect).
    I have 2 questions in this regard:

    a) Is there something else that I need to do to make classpath* to work.

    b) When I run the calling application (with my jar in the lib folder of the other project) usind WSAD's test environment, the server starts without any error. But when I try to run the same using WAS, it throws an error saying that it was not able to load the objects defined in "some_config.xml". Am I missing something here.

    Regards,
    Soumya

  2. #2
    Join Date
    Aug 2004
    Posts
    26

    Default

    Hi, in WAS 5.1 the "ApplicationClassLoader".getResources(String name) doesn't return anything contained in jars. I reference each resource individually instead.

    Regards,
    Gordon.

Similar Threads

  1. Replies: 13
    Last Post: Feb 5th, 2010, 12:31 AM
  2. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  3. Replies: 0
    Last Post: Aug 8th, 2005, 01:04 PM
  4. Replies: 2
    Last Post: May 26th, 2005, 02:30 AM
  5. Replies: 8
    Last Post: Feb 24th, 2005, 04:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •