title: Where to put the activejdbc.properties file for referencing the database.properties file in ActiveJDBC?
body: <p>I have created a Jersey project from the Maven archetype jersey-quickstart-webapp on NetBeans. And I'm using ActiveJDBC for data persistence. In its documentation it's possible to reference an external file for database connection properties: <a href="http://javalite.io/database_connection_management#location-of-property-file" rel="nofollow noreferrer">http://javalite.io/database_connection_management#location-of-property-file</a></p>
  
  <p>I have followed the instructions and I have this <code>activejdbc.properties</code> (located at <strong>project-ws/src/main/</strong>) file content:</p>
  
  <pre><code>env.connections.file=C:\dev\database.properties
  </code></pre>
  
  <p>And the <code>database.properties</code> file:</p>
  
  <pre><code>development.driver=com.mysql.jdbc.Driver
  development.username=user_db
  development.password=*****
  development.url=jdbc:mysql://192.168.0.19/customersdb
  
  test.driver=com.mysql.jdbc.Driver
  test.username=user_db
  test.password=*****
  test.url=jdbc:mysql://192.168.0.19/customersdb
  
  production.jndi=java:comp/env/jdbc/acme
  </code></pre>
  
  <p>Also, I have this web service:</p>
  
  <pre><code>@Path("telephone")
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  public class TelephoneResource {
      @GET
      public Response get() {
          try {
              Base.open();
  
              LazyList&lt;Telephone&gt; tels= Telephone.findAll();
  
              String telsJson = tels.toJson(true);
  
              Base.close();
  
              return Response.ok().entity(telsJson).build();
          } catch (Exception ex) {
              return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("{\"error\": \"" + ex.getMessage() + "\"}").build();
          }
      }
  }
  </code></pre>
  
  <p>But when I try to execute that GET resource, I receive this error message:</p>
  
  <pre><code>{
      "error": "Could not find configuration in a property file for environment: development. Are you sure you have a database.properties file configured?"
  }
  </code></pre>
  
  <p>I also have tried this other configurations:</p>
  
  <ul>
  <li><a href="http://javalite.io/database_connection_management#environment-variables-override" rel="nofollow noreferrer">http://javalite.io/database_connection_management#environment-variables-override</a></li>
  <li><a href="http://javalite.io/database_connection_management#system-properties-override" rel="nofollow noreferrer">http://javalite.io/database_connection_management#system-properties-override</a></li>
  </ul>
  
  <p>By adding them to the <code>pom.xml</code> file using the <code>maven-surefire-plugin</code>:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.13&lt;/version&gt;
      &lt;configuration&gt;
          &lt;systemPropertyVariables&gt;
              &lt;activejdbc.url&gt;jdbc:mysql://192.168.0.19/customersdb&lt;/activejdbc.url&gt;
              &lt;activejdbc.user&gt;user_db&lt;/activejdbc.user&gt;
              &lt;activejdbc.password&gt;*****&lt;/activejdbc.password&gt;
              &lt;activejdbc.driver&gt;com.mysql.jdbc.Driver&lt;/activejdbc.driver&gt;
          &lt;/systemPropertyVariables&gt;
          &lt;environmentVariables&gt;
              &lt;ACTIVEJDBC.URL&gt;jdbc:mysql://192.168.0.19/customersdb&lt;/ACTIVEJDBC.URL&gt;
              &lt;ACTIVEJDBC.USER&gt;user_db&lt;/ACTIVEJDBC.USER&gt;
              &lt;ACTIVEJDBC.PASSWORD&gt;*****&lt;/ACTIVEJDBC.PASSWORD&gt;
              &lt;ACTIVEJDBC.DRIVER&gt;com.mysql.jdbc.Driver&lt;/ACTIVEJDBC.DRIVER&gt;
          &lt;/environmentVariables&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>But they also did not work.</p>