Menu

#462 Missing native implementation of AS400Credential

Sign-on
closed
nobody
None
5
2022-07-06
2022-03-03
Peter Gurov
No

It seems that ProfileTokenCredential.swap() doesn't work even when running natively (on IBM i). According to the documentation:
Note: swap() is supported only when running natively on IBM i. It is unsupported as a remote operation.

However I get the following exception:

 com.ibm.as400.security.auth.SwapFailedException: Request is not supported.                                   
         at com.ibm.as400.security.auth.AS400CredentialImplRemote.swap(AS400CredentialImplRemote.java:193)    
         at com.ibm.as400.security.auth.AS400Credential.swap(AS400Credential.java:1193)                       
         at AS400SwapProfileTest.main(AS400SwapProfileTest.java:28)                                           

It is strange that in the call stack there is AS400CredentialImplRemote class. In jt400.jar I cannot find native implementation of the AS400Credential. Not even in jt400Native.jar.

AS400Credential.implClassNameNative() returns allways null:

  String implClassNameNative()
   {
      return null;
   }

Where can I find the jar file with the native implementation so that the swap() works?

Discussion

  • John Eberhard

    John Eberhard - 2022-07-06

    You need to use the jt400Native.jar file that is shipped on the system. It is available in the following locations.

    /qibm/proddata/os400/jt400/lib/java6/jt400Native.jar
    /qibm/proddata/os400/jt400/lib/java8/jt400Native.jar
    /qibm/proddata/os400/jt400/lib/java9/jt400Native.jar
    /qibm/proddata/os400/jt400/lib/jt400Native.jar

    When using the swap support, you need to make sure your application is single-threaded, as the swap function applies to the entire job (not just the current thread).

     
  • John Eberhard

    John Eberhard - 2022-07-06
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB