• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Spring Configuration file Weblogic

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a ejb project(ejb.jar) in ear file which looks for a spring.xml (Spring configuation file) from an session bean. The spring configuation file is located in app-inf/classes/spring.xml when i use this relative path.The spring framework is not able to get a hold of the file and i get org.springframework.beans.factory.BeanDefinitionStoreException: IOException pars
java.io.FileNotFoundException: spring.xml
The trouble is with weblogic when it deploys the ear it does so in a weird named folder like C:\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\myapplication\xtwx3d\APP-INF\classes
and configuation file will be looked at from
C:\bea\user_projects\domains\base_domain\servers\AdminServer\app-inf/classes/spring.xml and i.e the i get a filenotfoundexception. Can any please tell me how to go about the problem. how to give relative path in weblogic ? for files from your Jar.

Thanks in advance.
 
seshu Palamanti
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks every body i have resolved this issue,The trouble was with
Class FileSystemXmlApplicationContext which i was using with name of the file.Class FileSystemXmlApplicationContext wasnt able to resolve relative path of the config file. Now i Have changed that to
ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");

This one looks at the classpath and resolves i guess.
 
reply
    Bookmark Topic Watch Topic
  • New Topic