본문 바로가기

Study109

Spring 에러 - the server time zone value is unrecognized or represents 해결 방법 : root-context의 드라이버 커넥션 뒤에 serverTimezone 옵션을 아래와같이 추가해준다. jdbc:mysql://localhost/abc?serverTimezone=UTC 2020. 2. 8.
Spring 에러 - <annotation-driven> 에러 해결 방법 : c:\사용자 밑의 .m2 폴더를 지운 후 sts를 다시 실행한다. 2020. 2. 8.
Spring 에러 - SqlSession cannot be resolved to a type & SqlSessionFactory cannot be resolved to a type & The import org.apache.ibatis.session.SqlSessionFactory cannot be resolved 에러 내용 : 해당 에러의 경우 보통 maven 업데이트를 하면 해결이 되지만, 해결이 안되는 경우 maven에 추가한 라이브러리들을 일일히 까봐야 한다. 아래는 오류가 발생했던 라이브러리 //수정 org.mybatis mybatis 3.4.1 -> 3.2.8로 변경하니 에러 사라짐 위의 라이브러리를 바꿔주니 아래와 같은 에러 발생 java.lang.NoClassDefFoundError: org/apache/ibatis/cursor/Cursor 추가된 ibatis와 버전이 맞지 않아 발생하는 오류, 아래의 ibatis 버전을 바꾸거나 추가된 ibatis를 확인해보자. //추가 org.apache.ibatis ibatis-core 3.0 2020. 2. 8.
Spring 에러 - Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [net.sf.log4jdbc.sql.jdbcapi.DriverSpy] 에러 내용 : 해당 에러의 경우 DB-log4j 사용과 관련해서 라이브러리가 추가되지 않았을경우 나타난다. 해결 방법 : resource 폴더 내의 log4j.xml, log4j~.properties 와 같은 log4j 관련 파일들을 추가해주고 아래의 라이브러리를 추가해준다. // 추가 해 줄 maven 라이브러리 org.bgee.log4jdbc-log4j2 log4jdbc-log4j2-jdbc4 1.16 2020. 2. 8.
Spring 에러 - org.springframework.beans.factory.BeanCreationException: Error creating bean with name '~Controller': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean.. 에러 내용 : 해당 에러의 경우 컨트롤러(bookController)에서 inject옵션(Resource, Autowired)가 사용될 때 서비스(BookService)가 정의되지 않았기 때문에 나타난다. 해결 방법 : dispatcher-servlet(servlet-context)의 component-scan이 제대로 사용되었는지 확인하자. 2020. 2. 8.
Spring 에러 - org.apache.catalina.LifecycleException: Failed to start component 에러 내용 : 톰캣이 아에 실행조차 되지 않는 경우이다. 해결 방법 : pom.xml 구성 중 mysql connector를 삭제하니 해결되었다. mariaDB를 사용하는데 mysql 라이브러리를 추가해서 중복에러가 난 것이 아닐까 생각된다. // 에러가 났던 해당 maven mysql mysql-connector-java 6.0.6 2020. 2. 8.
Spring 에러 - Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[] 에러 내용 : 해당 에러의 경우 톰캣 재실행 시 서버를 실행시키지 못하고 실패하면서 나타난다. 해결 방법 : maven이 제대로 구성되어있지 않은 경우 나타날 수 있는 에러, pom.xml을 확인하자(버전을 바꾸거나 다른 라이브러리를 입력하거나). 2020. 2. 8.
Spring 에러 - java.lang.ClassNotFoundException: org.apache.jsp.~.~.~_jsp 에러 내용 : 해당 에러의 경우 연결된 jsp파일을 찾지 못한다. 해결 방법 : 톰캣의 일시적인 에러인 경우가 대부분이기 때문에 서버의 인스턴스를 지우고 다시 추가한다. 2020. 2. 8.
Django - Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you for get to activate a virtual environment? 에러 에러내용 : Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you for get to activate a virtual environment? 현재 상황 pycharm 사용중 Django 3.0 듀토리얼 실행중(Git 으로 노트북 왔다갔다) virtualenv 생성 상태 python 3.7.6 사용중 Django 3.0.2 사용중 문제 : Django 서버 실행이 안되면서 해당 에러 발생 해석 : Django가 import 되지 않았어. pthonpath 환경변수 확인해봄? 가상환경 실행중인거 아님? 가상환경(여기선 virtualenv)에서는 python.. 2020. 1. 23.