We are running Websphere 8.5 in an AIX 7.1 platform. We had someone inadvertently delete a bunch of files from the /etc directory in AIX. We did not have a system backup this is a non-production region. We restored the deleted files from another non-production system but our websphere app is now throwing the following error in one of the application interfaces:
java.lang.ClassCastException: com.ibm.ws.naming.jndicos.CNContextImpl incompatible with org.omg.CORBA.portable.ObjectImpl
Trying to get of what of what this error means and how to possibly fix it. Not understanding what file in the /etc or any subdirectory plays a part with Websphere. Sorry if this is the incorrect forum for this possibly this is more of an AIX question.
It looks like a version problem to me. The version of com.ibm.ws.naming.jndicos.CNContextImpl which you used to have before the unfortunate inadvertent deletion must have been compatible with the class org.omg.CORBA.portable.ObjectImpl, which is part of the standard Java API. And the version which you have now is not compatible, and therefore it's different than what you had before.
So it looks like the other non-production system, the one which didn't have the unfortunate incident, was not identical to the one which did have the incident. Different Websphere version? Websphere running on different Java JVM?
How to fix the problem? It looks to me like somebody put the Websphere jar which contains that CNContextImpl class into the /etc directory. (I will let people who know about AIX and other Unix versions comment on that.) This would have to be the jar which matches the version of Websphere which you're running on the damaged system. Sorry, I don't know what jar that would be or where you would get it from.
Exam 1Z0-810: Upgrade to Java SE 8 Programmer Study Guide and Quiz Exam 1Z0-817: Upgrade OCP Java 6, 7 and 8 to Java SE 11 Developer Study Guide
posted 6 months ago
Thanks for the replies,
The Webshpere/AIX versions are the same for both systems but they run on separate LPARS so different Websphere JVMs. Wondering if there is some file encryption in some /etc/* file that is unique to the separate AIX boxes regarding WebSphere. It's odd only a small part of the application throws the java.lang.ClassCastException error everything else functions normally. I will see if i can find and search for class CNContextImpl in the .jar files Mikalai referenced.
Thanks I truly am a 'greenhorn' here appreciate the help.
posted 6 months ago
Have not been able to find any .jar files in the /etc directory so it's still a mystery to me why the app is throwing the java.lang.ClassCastException: com.ibm.ws.naming.jndicos.CNContextImpl incompatible with org.omg.CORBA.portable.ObjectImpl error. If anyone with Unix/AIX experience has any ideas please let me know. None of the /etc sub-directories and files were deleted only regular files and links in the /etc dir.
I'm not an expert, but this looks like a naming issue. There might have been a configuration file in the /etc folder that specified what implementation to use for the ObjectImpl class. Now that it's gone, a different lookup is used, which is not compatible.