cancel
Showing results for 
Search instead for 
Did you mean: 

XI imported archive issue

Former Member
0 Kudos

I have an following issue: there is an XSTL + Java archive that is imported into XI to perform some mapping task (XSL transformation with calls to Java methods). Beside XSL and class files, this archive contains some property files needed by Java classes.

The exact problem is that Java classes can not read these property files (file not found exception). My assumption is that XI internally stores archive somewhere into a database (search for property files throughout file system did not give any results) ?

Does anybody have similar experience ?

Archive looks like:

com/.../A.class

B.properties

C.xsl

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

How are you reading tjhe Properties file?

What I mean to ask here is ,

1. Is the properties file stored on the XI server and are you giving the path in the Java Class ( hard coded path ) to read hte proprty file using Java IO.

2 Or, is the Property File bundled along with the Imported Archive in the .jar file and you are using the getResource() method?

If 1 --> make sure that the Path is correct, the file is available and the foder in which the file is available has a 777 authorization.

If 2--> make sure that the filename etc in the code are correct.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Thanx for the fast answer.

This is an issue about bundled property file within jar archive. I have just tried your tip about getResource but, unfortunately, it did not help. Outside XI it works.

Regards

Jurica

Former Member
0 Kudos

Hi Bhavesh,

I played a little bit more according to your advice and I succeeded to make it work.

Thanx again and regards

Jurica

henrique_pinto
Active Contributor
0 Kudos

Use the getResourceAsStream() method.

Also, if you are using XML parsing to read the properties file, you should consider implementing an EntityResolver class.

Regards,

Henrique.

Answers (0)