Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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


Not applicable

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
0 Replies


Not applicable

Same problem , can't load hibernate.cfg.xml in component.jar


Level 4


Use full class name, following syntax works well:

InputStream is = cz.livecycle.MyClass.class.getResourceAsStream("/");

--- Jaroslav