Results 1 to 1 of 1

Thread: Unable to run the project in jar due to spring error

  1. #1
    Join Date
    Jul 2012
    Posts
    2

    Default Unable to run the project in jar due to spring error

    I am using eclipse and the project is working fine. Then as I want it in jar format I export the project into a runnable jar file using eclipse relevant tool and set Library Handling to "Package required libraries into generated JAR". The problem arise when I try to run the project in jar format where I get this error:

    Code:
    Jul 25, 2012 10:01:06 AM org.springframework.context.support.AbstractApplication Context prepareRefresh
    INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@11bd9c9: startup date [Wed Jul 25 10:01:05 BST 2012]; root of context hierarchy
    Jul 25, 2012 10:01:06 AM org.springframework.core.io.support.PathMatchingResourcePatternResolver doFindPathMatchingFileResources
    WARNING: Cannot search for matching files underneath class path resource [] because it does not correspond to a directory in the file system
    java.io.FileNotFoundException: class path resource [] cannot be resolved to absolute file path because it does not reside in the file system: rsrc: mpla mpla...


    Digging into more of the problem I realised that is caused by the ClassPathXmlApplicationContext which doesn't work in jars(correct me if I am right). So what I should use instead?
    Last edited by socceric; Jul 26th, 2012 at 04:13 AM. Reason: more info in the problem

Tags for this Thread

Posting Permissions

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