Webアプリケーションの開発を始めたばかりです。Web アプリケーション内にパッケージ化されたデータベースとして Apache derby を使用したいと考えています。私が使用している瓶のリストは次のとおりです
derby.jar、
derbyclient.jar、
derbynet.jar、
derbytools.jar
接続を確立できません。コードスニペットはこちら
//start the server
NetworkServerControl networkServerControl= new NetworkServerControl(InetAddress.getByName("localhost"),1527);
networkServerControl.start(null);
//establish connection & create database
connection = DriverManager.getConnection("jdbc:derby://localhost:1527/LoginDB;create=true");
この例外をスローしています
No suitable driver found for jdbc:derby://localhost:1527/LoginDB;create=true
すべてのライブラリを Web アプリケーションの WEB-INF/lib フォルダー内に配置しました。接続を取得する方法は?
アップデート:
詳細を追加する
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/LoginDB;create=true
Jan 05, 2013 10:41:23 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [ReadProperty] in context with path [/Question] threw exception
java.lang.NullPointerException
at org.humbledevelopers.question.DerbyDemo.main(DerbyDemo.java:96)
96 行目のコード:statement=connection.createStatement();