Dear all,
I have recently been trying to get some Java code to work on our iSeries. It is a simple batch program that generates an Excel spreadsheet and gets called from RPG. Last time I did something like this it was easy and just worked but this one has proved a nightmare. I am setting the classpath in the RPG by setting the relevant environment variable.
So the first problem was a "nosuchmethod" from one of the POI classes. POI is an Apache project for creating MS Office files from Java. POI means Poor Object Interface and the spreadsheet specific one is HSSF Horrible SpreadSheet Format.
I spent ages tracking this down and eventually found an older version of the POI jar knocking around in the following IFS location "/qibm/UserData/Java400/ext". Needless to say this was not set explicitly on my classpath environment variable. Now I happen to know from working with Java on a windows system that the classpath also has a system portion that includes the Java runtime files etc. The only explanation I can think of is that this folder is under the system classpath.
So we got that one working by replacing that POI jar with the new one. One guy here used that POI jar for something else and he seemed to think it came with the machine. The next problem was one of the commons jars. Sure enough a quick search turns up a different version of the common-beanutils jar in this IFS folder "/qibm/ProdData/OS400/Eclipse/plugins/org.eclipse.tomcat_4.1.30".
Now I know for a fact that nobody here would have knowingly installed that jar. It must have been part of some other install. Sure enough removing it solves this problem and everything works.
Has anyone else experienced this rubbish? I can't believe IBM installs are dumping 3rd party libraries like this in a system classpath folder. I'm not even 100% sure I have the right explanation but I cannot see what else it can be. Unfortunately I've not found a way of viewing this system setting.
Anyone else had this?
I have recently been trying to get some Java code to work on our iSeries. It is a simple batch program that generates an Excel spreadsheet and gets called from RPG. Last time I did something like this it was easy and just worked but this one has proved a nightmare. I am setting the classpath in the RPG by setting the relevant environment variable.
So the first problem was a "nosuchmethod" from one of the POI classes. POI is an Apache project for creating MS Office files from Java. POI means Poor Object Interface and the spreadsheet specific one is HSSF Horrible SpreadSheet Format.

I spent ages tracking this down and eventually found an older version of the POI jar knocking around in the following IFS location "/qibm/UserData/Java400/ext". Needless to say this was not set explicitly on my classpath environment variable. Now I happen to know from working with Java on a windows system that the classpath also has a system portion that includes the Java runtime files etc. The only explanation I can think of is that this folder is under the system classpath.
So we got that one working by replacing that POI jar with the new one. One guy here used that POI jar for something else and he seemed to think it came with the machine. The next problem was one of the commons jars. Sure enough a quick search turns up a different version of the common-beanutils jar in this IFS folder "/qibm/ProdData/OS400/Eclipse/plugins/org.eclipse.tomcat_4.1.30".
Now I know for a fact that nobody here would have knowingly installed that jar. It must have been part of some other install. Sure enough removing it solves this problem and everything works.
Has anyone else experienced this rubbish? I can't believe IBM installs are dumping 3rd party libraries like this in a system classpath folder. I'm not even 100% sure I have the right explanation but I cannot see what else it can be. Unfortunately I've not found a way of viewing this system setting.
Anyone else had this?



Comment