ClassNotFoundException oracle.jdbc.driver.OracleDriver only in servlet, using Eclipse [duplicate]

纵饮孤独 提交于 2019-11-28 00:10:43
Udo Held

Probably you aren't deploying the oracle driver with your application.

You have several options:

  • You can place the driver jars in your WEB-INF/lib folder
  • You export it with your application. -> Right Click on Project -> Build Path-> Configure Build Path... -> Order and Export -> Check the drivers.
  • Place the driver jars in a shared or library extension folder of your application server. (You should go with option one or two though.)
sri

You must include the ojdbc6.jar file in the Deployment Assembly of the Project...

  1. select the web project which contains the jsp file...

  2. select Project tab in the menu bar in Eclipse

  3. select properties in the drop down menu

  4. select Deployment Assembly

  5. Add your ojdbc6.jar file in it.

user1250206

Try this, change the oracle.jdbc.driver.OracleTypes to oracle.jdbc.OracleTypes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!