Re: Lots of classloader warnings when running Dropwizard fat jar

2020-01-23 Thread Vijay
Thanks for the post. It worked for me. I needed to exclude java assist also fro 
the reflection dependency to make it work for me.

-- 
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 dropwizard-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dropwizard-user/ba25679f-6cd2-4097-a041-804797ac5e49%40googlegroups.com.


Re: Lots of classloader warnings when running Dropwizard fat jar

2018-02-22 Thread Viacheslav Mukha
Here is a pom.xml that worked for me. Had to exclude some dependencies.


org.reflections
reflections
0.9.10


com.google.guava
guava


com.google.code.findbugs
annotations




com.smoketurner
dropwizard-swagger
1.1.2-1


org.reflections
reflections





On Friday, January 12, 2018 at 10:56:56 AM UTC+2, Viacheslav Mukha wrote:
>
> Hi guys. Faced the same issue. 
>
> But when downgraded dependency form 0.9.11 to 0.9.10 - my application 
> simply stopped working, having the next message in the console:
>
> INFO  [2018-01-11 16:22:18,145] org.eclipse.jetty.util.log: Logging 
> initialized @1465ms to org.eclipse.jetty.util.log.Slf4jLog
> INFO  [2018-01-11 16:22:18,263] io.dropwizard.server.DefaultServerFactory: 
> Registering jersey handler with root path prefix: /
> INFO  [2018-01-11 16:22:18,264] io.dropwizard.server.DefaultServerFactory: 
> Registering admin handler with root path prefix: /
> WARN  [2018-01-11 16:22:18,287] com.google.common.cache.CacheBuilder: 
> ignoring weigher specified without maximumWeight
>
>
> Original error is the next:
> INFO  [2018-01-11 16:27:02,677] org.eclipse.jetty.util.log: Logging 
> initialized @1615ms to org.eclipse.jetty.util.log.Slf4jLog
> INFO  [2018-01-11 16:27:02,791] io.dropwizard.server.DefaultServerFactory: 
> Registering jersey handler with root path prefix: /
> INFO  [2018-01-11 16:27:02,792] io.dropwizard.server.DefaultServerFactory: 
> Registering admin handler with root path prefix: /
> WARN  [2018-01-11 16:27:02,814] com.google.common.cache.CacheBuilder: 
> ignoring weigher specified without maximumWeight
> INFO  [2018-01-11 16:29:18,529] org.eclipse.jetty.util.log: Logging 
> initialized @1758ms to org.eclipse.jetty.util.log.Slf4jLog
> INFO  [2018-01-11 16:29:18,675] io.dropwizard.server.DefaultServerFactory: 
> Registering jersey handler with root path prefix: /
> INFO  [2018-01-11 16:29:18,677] io.dropwizard.server.DefaultServerFactory: 
> Registering admin handler with root path prefix: /
> WARN  [2018-01-11 16:29:18,705] com.google.common.cache.CacheBuilder: 
> ignoring weigher specified without maximumWeight
> INFO  [2018-01-11 16:29:18,726] io.dropwizard.assets.AssetsBundle: 
> Registering AssetBundle with name: swagger-assets for path 
> /api/swagger-static/*
> INFO  [2018-01-11 16:29:18,728] io.dropwizard.assets.AssetsBundle: 
> Registering AssetBundle with name: swagger-oauth2-connect for path 
> /apio2c.html/*
> INFO  [2018-01-11 16:29:21,158] org.reflections.Reflections: Reflections 
> took 2415 ms to scan 1 urls, producing 35680 keys and 62732 values 
> WARN  [2018-01-11 16:29:21,176] org.reflections.Reflections: could not get 
> type for name javax.cache.management.CacheStatisticsMXBean from any class 
> loader
> ! java.lang.ClassNotFoundException: 
> javax.cache.management.CacheStatisticsMXBean
> ! at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> ! at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> ! at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
> ! at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ! at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388)
> ! ... 14 common frames omitted
> ! Causing: org.reflections.ReflectionsException: could not get type for 
> name javax.cache.management.CacheStatisticsMXBean
> ! at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:390)
> ! at org.reflections.Reflections.expandSuperTypes(Reflections.java:381)
> ! at org.reflections.Reflections.(Reflections.java:126)
> ! at io.swagger.jaxrs.config.BeanConfig.classes(BeanConfig.java:276)
> ! at io.swagger.jaxrs.config.BeanConfig.scanAndRead(BeanConfig.java:240)
> ! at io.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:221)
> ! at 
> io.federecio.dropwizard.swagger.SwaggerBundleConfiguration.build(SwaggerBundleConfiguration.java:287)
> ! at 
> io.federecio.dropwizard.swagger.SwaggerBundle.run(SwaggerBundle.java:66)
> ! at 
> io.federecio.dropwizard.swagger.SwaggerBundle.run(SwaggerBundle.java:33)
> ! at io.dropwizard.setup.Bootstrap.run(Bootstrap.java:200)
> ! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:42)
> ! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
> ! at io.dropwizard.cli.Cli.run(Cli.java:74)
> ! at io.dropwizard.Application.run(Application.java:89)
> ! at com.test.server.ServerApplication.main(ServerApplication.java:84)
> WARN  [2018-01-11 16:29:21,177] org.reflections.Reflections: could not get 
> type for name org.springframework.beans.factory.FactoryBean from any class 
> loader
> ! java.lang.ClassNotFoundException: 
> org.springframework.beans.factory.FactoryBean
> ! at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> ! at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> ! at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
> ! 

Re: Lots of classloader warnings when running Dropwizard fat jar

2018-01-12 Thread Viacheslav Mukha
Hi guys. Faced the same issue. 

But when downgraded dependency form 0.9.11 to 0.9.10 - my application 
simply stopped working, having the next message in the console:

INFO  [2018-01-11 16:22:18,145] org.eclipse.jetty.util.log: Logging 
initialized @1465ms to org.eclipse.jetty.util.log.Slf4jLog
INFO  [2018-01-11 16:22:18,263] io.dropwizard.server.DefaultServerFactory: 
Registering jersey handler with root path prefix: /
INFO  [2018-01-11 16:22:18,264] io.dropwizard.server.DefaultServerFactory: 
Registering admin handler with root path prefix: /
WARN  [2018-01-11 16:22:18,287] com.google.common.cache.CacheBuilder: 
ignoring weigher specified without maximumWeight


Original error is the next:
INFO  [2018-01-11 16:27:02,677] org.eclipse.jetty.util.log: Logging 
initialized @1615ms to org.eclipse.jetty.util.log.Slf4jLog
INFO  [2018-01-11 16:27:02,791] io.dropwizard.server.DefaultServerFactory: 
Registering jersey handler with root path prefix: /
INFO  [2018-01-11 16:27:02,792] io.dropwizard.server.DefaultServerFactory: 
Registering admin handler with root path prefix: /
WARN  [2018-01-11 16:27:02,814] com.google.common.cache.CacheBuilder: 
ignoring weigher specified without maximumWeight
INFO  [2018-01-11 16:29:18,529] org.eclipse.jetty.util.log: Logging 
initialized @1758ms to org.eclipse.jetty.util.log.Slf4jLog
INFO  [2018-01-11 16:29:18,675] io.dropwizard.server.DefaultServerFactory: 
Registering jersey handler with root path prefix: /
INFO  [2018-01-11 16:29:18,677] io.dropwizard.server.DefaultServerFactory: 
Registering admin handler with root path prefix: /
WARN  [2018-01-11 16:29:18,705] com.google.common.cache.CacheBuilder: 
ignoring weigher specified without maximumWeight
INFO  [2018-01-11 16:29:18,726] io.dropwizard.assets.AssetsBundle: 
Registering AssetBundle with name: swagger-assets for path 
/api/swagger-static/*
INFO  [2018-01-11 16:29:18,728] io.dropwizard.assets.AssetsBundle: 
Registering AssetBundle with name: swagger-oauth2-connect for path 
/apio2c.html/*
INFO  [2018-01-11 16:29:21,158] org.reflections.Reflections: Reflections 
took 2415 ms to scan 1 urls, producing 35680 keys and 62732 values 
WARN  [2018-01-11 16:29:21,176] org.reflections.Reflections: could not get 
type for name javax.cache.management.CacheStatisticsMXBean from any class 
loader
! java.lang.ClassNotFoundException: 
javax.cache.management.CacheStatisticsMXBean
! at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
! at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
! at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
! at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
! at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388)
! ... 14 common frames omitted
! Causing: org.reflections.ReflectionsException: could not get type for 
name javax.cache.management.CacheStatisticsMXBean
! at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:390)
! at org.reflections.Reflections.expandSuperTypes(Reflections.java:381)
! at org.reflections.Reflections.(Reflections.java:126)
! at io.swagger.jaxrs.config.BeanConfig.classes(BeanConfig.java:276)
! at io.swagger.jaxrs.config.BeanConfig.scanAndRead(BeanConfig.java:240)
! at io.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:221)
! at 
io.federecio.dropwizard.swagger.SwaggerBundleConfiguration.build(SwaggerBundleConfiguration.java:287)
! at 
io.federecio.dropwizard.swagger.SwaggerBundle.run(SwaggerBundle.java:66)
! at 
io.federecio.dropwizard.swagger.SwaggerBundle.run(SwaggerBundle.java:33)
! at io.dropwizard.setup.Bootstrap.run(Bootstrap.java:200)
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:42)
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
! at io.dropwizard.cli.Cli.run(Cli.java:74)
! at io.dropwizard.Application.run(Application.java:89)
! at com.test.server.ServerApplication.main(ServerApplication.java:84)
WARN  [2018-01-11 16:29:21,177] org.reflections.Reflections: could not get 
type for name org.springframework.beans.factory.FactoryBean from any class 
loader
! java.lang.ClassNotFoundException: 
org.springframework.beans.factory.FactoryBean
! at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
! at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
! at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
! at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
! at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388)
! ... 14 common frames omitted
! Causing: org.reflections.ReflectionsException: could not get type for 
name org.springframework.beans.factory.FactoryBean
! at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:390)
! at org.reflections.Reflections.expandSuperTypes(Reflections.java:381)
! at org.reflections.Reflections.(Reflections.java:126)
! at io.swagger.jaxrs.config.BeanConfig.classes(BeanConfig.java:276)
! at io.swagger.jaxrs.config.BeanConfig.scanAndRead(BeanConfig.java:240)
! at