私は休止状態とダービーを使用しています。
私は hibernate.cfg.xml を持っており、db waas を操作して Session を取得するために行ったことはすべて:
return new AnnotationConfiguration().configure( "files/hibernate.cfg.xml" ).buildSessionFactory().getCurrentSession();
私のhibernate.cfg.xmlには含まれています
<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="connection.url">jdbc:derby:crmdb;create=true</property>
およびエンティティ クラスのその他のプロパティとマッピング。
実行時にderby dbとbootPasswordのdataEncryptionを設定したいと思います。
hibernate.cfg.xml を変更しました:
<property name="connection.url">jdbc:derby:crmdb;create=true;dataEncryption=true;bootPassword=myPass</property>
そしてすべてが大丈夫でした。
ここで、実行時に bootPassword を設定したいと思います。exby 環境変数から読み取ります。それが問題です!「connection.url」を hibernate.cfg.xml から削除してコード内に設定しようとすると、次のエラーが発生します。
java.lang.UnsupportedOperationException: The application must supply JDBC connections
また、bootPassword だけを削除すると、db に接続できなくなります。
何か案が ?