There is a vulnerability in the third-party component used by Android APP. After rectification, an error is reported: ava.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/Color;

Recently, the company’s app was detected to use third-party components containing vulnerabilities and needs to be rectified. Record: some problems encountered during the rectification process and their solutions. 1. The component commons-net-3.3.jar has a vulnerability CVE-2021-37533. According to the official website announcement, just upgrade to 3.10.0 or above. build.gradle under app implementation ‘commons-net:commons-net:3.10.0’ Apache official […]

hibernate.validator.constraints.NotEmpty error when verifying request parameters java.lang.NoClassDefFoundError: javax/el/PropertyNot…

In the spring maven project, use hibernate validator to annotate the input parameter object of the formal verification method. hibernate-validator version: 5.0.2.Final validation-api version: 1.1.0.Final There is an attribute named order_time in the model class annotated with @NotEmpty: package com.emax.paycenter.dto.external; import org.hibernate.validator.constraints.NotEmpty; import org.hibernate.validator.constraints.URL; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import java.io.Serializable; /** * Scan QR code […]

Exception in thread “main” java.lang.NoClassDefFoundError: javax/servlet/Filter occurs in springboot project

(Please delete the content in brackets when reprinting) The following problems were encountered during the learning process: Exception in thread “main” java.lang.NoClassDefFoundError: javax/servlet/Filter at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) […]

[BUG][jnativehook][JRE]java.lang.NoClassDefFoundError: java/util/logging/Logger

About the bugs encountered in a certain software update and the resolution process Article directory About the bugs encountered in a certain software update and the resolution process 1. Situation description 2. Error situation analysis 3. Possible error analysis 4. Summary and reflection 1. Situation description Recently I developed a relatively simple java GUI program, […]

How to solve ClassNotFoundException, NoClassDefFoundError and ExceptionInitializerError

1. ClassNotFoundException 1. Introduction ClassNotFoundException is a checked exception. Thrown when the application attempts to load a class by its string name, but a class with the specified name is not found in the classpath. Generally occurs in Class.forName(String), ClassLoader.findSystemClass(String), ClassLoader.loadClass(String, boolean) 2. Common reasons The essence of this exception is: there is no classes […]

java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException hibernate-validator

Scenario: add in the project implementation ‘org.hibernate:hibernate-validator:5.1.1.Final’ Add request parameter validation: entity: @Data @ApiModel(value = “Client Details”) public class ClientDetailsDTO { @NotEmpty @ApiModelProperty(“client id”) private String clientId; @ApiModelProperty(“Client key”) private String clientSecret; } @PostMapping(“/authClient/create”) @ApiOperation(value = “Add client configuration data”, httpMethod = “POST”, response = Object.class) public void createCodeType(@Validated @RequestBody ClientDetailsDTO details) { clientService.create(details); } […]

Where did NoClassDefFoundError/ClassNotFoundException refer to this class? Troubleshoot ideas

1. Background The company’s intranet login is transformed and upgraded, and the user needs to cooperate with upgrading the jar package. I thought it was a very simple thing, and the upgraded version went online and it was OK. I didn’t expect to upgrade the first service, and there would be problems deploying to the […]

java.lang.NoClassDefFoundError_org_springframework_boot_bind_RelaxedPropertyResolver

Unusual question: Let’s look at the problem first. Today I want to copy the project with druid before to a new project, but this problem has appeared inexplicably, which is very strange! java.lang.NoClassDefFoundError: org/springframework/boot/bind/RelaxedPropertyResolver at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getExcludeAutoConfigurationsProperty(AutoConfigurationImportSelector.java:205) ~[spring-boot-autoconfigure-1.5.22.RELEASE.jar:1.5.22.RELEASE] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getExclusions(AutoConfigurationImportSelector.java:199) ~[spring-boot-autoconfigure-1.5.22.RELEASE.jar:1.5.22.RELEASE] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.selectImports(AutoConfigurationImportSelector.java:96) ~[spring-boot-autoconfigure-1.5.22.RELEASE.jar:1.5.22.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser$DefaultDeferredImportSelectorGroup.process(ConfigurationClassParser.java:888) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:874) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE] So I checked on the Internet, […]

Error creating bean and java.lang.NoClassDefFoundError: com/baomidou/mybatisplus caused by MyBatis-Plus importing dependencies

Records of some problems with mybatis-plus. Question Error Screenshot 2023-06-05 14:42:46.180 ERROR 24512 — [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘sysRoleController’: Unsatisfied dependency expressed through field ‘sysRoleService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyEx ception: Error creating bean with name ‘sysRoleServiceImpl’: Unsatisfied dependency expressed through field ‘baseMapper’; nested exception is org.springframework.beans.factory.BeanCreationException: […]

java.lang.NoClassDefFoundError: Could not initialize class org.a*.poi.xssf.model.SharedStringsTable

Exception You need to add dependency of ‘poi-ooxml’ to your project, and version >= 3.17 cn.hutool.core.exceptions.DependencyException: You need to add dependency of ‘poi-ooxml’ to your project, and version >= 3.17 at cn.hutool.poi.excel.ExcelUtil.getReader(ExcelUtil.java:310) at cn.hutool.poi.excel.ExcelUtil.getReader(ExcelUtil.java:261) at c.h.u.a.c.UC.impoetFile(UC.java:306) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792) […]