ervice=security. Unable to deserialize the Subjects in this Context, cause: The user is from a foreign realm, defaultWIMFileBasedRealm, and this foreign realm is not trusted. Current realm is ABCRealm

Exceptions:

[8/8/16 10:30:33:129 AEST] 000000f6 J2EEContext E CWWAB9999E: Unexpected Exception Occurred: com.ibm.websphere.asynchbeans.SerialDeserialException: Exception while deserializing a saved service. Service=security. Unable to deserialize the Subjects in this Context, cause: The user is from a foreign realm, defaultWIMFileBasedRealm, and this foreign realm is not trusted. Current realm is ABCRealm
at com.ibm.ws.asynchbeans.J2EEContext.setSavedServicesFromBytes(J2EEContext.java:1941)
at com.ibm.ws.asynchbeans.J2EEContext.readObject(J2EEContext.java:1534)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1140)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2000)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1901)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1433)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:429)
at com.ibm.ws.asynchbeans.ExecutionContextImpl.readObject_PAE(ExecutionContextImpl.java:290)
at com.ibm.ws.asynchbeans.ExecutionContextImpl.access$100(ExecutionContextImpl.java:52)
at com.ibm.ws.asynchbeans.ExecutionContextImpl$PAEReadObject.run(ExecutionContextImpl.java:347)
at com.ibm.ws.asynchbeans.ExecutionContextImpl$PAEReadObject.run(ExecutionContextImpl.java:338)
at java.security.AccessController.doPrivileged(AccessController.java:456)
at com.ibm.ws.asynchbeans.ExecutionContextImpl.readObject(ExecutionContextImpl.java:185)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1140)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2000)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1901)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1433)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:429)
at com.ibm.ws.scheduler.ByteSerializationUtils$1.run(ByteSerializationUtils.java:240)
at java.security.AccessController.doPrivileged(AccessController.java:456)
at com.ibm.ws.scheduler.ByteSerializationUtils.getObjectFromBytes(ByteSerializationUtils.java:236)
at com.ibm.ws.scheduler.ByteSerializationUtils.getObjectByIDAndVersion(ByteSerializationUtils.java:522)
at com.ibm.ws.scheduler.ThreadContextHolder.setBytes(ThreadContextHolder.java:202)
at com.ibm.ws.scheduler.ByteSerializationUtils.getObjectFromBytes(ByteSerializationUtils.java:250)
at com.ibm.ws.scheduler.TaskInfoBinaryData.getThreadContextHolder(TaskInfoBinaryData.java:580)
at com.ibm.ws.scheduler.AbstractTask.getThreadContextHolder(AbstractTask.java:1101)
at com.ibm.ws.scheduler.AlarmListener.fireTask(AlarmListener.java:1413)
at com.ibm.ws.scheduler.AlarmListener.fired(AlarmListener.java:1334)
at com.ibm.ws.asynchbeans.AlarmImpl.callListenerMethod(AlarmImpl.java:427)
at com.ibm.ws.asynchbeans.timer.GenericTimer.run(GenericTimer.java:228)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:267)
at java.security.AccessController.doPrivileged(AccessController.java:400)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1165)
at com.ibm.ws.asynchbeans.AlarmImpl.runListenerAsCJWork(AlarmImpl.java:249)
at com.ibm.ws.asynchbeans.am._Alarm.fireAlarm(_Alarm.java:340)
at com.ibm.ws.asynchbeans.am._Alarm.run(_Alarm.java:237)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: java.io.IOException: Unable to deserialize the Subjects in this Context, cause: The user is from a foreign realm, defaultWIMFileBasedRealm, and this foreign realm is not trusted. Current realm is ABCRealm
at com.ibm.ws.security.context.ContextImpl.readObject(ContextImpl.java:1225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1140)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2000)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1901)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1433)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:429)
at com.ibm.ws.asynchbeans.J2EEContext.setSavedServicesFromBytes(J2EEContext.java:1906)
… 44 more
Caused by: com.ibm.websphere.security.WSSecurityException: The user is from a foreign realm, defaultWIMFileBasedRealm, and this foreign realm is not trusted. Current realm is ABCRealm
at com.ibm.ws.security.context.ContextImpl.doLogin(ContextImpl.java:814)
at com.ibm.ws.security.context.ContextImpl.deserializeSubjects(ContextImpl.java:1266)
at com.ibm.ws.security.context.ContextImpl.readObject(ContextImpl.java:1203)
… 54 more

 

Resolved:

After change your default realm, you need to register the scheduler to pick up new realm:

/opt/IBM/WebSphere/wp_profile/ConfigEngine/ConfigEngine.sh reregister-scheduler-tasks -DPortalAdminId=wpsadmin -DPortalAdminPwd=<password> -DWasPassword=<password>

  •  
  •  
  •  
  •  

Viet Luu has written 206 articles

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

We are thankful for your never ending support.

Leave a Reply