JBoss EAP 5.1.0 classloading issues with Apache POI libraries
bsabathil Sep 21, 2012 10:19 AMHi guys,
We are having an issue with Apache POI libraries in JBoss EAP 5.1.0 which do not seem to be loaded.
However, this works on the one environment and on another environment, it does not.
Following problem:
Basically, we included libs:
- poi-3.2-FINAL-20081019.jar
- poi-contrib-3.2-FINAL-20081019.jar
- poi-scratchpad-3.2-FINAL-20081019.jar
into our product we are deploying onto JBoss as a war file into the server/default/deploy dir.
The POI libs are included to load an Excel spreadsheet from the filesystem into the application using all the HSSF stuff and classes.
Now the problem where we are currently left in the dark is the following:
JBoss EAP is installed on my local machine for testing purposes the same way as at our customer. Everyhting works on my local env and on the customer env it does not.
The only differences we could think of are:
- the machines with OS themselves:
--> local install is on Windows 7 Enterprise 64bit with JDK 1.6.0_27 64 bit
--> customer install is a server machine with Windows Server 2008 64 bit and JDK 1.6.0_27 64 bit
- user accounts logged in:
--> local user has admin rights and domain rights
--> server user at customer has local admin rights without domain rights
- virtualization vs. physical
--> local machine is physical install
--> server machine at customer uses virtualization with VMWare
But JBoss installation itself and settings are identical (unless we have overseen something but we double-checked it).
When the exact same war file is deployed on both JBoss instances and it comes to Excel import from within the running application, the POI libs are there on my local env and import works but we get an exception on the server machine where libs did not seem to be loaded ( see extract below).
When I delete the POI libs on my local and deploy the war file without them, I get this exact same error as you would expect.
================
"org.apache.poi.hssf.usermodel.HSSFSheet" ist kein gültiger Typ. [line:4 col:36] in
line 3: uses gw.transaction.Bundle
line 4: uses org.apache.poi.hssf.usermodel.HSSFSheet
line 5: uses java.io.FileInputStream
Line Number: 4 Column: 36
"org.apache.poi.hssf.usermodel.HSSFWorkbook" ist kein gültiger Typ. [line:6 col:36] in
line 5: uses java.io.FileInputStream
line 6: uses org.apache.poi.hssf.usermodel.HSSFWorkbook
line 7: uses org.apache.poi.hssf.usermodel.HSSFRow
Line Number: 6 Column: 36
"org.apache.poi.hssf.usermodel.HSSFRow" ist kein gültiger Typ. [line:7 col:36] in
line 6: uses org.apache.poi.hssf.usermodel.HSSFWorkbook
line 7: uses org.apache.poi.hssf.usermodel.HSSFRow
line 8: uses java.lang.Integer
Line Number: 7 Column: 36
"HSSFSheet" ist kein gültiger Typ. [line:21 col:17] in
line 20:
line 21: var sheet : HSSFSheet
line 22: var myxls = new FileInputStream(fileLocation);
Line Number: 21 Column: 17
=============
Now my question is:
Can anyone think of anything that needs to be done here in terms of classloading or elsewhere?
Could there be a reason why there might be a difference between the two setups?
We could figure out that the POI libs are actually there in the server/default/tmp directory on both machines after startup, but just accessible from the local one.
Thanks a lot in advance for any hints on this!
Cheers,
Bernd