• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

java.lang.ClassCastException  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Any help much appreciated.
 
Marshal
Posts: 24468
55
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul, welcome to the Ranch!

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.
 
Rancher
Posts: 3516
34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the class in several JARs (WAS 8.5.5)
WAS_CNContextImpl.png
[Thumbnail for WAS_CNContextImpl.png]
 
Paul Schuler
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Schuler
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.




 
Saloon Keeper
Posts: 10230
216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Maybe this page will help: https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/crun_app_bindings.html

I'm just spitballing here, and I don't know if it will put you on the right path. At least you can check if there are any files ending with -bnd.xml in the /etc folder of any of the systems.
 
Paul Clapham
Marshal
Posts: 24468
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:I'm not an expert...



At this point in time I would have activated my support contract and IBM would have been on the case. But maybe that isn't an option for Paul.
 
Don't touch me. And dont' touch this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!