Hi All,

I have the below piece of code which is invoked from the static block of our EJB. 0ur EAR is deployed in IBM WAS4 servers. From the past few months the below code is failing at NativeFontWarapper.regsiterFonts while registering fonts(ttf files). Could any one please help in knowing why this piece is getting failed and what are the alternatives.

static Vector vector2 = new Vector();
static {
vector2.add(new Vector());
}
public Initializer() {
init();
}


private static void addPathFonts(String s, FilenameFilter filenamefilter, int i) {
File file = new File(s);
String as[] = file.list(filenamefilter);
if (as == null) {

return;
}
for (int j = 0; j < as.length; j++) {
File file1 = new File(file, as[j]);
String s1 = null;
try {
s1 = file1.getCanonicalPath();
}
catch(IOException ex) {
s1 = file1.getAbsolutePath();
}
Vector vector = new Vector(1);
vector.addElement(s1);

//NativeFontWrapper.registerFonts(vector, 1, vector2, i, false);
NativeFontWrapper.registerFonts(vector, 1, vector2, i);
}