Today I was working on my program and I got this error.
Caused by:java.lang.ClassCastException: org.cubeville.blocks.CrossedBlockBrush cannot be cast to org.cubeville.blocks.DefaultBlockBrush
My program is in Java of course. It uses lwjgl and slick. I was wondering what might cause this and if there is a for sure fix.
Thank You
First check that
DefaultBlockBrushis indeed a supertype ofCrossedBlockBrush. If it’s not, then the cast is simply illegal. Check whether you’re using the same version of your library for both compiling and running; perhaps this relationship holds for one but not the other.If
DefaultBlockBrushis indeed a supertype ofCrossedBlockBrush, then you the only way you could get this kind of message would be ifCrossedBlockBrushandDefaultBlockBrushwere loaded by two different class loaders. This kind of thing can happen in a badly configured web application, or an application based on some other component-based system with multipleClassLoaders like OSGi.