cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing a file from a jar inside an adapter module

Former Member
0 Kudos

Hi folks,

I have some problems accesing an xml-file inside my jar (inside the ear) in an adapter module.

I do use some library (my own) to do some special jco-calls. The jco-configuration (system connection data) is stored inside the jar as an xml. I can use this library without any problems in a message mapping, it works like a charm.

But when I call the library from an adapter module (the library is linked into the ear) the returned resource is just null. I'm using getResourceAsStream.

Do I have to configure the EAR-file in a special way to make this work?

Kind regards,

Joscha Metze

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi

try the following and see if they work

classLoader.getResourceAsStream(com/test/myconfig.xml)

class.getResourceAsStream(/com/test/myconfig.xml)

or if your class is from the com.test package you can just put

class.getResourceAsStream(myconfig.xml)

Regards

krishna