Spring/99.Error

JDK 11에 java.xml.bind 관련 에러 발생 Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext build.gradle 에서 implementation ‘javax.xml.bind:jaxb-api’ 추가 참고 : https://luvstudy.tistory.com/61#recentComments JDK 11에서 java.xml.bind 관련 에러 발생하는 경우 JDK 9나 10에서 프로젝트 실행 시 아래와 같은 오류가 나게 되는 경우가 있다. Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext Java EE 모듈과 CORBA 모듈이 Depre..
서버 실행시 ASM ClassReader failed to parse class file 에러라면서 java파일 하나가 빌드가 안된다고 한다. 그래서 확인해보니 jdk 버전이랑 Spring 버전의 문제인듯 하다 현재 JDK 17, Spring Boot 2.4.1 Spring Boot 3.x 버전에선 17이 필수라고 한다. 근데 2.4.1 버전에서 17을 쓰려고 해서 오류가 난듯 하여 JDK 버전을 11로 낮추었다. preperence에서 Java Compiler에서 11 version으로 바꾸고 Build Tools>Gradle>JVM 을 11로 낮추었다.
현재 Intellij에 Spring Boot를 사용하여 Gradle 환경에서 빌드를 할 경우 아래와 같은 오류가 발생한다. 현재 환경은 Spring Boot 2.4.1 버전 JDK 17 버전 gradle-8.2.1 버전 이다. 프로젝트를 생성하자 마자 오류가 발생한다. 해결방법 gradle/wrapper/gradle-wrapper.properties 파일에서 버전은 다운그레이드 해준다. distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip 8.3.1 -> 7.3.1 왜 그런지 모르나 Spring Boot 버전과 Gradle 버전에서의 연동 문제인듯 하다...아닌가
Ex) failed to lazily initialize a collection of role: com.test.jpa.jpaProj.domain.Publisher.books, could not initialize proxy - no Session org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.test.jpa.jpaProj.domain.Publisher.books, could not initialize proxy - no Session at app//org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyI..
Console warning: @Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. If it is not supposed to be settable during building, make the field final. private List userHistories = new ArrayList(); ^ 1 warning User.java @OneToMany(fetch = FetchType.EAGER) @JoinColumn(name="user_id", insertable = false, updatable =..
에러 배경 : Controller 테스트 코드 작성 중 다음과 같은 에러를 만남. Controller @RestController public class HelloController { @GetMapping("/helloStart") public String helloStart(){ return "hello spring"; } } Test @WebMvcTest class HelloControllerTest { @Autowired private MockMvc mockMvc; @Test void helloStart() throws Exception{ mockMvc.perform(MockMvcRequestBuilders.get("/helloStart")) .andDo(print()) .andExpect(sta..
defxyj
'Spring/99.Error' 카테고리의 글 목록