• Post Reply Bookmark Topic Watch Topic
  • New Topic

Path issue in glassfish 3.1.1 for applicationContext.xml (Spring framework)  RSS feed

 
Jayesh Bhapkar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a properties file 'serviceConfiguration.properties' besides applicationContext.xml.

This properties file defined in applicationContext.xml as,

<property name="propertiesFileName" value="/serviceConfiguration.properties"/>

It works fine for glassfish 2.1, but when I migrate my application to glassfish 3.1.1 I get an error, "file /serviceConfiguration.properties not found"

Complete error :

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationService' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is: file /serviceConfiguration.properties not found.

Thanks,
Jayesh
 
Jayesh Bhapkar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has been class loader issue.
Glassfish is looking first into deployed application's lib folder and then jar outside the lib folder. (In Glassfish v2.1 it was opposite of this)
Any idea how to manage class loading in Glassfish ?

Thanks,
Jayesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!