[Spring Boot][오류해결] Executing an update/delete query
·
JAVA/오류해결
스프링 부트를 사용할 때 네이티브 쿼리를 통해 JPARepository를 다루는 경우가 있다. 그런데 아래와 같은 오류가 발생할 때가 있다. Resolved [org.springframework.dao.InvalidDataAccessApiUsageException: Executing an update/delete query; nested exception is javax.persistence.TransactionRequiredException: Executing an update/delete query] TransactionRequiredException이 발생한 것인데, update/delete 쿼리를 실행할 때 @Transactional을 붙여주지 않았기 때문에 발생한 에러이다. 문제의 코드 publ..
[Spring Boot][오류해결] Parameter 0 of constructor in ~~ required a bean of type ~~ that could not be found.
·
JAVA/오류해결
에러상황 *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of constructor in com.bigbell.accountbook.rest.AccountRestController required a bean of type 'com.bigbell.accountbook.service.TodayAccountService' that could not be found. Action: Consider defining a bean of type 'com.bigbell.accountbook.service.TodayAccountService' in your configura..
[Spring Boot][오류해결] Parameter 0 of constructor in ~~ required a single bean, but 2 were found
·
JAVA/오류해결
Description: Parameter 0 of constructor in com.bigbell.springboot.cruddemo.service.EmployeeServiceImpl required a single bean, but 2 were found: - employeeDAOHibernateImpl: defined in file [D:\bigbell\Spring-Boot\22-jpa-crud- demo\target\classes\com\bigbell\springboot\cruddemo\dao\EmployeeDAOHibernateImpl.class] - employeeDAOJpaImpl: defined in file [D:\bigbell\Spring-Boot\22-jpa-crud- demo\targ..
[Spring Boot][오류해결] org.springframework.beans.factory.UnsatisfiedDependencyException
·
JAVA/오류해결
org.springframework.beans.factory.UnsatisfiedDependencyException Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException 스프링부트를 사용하다가 위와 같은 에러가 발생하는 경우가 있다. 특정 인터페이스를 상속한 클래스 파일이 여러 개일 때 의존성 주입을 위해 @Qualifier 어노테이션을 사용하게 되는데, 이 때 실수를 하면 발생하는 에러다. 아래와 같은 DAO 파일과 Service 파일 있다고 해보자. (전제 >>> DAO 인터페이스를 상속..
[오류해결] Several ports (8005, 8080) required by Tomcat v9.0 Server at localhost are already in use
·
JAVA/오류해결
Tomcat 서버를 사용할 때 생기는 서버 오류이다. 오류에 대한 설명은 아래와 같다. Several ports (8005, 8080) required by Tomcat v9.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s). 서버를 Run 했을 때 이런 경고창과 함께 발생한다. 이 오류의 원인은 이미 (8005, 8080) 포트를 다른 톰캣서버에서 ..
[오류해결] Missing artifact com.fasterxml.jackson.core:jackson-databind:bundle
·
JAVA/오류해결
메이븐 파일을 사용할 때 jackson-core를 활용해 json을 사용하려고 할 때 메이븐 검색을 통해 얻은 dependency를 그대로 사용하면 라이브러리가 오류가 발생한다. 그대로 pom.xml에 갖다가 붙이면 Missing artifact com.fasterxml.jackson.core:jackson-databind:bundle:2.x.x 라는 오류 가 나타난다. ... com.fasterxml.jackson.core jackson-databind 2.13.1 bundle ... Stack overflow에 이 문제에 대한 해결방법을 알려주는 포스트가 있어 공유한다. https://stackoverflow.com/questions/54054390/missing-artifact-com-fasterx..