CODEDRAGON ㆍDevelopment/JSP
에러메시지
java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory] |
해결방법
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" 값을 factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"로 변경해 줍니다.
톰캣7.0 이하 |
factory= "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" |
톰캣8.0 이상 |
factory= "org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory" |
Servers\Tomcat v7.0 Server at localhost-config\context.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- --><Context>
<!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session --> <Resource name="jdbc/OracleDB" auth="Container" type="javax.sql.DataSource" username="codelab" password="oracle_11g" driverClassName="oracle.jdbc.driver.OracleDriver" factory= "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" url="jdbc:oracle:thin:@localhost:1521:ORCL" maxActive="500" maxIdle="100"/>
</Context> |
<?xml version="1.0" encoding="UTF-8"?> <!-- --><Context>
<!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session --> <Resource name="jdbc/OracleDB" auth="Container" type="javax.sql.DataSource" username="codelab" password="oracle_11g" driverClassName="oracle.jdbc.driver.OracleDriver" factory= "org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory" url="jdbc:oracle:thin:@localhost:1521:ORCL" maxActive="500" maxIdle="100"/>
</Context> |
'Development > JSP' 카테고리의 다른 글
JSTL xml, JSTL xml을 사용하기 위한 등록 코드. fmt 라이브러리 태그 종류 (0) | 2018.07.02 |
---|---|
쿠키 생성, 쿠키 저장, 쿠키 전송 (0) | 2018.06.18 |
게시판(MVC) - 게시판 게시글의 답변글 계층 알고리즘 및 구조도 (0) | 2018.01.22 |
게시판(MVC) - 글 답변 달기 (0) | 2017.12.22 |
MVC 모델 1 vs 모델2 (0) | 2017.12.21 |