ClassCastException because of ClassLoader

Issue

You get a ClassCastException while trying to read a previously loaded object. You have a compiled class under /apps/abc/classes. You load an object from this class into the session by using your servlet which is also compiled in /apps/abc/classes. Then, you try to read the loaded object in a JSP from /apps/abc/components/examplecomponent.

Solution

Place your class file into a higher level in the classloader hierarchy. See docs.day.com for detailed classloader description.

Additional information

This issue is possibly the result of a classloader issue. The object loaded in the first place is not visible in the second place.

 Adobe

Daha hızlı ve daha kolay yardım alın

Yeni kullanıcı mısınız?

Adobe MAX 2024

Adobe MAX
Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi

Adobe MAX

Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi

Adobe MAX 2024

Adobe MAX
Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi

Adobe MAX

Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi