Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 23 20:37

    xvik on gh-pages

    Publish 5.4.0 documentation (compare)

  • Oct 23 20:35

    xvik on master

    update extensions bom page with… (compare)

  • Oct 21 15:23
    xvik closed #178
  • Oct 21 15:23
    xvik commented #178
  • Oct 21 15:08

    xvik on gh-pages

    Publish 5.4.0 documentation (compare)

  • Oct 21 15:08

    xvik on master

    fix doc typos (compare)

  • Oct 21 15:06

    xvik on gh-pages

    Publish 5.4.0 documentation (compare)

  • Oct 21 15:06

    xvik on master

    fix doc typos (compare)

  • Oct 21 15:01

    xvik on gh-pages

    Publish 5.4.0 documentation (compare)

  • Oct 21 10:42

    xvik on master

    [Gradle Release Plugin] - new v… (compare)

  • Oct 21 10:41

    xvik on 5.4.0

    (compare)

  • Oct 21 10:41

    xvik on master

    [Gradle Release Plugin] - pre t… (compare)

  • Oct 21 10:33

    xvik on master

    update docs (compare)

  • Oct 21 09:10

    xvik on master

    update docs for new version (compare)

  • Oct 20 20:40

    xvik on master

    update docs for new version (compare)

  • Oct 16 10:04

    xvik on master

    unify shared state access metho… (compare)

  • Oct 15 11:44

    xvik on master

    fix typos (compare)

  • Oct 15 11:31

    xvik on master

    add shortcuts to SharedConfigur… (compare)

  • Oct 13 08:30

    dependabot[bot] on gradle

    (compare)

  • Oct 13 08:29

    xvik on master

    Bump spotbugs-annotations from … Merge pull request #185 from xv… (compare)

Vyacheslav Rusakov
@xvik
seems junit 4 tries to run it
are you using gradle to run tests?
John LaBarge
@johnlabarge
I tried gradle and IDE
Vyacheslav Rusakov
@xvik
useJUnitPlatform()
for project itself you need (run from IDE should work with this)
testImplementation 'io.dropwizard:dropwizard-testing'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter'
John LaBarge
@johnlabarge
oh !
gradle test now works
Ide is borked differently tho
Vyacheslav Rusakov
@xvik
idea?
John LaBarge
@johnlabarge
yep :)
Vyacheslav Rusakov
@xvik
))
hmm never have problem running junit5 tests.. it should work
guicey itself use all kinds of tests (spock, junit4, junit5) and idea could run anything without additinoal configurations
John LaBarge
@johnlabarge
found an SO post
John LaBarge
@johnlabarge
ah it's not running any tests
okey wrong annotation!
Vyacheslav Rusakov
@xvik
))
John LaBarge
@johnlabarge
I suppose these are normal with guice right now? Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1
Vyacheslav Rusakov
@xvik
John LaBarge
@johnlabarge
thanks for your help!
Vyacheslav Rusakov
@xvik
you are welcome!
John LaBarge
@johnlabarge
Anyone have an example of using c3p0 connection pool?
Vyacheslav Rusakov
@xvik
It's hard because dropwizard's DataSourceFactory is tightly integrated with tomcat pool. You can see maintained hikaricp bundle (https://github.com/mtakaki/dropwizard-hikaricp) which have to replace dropwizard db and hibernate modules in order to change used pool. If you really need c3p0 it could be an implementation example
John LaBarge
@johnlabarge
yeah really just for jdbi3 though not using hibernate
perhaps it's worth starting a new OSS project
Vyacheslav Rusakov
@xvik
I would suggest to go with the default. In most cases changing of connection pool have no sense (most likely you'll not have such load to gain anything from it)
John LaBarge
@johnlabarge
is there an example project somewhere I can look at that has the full repository/service/controller bits?
John LaBarge
@johnlabarge
yep! thanks!
John LaBarge
@johnlabarge
Are there any testing equivalents to the @Sql annotation which can load sql into a test db pre running a test?
(@Sql annotation comes with spring)
Vyacheslav Rusakov
@xvik
no
its not hard to do something like that, but not done yet
John LaBarge
@johnlabarge
so do folks not test with real data?
err data in the DB?
Vyacheslav Rusakov
@xvik
but it will not work with junit5
i'm sure there are some easy ways to do such tests: for sure there are general 3rd party db extensions for junit5 which could be used. I just never need this so never searched
John LaBarge
@johnlabarge
so when making Jdbi3 repositories what if I have a concrete implementation?
John LaBarge
@johnlabarge
Ok I guess I converted to interface but now I still have an exception "Extension not found: interface"
found something about installing SqlObject plugin, but I don't know where to put the call to installPlugin
John LaBarge
@johnlabarge
looks like docs say that is already installed
not sure why it barfs on the repo
Vyacheslav Rusakov
@xvik
@johnlabarge It should work. Your reporsitory must be an interface or abstract class (otherwise it makes no sense), it must be annotated with @JdbiRepository, and classpath scan must include this packages (or extensions specified directly in GuiceBundle). Of course jdbi bundle must be registered.
hard to tell what is wrong in your case, need more info (how you declare repositories, what errors appear)
Vyacheslav Rusakov
@xvik
regarding SqlObjectPlugin it is insdeed registered because guicey-jdbi integration invokes new JdbiFactory().build(...) which internally calls
protected void configure(final Jdbi jdbi) {
        jdbi.installPlugin(new SqlObjectPlugin());
        jdbi.installPlugin(new JodaTimePlugin());
        jdbi.installPlugin(new GuavaPlugin());
    }
John LaBarge
@johnlabarge
Ok another question I was trying to use the JDBI object in my DAO but I can't seem to because this is requiring my DAO to be an interface. Does anyone have an example of how to do this with DW?
Vyacheslav Rusakov
@xvik
@johnlabarge Sorry, but I don't understand your question. If you need to inject other bean inside interface then there is a way (usage in the example project)