2016-12-12 34 views
0

エラー: - JDBCドライバクラスをロードできません 'はcom.mysql.jdbc.Driver'

<?xml version="1.0" encoding="UTF-8"?> 
 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> 
 
    <display-name>Garage</display-name> 
 
    <welcome-file-list> 
 
    <welcome-file>index.html</welcome-file> 
 
    <welcome-file>index.htm</welcome-file> 
 
    <welcome-file>index.jsp</welcome-file> 
 
    <welcome-file>default.html</welcome-file> 
 
    <welcome-file>default.htm</welcome-file> 
 
    <welcome-file>default.jsp</welcome-file> 
 
    </welcome-file-list> 
 
    <servlet> 
 
    <servlet-name>Faces Servlet</servlet-name> 
 
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
 
    <load-on-startup>1</load-on-startup> 
 
    </servlet> 
 
    <resource-ref> 
 
<description>GarageDB Datasource</description> 
 
    <res-ref-name>jdbc/garage</res-ref-name> 
 
    <res-type>javax.sql.DataSource</res-type> 
 
    <res-auth>Container</res-auth> 
 
</resource-ref> 
 
    <servlet-mapping> 
 
    <servlet-name>Faces Servlet</servlet-name> 
 
    <url-pattern>/faces/*</url-pattern> 
 
    </servlet-mapping> 
 
    <context-param> 
 
    <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description> 
 
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
 
    <param-value>client</param-value> 
 
    </context-param> 
 
    <context-param> 
 
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name> 
 
    <param-value>resources.application</param-value> 
 
    </context-param> 
 
    <listener> 
 
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class> 
 
    </listener> 
 
</web-app>

私はこのエラーを修正するように見えることはできません。私はgithubとファイルへのリンクを付けました。助けてください。 click here for the link。私はTomcatバージョン9.0を使用しており、このエラーを修正するためにwampserverを使用しています。私はすでにjava sql converter mysql-connector-java-5.1.40-binをインポートしています。

+0

これはクラスパスの問題です。あなたはMavenやGradleを偶然使っていますか? –

+0

"jar tf mssql-connector-java.jar"を実行して、ファイルが存在し、com/sql/jdbc/Driver.classを含むことを確認します。 –

答えて

0

"mssql-connector-java" jarファイルのコピーを作成し、現在のプロジェクトのlibフォルダ(つまり、webcontent> WEBINF> libに存在する)に貼り付け、アプリケーションを再実行します。

+0

ありがとう@Basavaraj私はそれを試みましたが、それでも動作しません。 –

0

tomcatサーバーディレクトリにjarファイルを入れてみてください。ウィンドウを使用している場合は、C:¥Program Files¥Apache Software Foundation¥Tomcat 9.0¥libを再起動してください。サーバ。

関連する問題