Skip to content
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

hikari-java6: NoSuchMethodError ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy #125

Closed
manikantag opened this issue Jul 29, 2014 · 9 comments
Labels

Comments

@manikantag
Copy link

Hi,

I've upgraded from 1.40 to hikari-java6 2.0.0, and I m getting below exception at server start up:

    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    ... 25 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.zaxxer.hikari.HikariDataSource]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z)V
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:164)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:125)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:270)
    ... 34 more
Caused by: java.lang.NoSuchMethodError: java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z)V
    at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:146)
    at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:99)
    at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:80)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)

This method is not available in Java 6, it is only present from Java 7 (comparison between JDK_7 and JDK_6)

Is there anything I should be knowing? or this needs some fix? Similar issue reported here

I m using Hikari from last 4-5 months and I m very much pleased with the direction it is heading.

Thanks.

@brettwooldridge
Copy link
Owner

No, this looks like a legitimate bug. 2.0.0 is unannounced, but a really appreciate that you checked it. I will put out a 2.0.1 release today. If that runs without issue, I will announce the release.

@manikantag
Copy link
Author

That's fast! I'll update to 2.0.1 and will let you know. Thanks.

@brettwooldridge
Copy link
Owner

Did it work? I'm waiting to announce the release on Twitter until I have your confirmation.

@manikantag
Copy link
Author

Just tested. Now server started, without any exceptions & working fine. Thanks for the quick fix.

@manikantag
Copy link
Author

Also, it would be more clear for starters if you mention the module separation and their Java requirements and latest versions in Github project page. Ex: Maven artifact snippet still refers old 1.3.8 version.

@brettwooldridge
Copy link
Owner

Already done in the past hour. 😸

@manikantag
Copy link
Author

I m talking about the project page, not the Readme file. I mean this: http://brettwooldridge.github.io/HikariCP/

@brettwooldridge
Copy link
Owner

Ah yes, I'll get to that tonight.

@manikantag
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants