달력

6

« 2020/6 »

  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  •  
  •  
  •  
  •  


 

 

 

에러메시지

 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>

 

 

Posted by codedragon codedragon

댓글을 달아 주세요