Hi Jochen,
thank you for suggestion and examples. Since I'm *newbie* with Dropwizard 
and don't have expreince with setting up Bundles (*NEVER* done it) can you 
please give me some link with simple tutorial/explanation how to configure 
it? 

I'm struggling to set it up cause I don't use Hibernate in my application 
for creating queries, but jDBI3 so Hibernate does not work for me + I'm NOT 
using Dependency Injection in my project so since it's small project it 
instantiates objects manually in *run()* method.
I've found code example on *this* 
https://github.com/DeloitteDigitalUK/dropwizard-hikaricp/tree/master/src/main/java/uk/co/deloittedigital/dropwizard/hikari
 
repo, edited my project and got this message in Console when I run my app 
(it compiles successfully with *mvn clean package *command*):*
 

> java.lang.ClassCastException: 
> com.nikolas.master_thesis.DropwizardMasterThesisConfiguration cannot be 
> cast to com.nikolas.master_thesis.config.HikariConfigurationProvider
>

...and here are *classes* which this *message is reffering *to:
https://github.com/nixos89/DW-Bookshop/blob/09-adding-dropwizard-metrics-jmx/src/main/java/com/nikolas/master_thesis/DropwizardMasterThesisConfiguration.java
https://github.com/nixos89/DW-Bookshop/blob/09-adding-dropwizard-metrics-jmx/src/main/java/com/nikolas/master_thesis/config/HikariConfigurationProvider.java
Thank you in advance.

Nikola

понедељак, 07. септембар 2020. 21.24.37 UTC+2, Jochen Schalanda је 
написао/ла:
>
> Hi Nikola,
>
> the bundle looks a bit weird. Make sure to add the DataSourceFactory from 
> the Hikari Bundle to your application configuration and make sure that 
> dropwizard-db is not part of your application.
>
> Take a look at the unit test for an example:
>
>
> https://github.com/mtakaki/dropwizard-hikaricp/blob/1.3.x/src/test/java/io/dropwizard/db/ManagedPooledDataSourceTest.java#L110-L115
>
> https://github.com/mtakaki/dropwizard-hikaricp/blob/1.3.x/src/test/java/io/dropwizard/db/ManagedPooledDataSourceTest.java#L117-L135
>
>
> Cheers,
> Jochen
>
> Am 07.09.2020 um 12:59 schrieb Nikola Stevanović <[email protected] 
> <javascript:>>:
>
> Hi everyone,
>
> I have issue with implementing *HikariCP* in my *Dropwizard 1.3.8 *app. 
> Project uses Maven as build tool so I've added following dependency from 
> this https://github.com/mtakaki/dropwizard-hikaricp/tree/1.3.x link:
>
>   
> <dependency> 
>   <groupId>com.github.mtakaki</groupId> 
>   <artifactId>dropwizard-hikaricp</artifactId> 
>   <version>1.3.8</version> 
> </dependency>
>
>
> ...under my dependencies tag. As mentioned in link I'm supposed to get:
>
> *INFO* [2016-03-14 06:32:06,681] org.eclipse.jetty.util.log: Logging 
>> initialized @1894ms
>> *INFO* [2016-03-14 06:32:08,675] com.zaxxer.hikari.HikariDataSource: 
>> hibernate - Starting...
>>
> message in my logs but unfortunatelly I don't. 
>
> Do I need to create some kind of *Bundle* and if yes how (simple example 
> would be nice), if not then what else?
>
>
> Any kind of help/advice is greatly appreciated.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "dropwizard-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dropwizard-user/3cbdc158-f5cd-4d2a-b575-6673c2352bd3o%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/dropwizard-user/3cbdc158-f5cd-4d2a-b575-6673c2352bd3o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dropwizard-user/a1b4681b-9383-4246-838e-aca067ad64aao%40googlegroups.com.

Reply via email to