New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running with no config file specified #1321

Closed
lewisd32 opened this Issue Nov 2, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@lewisd32

lewisd32 commented Nov 2, 2015

I'm trying to set up my *Configuration classes with defaults in the class, so I don't need to tell the app a config file when it's run in development. However, when I run the app, I get this error:

default configuration has an error:
  * Unrecognized field at: database.healthCheckValidationTimeout
    Did you mean?:
      - logValidationErrors
      - removeAbandonedTimeout
      - validationQueryTimeout
      - initializationQuery
      - validationQuery
        [30 more]

I can see that DataSourceFactory has a getHealthCheckValidationTimeout, method, but I see no matching setter. From what I see in the code, getValidationQueryTimeout and setValidationQueryTimeout read/write the same field as getHealthCheckValidationTimeout.
I'm unable to find the "default configuration" that specifies database.healthCheckValidationTimeout to attempt changing it to database.validationQueryTimeout and see if that works.
I think this is a bug, but I'm not sure.

@joschi joschi added the bug label Nov 3, 2015

@joschi joschi added this to the 0.9.1 milestone Nov 3, 2015

@joschi

This comment has been minimized.

Show comment
Hide comment
@joschi

joschi Nov 3, 2015

Member

@lewisd32 Which version of Dropwizard are you using?

Member

joschi commented Nov 3, 2015

@lewisd32 Which version of Dropwizard are you using?

@lewisd32

This comment has been minimized.

Show comment
Hide comment
@lewisd32

lewisd32 Nov 3, 2015

I should have mentioned I was using 0.9.0, but it looks like you figured it out. Thanks! :)

lewisd32 commented Nov 3, 2015

I should have mentioned I was using 0.9.0, but it looks like you figured it out. Thanks! :)

nickbabcock added a commit to nickbabcock/dropwizard that referenced this issue Nov 13, 2015

Deprecate PooledDataSourceFactory#getHealthCheckValidation{Query,Time…
…out}

The PooledDataSourceFactory#getHealthCheckValidation{Query,Timeout} methods were introduced while
refactoring DataSourceFactory to allow custom DB connection pools (PR #1030) but broke the serialization
of the default configuration for DataSourceFactory. By deprecating these methods and pulling the
original DataSourceFactory#getValidation{Query,Timeout} methods into PooledDataSourceFactory, the
original behaviour was restored.

Fixes #1321, refs #1030

(cherry picked from commit 84c7463)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment