2017-09-26 13 views
0

私はJSF WebアプリケーションをPostgreSQLデータベースに接続したいと思っていました。 GitHubのMavenによるActiveJDBC接続の例があります。 Mavenのプラグインのようです:次のようにMaven + WebアプリケーションのPgsql設定ファイル

<plugin> 
<groupId>org.javalite</groupId> 
<artifactId>db-migrator-maven-plugin</artifactId> 
<version>${activejdbc.version}</version> 
<configuration> 
    <configFile> 
${project.basedir}/src/main/resources/database.properties 
    </configFile> 
    <environments>${environments}</environments> 
</configuration> 
<dependencies> 
    <dependency> 
     <groupId>postgresql</groupId> 
     <artifactId>postgresql</artifactId> 
     <version>9.1-901.jdbc4</version> 
    </dependency> 
</dependencies> 
</plugin> 

そして、私のdatabase.propertiesファイルは次のとおりです。

development.driver=org.postgresql.Driver 
development.username=postgres 
development.password=**** 
development.url=jdbc:postgresql://localhost:5432/first 

私は、コンソールのJavaを実行すると、それは完璧に動作しますが、私はTomcatサーバーとWebを実行しようとすると、アプリケーション、サーバーは私にエラーを与える:

Caused by: org.javalite.activejdbc.DBException: Could not find configuration in a property file for environment: development. Are you sure you have a database.properties file configured?

enter image description here

答えて

関連する問題