Lim Hock-Chai skrev den 18-07-2007 21:38:
One of our java program stops working after we upgrade OS from V5R2 to
V5R3 and move the AS400 to our hosting site. The program is getting
Null pointer error when trying to do "new IFSTextFileInputStream".

Below is a clip of the program:
// Retrieve application properties.
String as400UserId = ( String )parameters.get( "-uid" );
String as400Password = ( String )parameters.get( "-pwd" );
String as400System = ( String )parameters.get( "-as400" );
AS400 system = null;
if( ( as400UserId != null ) && ( as400Password != null ) && (
as400System != null ) ) {
system = new AS400( as400System, as400UserId, as400Password );
} else {
system = new AS400();
} Properties props = new Properties(System.getProperties());
IFSFile propertiesFile = new IFSFile( system, propertiesFileName );
IFSTextFileInputStream fis = new IFSTextFileInputStream( system,
propertiesFile, IFSTextFileInputStream.SHARE_ALL );

The question here is how you invoke the program - running locally or remotely?

My guess is that the system variable contains bad information, or that the machine has a different DNS-name than it thinks.

Can you run this inside a debugger....

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.