2 Replies Latest reply on Sep 15, 2011 9:26 AM by Jaroslav Pavlicek

    Reading property file from within Component's jar file- LiveCycle Classloader problem

    Level 1

      I have made component that uses libraries and properties files. I packaged it in jar and deployed it successfully into the LiveCycle server (Jboss Turnkey installation) using workbench.I made process,forms and get my form to invoke my component's service successfully. Everything is working fine except that I am getting problem when my service is reading the property file that I include at root of the jar file of component.
      I am using following code to read the property file which is not working:

      b Thread.currentThread().getContextClassLoader().getResourceAsStream(PROPERTIES_FILE);

      However When I use following code then it get worked:

      b this.getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);

      I think there this is due to the reason that LiveCycle ClassLoader might have different classpath.

      I am stuck at this error as I am using third party APIs like hibernate that uses the first one methodology and I don't want to make changes into third party source codes to just make them run.

      I would very thankful to you if you could provide help.

      Thanks and Regards
      Imam Raza
      Senior Architect
      Folio3 pvt Ltd