I am facing some troubles while trying to create an IFSFile using IFSFile object from JT400.jar. The problem that I am facing is when the process that calls the JAVA is called by a BATCH user(without login enabled into AS400 machine).
Exception given
Password is *NONE.:XXXXXX com.ibm.as400.access.AS400SecurityException: Password is *NONE.:XXXXXX at com.ibm.as400.access.AS400ImplRemote.returnSecurityException(AS400ImplRemote.java:2219) at com.ibm.as400.access.CurrentUser.getUserInfo(CurrentUser.java:79) at com.ibm.as400.access.AS400ImplRemote.getPassword(AS400ImplRemote.java:1411) at com.ibm.as400.access.AS400ImplRemote.signon(AS400ImplRemote.java:2507) at com.ibm.as400.access.AS400.sendSignonRequest(AS400.java:3351) at com.ibm.as400.access.AS400.promptSignon(AS400.java:2938) at com.ibm.as400.access.AS400.signon(AS400.java:4246) at com.ibm.as400.access.AS400.connectService(AS400.java:1336) at com.ibm.as400.access.IFSFile.chooseImpl(IFSFile.java:630) at com.ibm.as400.access.IFSFile.copyTo(IFSFile.java:729) at com.ibm.as400.access.IFSFile.copyTo(IFSFile.java:699)
Code used:
AS400 as400 = new AS400("localhost");
//Obtain the template path
String templatePath ="/HOME/XXX/auth.txt";
IFSFile templateAuth = new IFSFile(as400,templatePath);
templateAuth.copyTo(fileXML + ".xml");
I have check some opened threads but no results obtained. (find below the threads commented)
JT400 Read File From IFS with user without password
Java IFSFile on Iseries testing over PC
There is any option to generate an IFSFile when the process is called by a BATCH user(note that when the process is called by a user with login enabled, the process is working as expected)
I need something similar to what is done when a JDBCAppender is created, JDBCAppender object allows setUser(null) and setPassword(null) to enable batch users to write into a table.
Thanks all!