농장/Java·Kotlin

[Servlet] AbstractMethodError T4CConnection 에러 해결

귤발자 2020. 6. 16. 14:21
728x90
반응형

eclipse 에러 메시지 : 

java.lang.AbstractMethodError: Receiver class oracle.jdbc.driver.T4CConnection does not define or inherit an implementation of the resolved method 'abstract boolean isValid(int)' of interface java.sql.Connection.

서블릿을 실행시켰을 때 화면이 나오지 않는다.

 

 

해결 : 

Servers 프로젝트의 context.xml 파일의 <Resource>태그 안에 factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" 삽입

<Resource
        name = "jdbc/oracle"
        auth = "Container"
        type = "javax.sql.DataSource"
        driverClassName = "oracle.jdbc.OracleDriver"
        url = "jdbc:oracle:thin:@localhost:1521:XE"
        username = "**"
        password = "**"
        maxActive = "*"
        maxWait = "*"
        factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>
</Resource>​
728x90
반응형