Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

ClassCastException

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We are getting a an error that is ClassCastException for the same class. that is java.lang.ClassCastException: package1.AdminTableBean incompatible with package1.AdminTableBean.
What could be the reason for same class being non castable. In this senario we are getting the class(package1.AdminTableBean ) from EJB method (Local)and casting it to (package1.AdminTableBean )

Thanks in advance.

Arivarasu
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This could happen when there are multiple classloaders in the system. WebLogic probably uses a separate classloader for the EJB tier and for other tiers in your web application. I don't know the details of how this works, and don't really know how to solve it...
 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried restarting the server? Hot deployment without a full restart sometimes creates this error.
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes try to rebuild and restart your server. I have also seen this problem with weblogic.
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic