Announcement Announcement Module
Collapse
No announcement yet.
Can't find the configuration file in WebLogic... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Re: Can't find the configuration file in WebLogic...

    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

    Comment

    Working...
    X