title: PostgreSQL Connection is closed
body: <p>I am trying to make a simple Spring Boot application generated with jHipster to get from a postgresql a list of users from a postreSQL database and display it using a rest controller, but when i run it i get </p>
  
  <pre><code>Liquibase could not start correctly, your database is NOT ready: java.sql.SQLException: Connection is closed
  
  liquibase.exception.DatabaseException: java.sql.SQLException: Connection is closed
  </code></pre>
  
  <p>this is my application-dev.yml</p>
  
  <pre><code>spring:
      profiles:
          active: dev
          include: swagger
      devtools:
          restart:
              enabled: true
          livereload:
              enabled: false # we use gulp + BrowserSync for livereload
      jackson:
          serialization.indent_output: true
      datasource:
          type: com.zaxxer.hikari.HikariDataSource
          url: jdbc:postgresql://localhost:5432/loginApp
          username: postgres
          password: admin
      jpa:
          database-platform: io.github.jhipster.domain.util.FixedPostgreSQL82Dialect
          database: POSTGRESQL
          show-sql: true
          properties:
              hibernate.id.new_generator_mappings: true
              hibernate.cache.use_second_level_cache: true
              hibernate.cache.use_query_cache: false
              hibernate.generate_statistics: true
              hibernate.cache.region.factory_class: io.github.jhipster.config.jcache.NoDefaultJCacheRegionFactory
      mail:
          host: localhost
          port: 25
          username:
          password:
      messages:
          cache-seconds: 1
      thymeleaf:
          cache: false
  
  liquibase:
      contexts: dev
  
  jhipster:
      http:
          version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration)
      cache: # Cache configuration
          ehcache: # Ehcache configuration
              time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache
              max-entries: 100 # Number of objects in each cache entry
      # CORS is only enabled by default with the "dev" profile, so BrowserSync can access the API
      cors:
          allowed-origins: "*"
          allowed-methods: "*"
          allowed-headers: "*"
          exposed-headers: "Authorization"
          allow-credentials: true
          max-age: 1800
      security:
          authentication:
              jwt:
                  secret: my-secret-token-to-change-in-production
                  # Token is valid 24 hours
                  token-validity-in-seconds: 86400
                  token-validity-in-seconds-for-remember-me: 2592000
      mail: # specific JHipster mail property, for standard properties see MailProperties
          from: loginApp@localhost
          base-url: http://127.0.0.1:8080
      metrics: # DropWizard Metrics configuration, used by MetricsConfiguration
          jmx.enabled: true
          graphite: # Use the "graphite" Maven profile to have the Graphite dependencies
              enabled: false
              host: localhost
              port: 2003
              prefix: loginApp
          prometheus: # Use the "prometheus" Maven profile to have the Prometheus dependencies
              enabled: false
              endpoint: /prometheusMetrics
          logs: # Reports Dropwizard metrics in the logs
              enabled: false
              report-frequency: 60 # in seconds
      logging:
          logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration
              enabled: false
              host: localhost
              port: 5000
              queue-size: 512
  application:
  </code></pre>
  
  <p>This is my dbUser.service.ts file</p>
  
  <pre><code>import {Injectable} from "@angular/core";
  import {Http, Response, Headers, URLSearchParams, RequestOptions} from "@angular/http";
  import {Observable} from "rxjs/Observable";
  import {DbUser} from "./dbUser";
  import {BaseService} from "../base/base.service";
  
  @Injectable()
  export class DbUserService extends BaseService{
      allUsersUrl = "http://localhost:8080/user/allDbUsers";
      userUrl = "http://localhost:8080/user/dbUser";
  
      constructor(private http:Http) {
          super();
      }
  
      getAllUsers() : Observable&lt;DbUser[]&gt;{
          return this.http.get(this.allUsersUrl)
              .map(this.extractData)
              .catch(this.handleError);
      }
  
      createUser(): Observable&lt;DbUser&gt;{
          let cpHeaders = new Headers({ 'Content-Type': 'application/json' });
          let options = new RequestOptions({ headers: cpHeaders });
          return this.http.post(this.userUrl, DbUser, options)
              .map(success =&gt; success.status)
              .catch(this.handleError);
      }
  
      getArticleById(dbUserId: string): Observable&lt;DbUser&gt; {
          let cpHeaders = new Headers({ 'Content-Type': 'application/json' });
          let cpParams = new URLSearchParams();
          cpParams.set('id', dbUserId);
          let options = new RequestOptions({ headers: cpHeaders, params: cpParams });
          return this.http.get(this.userUrl, options)
              .map(this.extractData)
              .catch(this.handleError);
      }
  }
  </code></pre>
  
  <p>I dont think that the angular 4 side of the application is the problem. I may be wrong about this, but i have verified it and i dont see any problem.</p>
  
  <p>Any help is appreciated! Thanks!</p>