ClassNotFoundExceptioncom.mysql.jdbc.Driver

來源:互聯網
上載者:User

標籤:classnotfoundexceptioncom.mysql.jdbc.driver

調試3M網站項目時出現錯誤提示:ClassNotFoundExceptioncom.mysql.jdbc.Driver

 650) this.width=650;" width="1200" height="867" title="1234.jpg" style="width:546px;height:406px;" src="http://s5.51cto.com/wyfs02/M00/7C/DD/wKioL1bZghbjI9Y5AAcV33s2gmc432.jpg" alt="wKioL1bZghbjI9Y5AAcV33s2gmc432.jpg" />

原因分析:項目中缺少mysql-connector-java-5.1.22-bin.jar包

解決辦法:

①右鍵工程名->New->Folder,建立檔案夾lib,右鍵lib檔案夾->Import匯入mysql-connector-java-5.1.22-bin.jar

②選中jar包右擊--->BuildPath--->Add To Build Path,如所示:

650) this.width=650;" title="2345.jpg" src="http://s4.51cto.com/wyfs02/M02/7C/DD/wKioL1bZgljhzouZAAFm9FBAZ1M295.jpg" alt="wKioL1bZgljhzouZAAFm9FBAZ1M295.jpg" />

測試結果:在瀏覽器中輸入地址:http://localhost:8080/3M/,顯示正常

650) this.width=650;" width="827" height="278" title="3456.jpg" style="width:596px;height:245px;" src="http://s3.51cto.com/wyfs02/M02/7C/DE/wKiom1bZgeyg4PM_AADJ1tXFXms544.jpg" alt="wKiom1bZgeyg4PM_AADJ1tXFXms544.jpg" />


本文出自 “DOSOM” 部落格,謝絕轉載!

ClassNotFoundExceptioncom.mysql.jdbc.Driver

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.