Resolving user authentication errors

If a user authentication error occurs after the CaseEventEmitter application is deployed to the application server, pass the appropriate JAAS file to the JVM through the WebSphere® Application Server administration console.

About this task

After the Case event emitter application is deployed to WebSphere Application Server, it might throw exceptions while it tries to communicate with the Content Engine. An error such as the following one is logged and the emitter does not emit any events.
com.filenet.api.exception.EngineRuntimeException: 
FNRCE0040E: E_NOT_AUTHENTICATED: The user is not authenticated. 
Message was: No LoginModules configured for FileNetP8WSI
Such exception is thrown because the required JAAS configuration file that contains the login module is not found in the application server, as shown in the following code sample.
com.ibm.oi.icm.event.emitter.IcmOiEmitter run Exception during processing java.lang.RuntimeException: com.filenet.api.exception.EngineRuntimeException: FNRCE0040E: E_NOT_AUTHENTICATED: The user is not authenticated. Message was: No LoginModules configured for FileNetP8WSI
                                 java.lang.RuntimeException: com.filenet.api.exception.EngineRuntimeException: FNRCE0040E: E_NOT_AUTHENTICATED: The user is not authenticated. Message was: No LoginModules configured for FileNetP8WSI
	at com.ibm.oi.icm.event.emitter.IcmSourceInput.setup(IcmSourceInput.java:272)
	at com.ibm.oi.icm.event.emitter.IcmSourceInput.configureFromJson(IcmSourceInput.java:168)
	at com.ibm.oi.icm.event.emitter.IcmConfigurationProvider.getInput(IcmConfigurationProvider.java:371)
	at com.ibm.oi.icm.event.emitter.IcmConfigurationProvider.getEnabledInputs(IcmConfigurationProvider.java:389)
	at com.ibm.oi.icm.event.emitter.IcmOiEmitter.run(IcmOiEmitter.java:81)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:319)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:191)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.lang.Thread.run(Thread.java:811)
Caused by: com.filenet.api.exception.EngineRuntimeException: FNRCE0040E: E_NOT_AUTHENTICATED: The user is not authenticated. Message was: No LoginModules configured for FileNetP8WSI
	at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:131)
	at com.filenet.api.util.UserContext.createSubject(UserContext.java:304)
	at com.ibm.oi.icm.event.emitter.IcmSourceInput.newCeConnection(IcmSourceInput.java:679)
	at com.ibm.oi.icm.event.emitter.IcmSourceInput.setup(IcmSourceInput.java:267)
	... 11 more
Caused by: javax.security.auth.login.LoginException: No LoginModules configured for FileNetP8WSI
	at javax.security.auth.login.LoginContext.init(LoginContext.java:267)
	at javax.security.auth.login.LoginContext.<init>(LoginContext.java:420)
	at com.filenet.apiimpl.core.UserPasswordToken$1.run(UserPasswordToken.java:151)
	at java.security.AccessController.doPrivileged(AccessController.java:696)
	at com.filenet.apiimpl.core.UserPasswordToken.getPrivilegedLoginContext(UserPasswordToken.java:156)
	at com.filenet.apiimpl.core.UserPasswordToken.getSubject(UserPasswordToken.java:112)
	... 14 more

Procedure

  1. Create a text file with the following content and save it as the jaas.conf.emitter file.
    FileNetP8WSI {
        com.filenet.api.util.WSILoginModule required;
    };
  2. Through the WebSphere Application Server administration console, pass this JAAS file as an argument to the Java™ virtual machine (JVM).
    1. Browse to Servers > Server Types > Websphere application servers > [your server name] > Java and Process Management > Process definition > Java Virtual Machine.
    2. Under Generic JVM arguments, add the following line.
      -Djava.security.auth.login.config=PathToYourJAASConfigFile/jaas.conf.emitter
  3. Restart the application for the changes to take effect.