[문제발생]
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLRecoverableException: IO
오류: The Network Adapter could not establish the connection
### The error may exist in file [C:\Users\82105\Desktop\workspace\spring mvc\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SpringProject\WEB-INF\classes\mappers\board-mapper.xml]
The Network Adapter could not establish the connection;
[해결과정]
1. C:\Program Files\Java\jre1.8.0_221\lib\ext
ojdbc6 파일이 있는지 확인해보았다. 이미 존재중 ---> 해결되지 않았다.
2. 작업관리자-서비스-OracleServiceXE 을 중단 & 실행 ---> 해결되지 않았다.
OracleXETNSListener 중단 & 실행 ---> 해결되지 않았다.
3. root-context.xml 수정
<!-- 커넥션 풀 -->
<bean class="org.springframework.jdbc.datasource.DriverManagerDataSource"
id="dataSource">
<property name="driverClassName" value="net.sf.log4jdbc.sql.jdbcapi.DriverSpy" />
<property name="url" value="jdbc:log4jdbc:oracle:thin:@localhost:1111:xe"/>
<property name="username" value="user01"/>
<property name="password" value="1111"/>
</bean>
<property name="url" value="jdbc:log4jdbc:oracle:thin:@IP주소:1111:xe"/>을
<property name="url" value="jdbc:log4jdbc:oracle:thin:@localhost:1111:xe"/> 로 수정
---> 해결완료(이제 잘 수 있음)
'Error' 카테고리의 다른 글
오류(6) - [MariaDB] 에러 해결- can't connect to mysql server on 'localhost' (0) | 2022.03.30 |
---|---|
오류(5) Server Error - The selection cannot be run on any server. (0) | 2022.01.11 |
오류(4) This application has no explicit mapping for /error, so you are seeing this as a fallback. (2) | 2022.01.04 |
오류(3) spring boot pom.xml 첫 줄 에러 (0) | 2022.01.04 |
오류(2) jsp에서 form 데이터 전송시 글자깨짐 (0) | 2020.12.08 |
댓글