以下は耳の構造です
ex.耳 | | |_lib-util.jar --CommonUtil.class、CommonException.class など | | | | | | ejb.jar web.war
CommonUtil.map(empDto)
WEB および EJB 層クラスでこの () のような特定のクラスを呼び出すと、 NoClassDefFoundError
. Util.jar にある残りのすべてのクラスはすべて正常に呼び出されます。このクラスでのみこのエラーが発生するのはなぜですか?
EmployeeDTO empDto = new EmployeeDTO();
empDto.setId(1);
empDto.setName("john");
CommonUtil.map(empDto);
public class CommonUtil {
private static Mapper mapper = new BeanMapper();
private static CommonUtil instance = new CommonUtil();
private CommonUtil() {
super();
}
public static <T> T map(Object source) {
T target = mapper.map(source);
return target;
}
public static <T> T map(Object source) {
mapper.map(source);
return target;
}
}