Announcement Announcement Module
Collapse
No announcement yet.
classpath* and running the spring app in WAS problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X