Tagged articles
6 articles
Page 1 of 1
JD Tech
JD Tech
Aug 8, 2024 · Backend Development

Resolving JaCoCo-Induced ClassCastException Caused by Synthetic $jacocoData Field in Java Applications

This article details a Java ClassCastException caused by JaCoCo’s injected $jacocoData boolean array, explains how synthetic fields arise during bytecode instrumentation, analyzes the failing encryptObject method, and presents a fix by filtering synthetic fields using isSynthetic() to restore normal order processing.

ClassCastExceptionJaCoCoReflection
0 likes · 11 min read
Resolving JaCoCo-Induced ClassCastException Caused by Synthetic $jacocoData Field in Java Applications
JD Cloud Developers
JD Cloud Developers
Mar 21, 2024 · Backend Development

Why BeanUtils.copyProperties Causes ClassCastException and How to Fix It

A Java backend debugging story explains how using BeanUtils.copyProperties led to a ClassCastException when a HashMap was cast to a custom class, details the investigation steps, shows the problematic code, and presents a manual assignment solution plus recommendations for safer mapping tools.

BeanUtilsClassCastExceptionCopyProperties
0 likes · 4 min read
Why BeanUtils.copyProperties Causes ClassCastException and How to Fix It
Ziru Technology
Ziru Technology
Aug 29, 2019 · Backend Development

Why Spring Boot Devtools Triggers ClassCastException and How to Fix It

This article explains why adding spring-boot-devtools can trigger a ClassCastException due to its dual classloader mechanism, demonstrates how to reproduce the issue in a Maven multi‑module project, and provides two practical solutions: customizing the RestartClassLoader or removing the devtools dependency.

ClassCastExceptionDevToolsDubbo
0 likes · 13 min read
Why Spring Boot Devtools Triggers ClassCastException and How to Fix It