Results 1 to 2 of 2

Thread: Can't find the configuration file in WebLogic...

  1. #1
    Join Date
    Mar 2005
    Posts
    7

    Default Can't find the configuration file in WebLogic...

    We're getting a FileNotFoundException for the configuration file which we're loading using ClassPathXmlApplicationContext. The file is contained within our .ear file underneath APP-INF\classes (since the ear file is targeted for a weblogic 8.1 sp4 container and APP-INF is a directory that Weblogic dynamically loads into its classpath for the ear file, since there is a classloading hierarchy that exist within weblogic ear deployment). The class which is triggering the load is a WebLogic ApplicationLifecycleListener class.

    We're wondering if it's a class loader issue and that we may need to tell Spring which class loader to use when loading the application context. But, it appears as if we cannot pass a class loader when using an application context but have to use a BeanFactory instead.

    Any info appreciated...

  2. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default Re: Can't find the configuration file in WebLogic...

    Quote Originally Posted by anagnost68
    We're wondering if it's a class loader issue and that we may need to tell Spring which class loader to use when loading the application context. But, it appears as if we cannot pass a class loader when using an application context but have to use a BeanFactory instead.
    Spring will use the current thread's context classloader. So setting this should normally be sufficient.

    If this works with WebLogic in this context I do not know, however. Maybe you could try to put your file in another location, like the APP-INF folder directly (not APP-INF/classes)? Maybe the ear's root folder would also be worth a try.

    Regards,
    Andreas

Similar Threads

  1. Saving large files to a db using hibernate?
    By Dan Washusen in forum Data
    Replies: 10
    Last Post: Sep 20th, 2006, 12:18 PM
  2. Beandoc crashing (on its samples!)
    By aaime in forum Container
    Replies: 17
    Last Post: Oct 7th, 2005, 07:21 AM
  3. Replies: 3
    Last Post: Sep 4th, 2005, 11:11 PM
  4. Mysterious Spring Configuration Errors
    By monocongo in forum Container
    Replies: 4
    Last Post: Aug 28th, 2005, 09:29 PM
  5. Replies: 5
    Last Post: Aug 27th, 2004, 07:13 PM

Posting Permissions

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