Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassCastException: Error in the WAR

 
Kshitiz Agarwal
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am facing a problem while retrieving objects from a list obtained from another package.



This is the code of my com.infosys.ingreen.middleware.service.DeviceService class:



And this is middleware-dao.xml:



Now I know the problem is because of different class loaders. Now the thing is all the classes are in the same WAR, so same classloader should be used. What I assume is may be Spring is using its own class loader SimpleLoadTimeWeaver to load DeviceDao class. If that is the issue, then how can I resolve it? Otherwise what can be the problem??
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you even have the loadTimeWeaverBean? It isn't needed.

Anyway, is the domain object on two different JVMs? Maybe each has a different compiled version.

Mark
 
Kshitiz Agarwal
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Spritzler wrote:Why do you even have the loadTimeWeaverBean? It isn't needed.

Anyway, is the domain object on two different JVMs? Maybe each has a different compiled version.

Mark


Thanks for the reply....If I remove loadTimeWeaver..then this error comes...



And also, the whole project is in one workspace, in one machine. The domain object is in different package though.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic