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

Java 9 incompatibility #143

Closed
lazystone opened this issue Jan 31, 2018 · 7 comments
Closed

Java 9 incompatibility #143

lazystone opened this issue Jan 31, 2018 · 7 comments

Comments

@lazystone
Copy link
Contributor

Seems like library is not java 9 compatible:

java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
	at com.ecwid.consul.v1.kv.model.GetValue.getDecodedValue(GetValue.java:99) ~[consul-api-1.3.0.jar!/:?]
	at com.ecwid.consul.v1.kv.model.GetValue.getDecodedValue(GetValue.java:103) ~[consul-api-1.3.0.jar!/:?]
	at org.springframework.cloud.consul.config.ConsulPropertySource.parsePropertiesInKeyValueFormat(ConsulPropertySource.java:102) ~[spring-cloud-consul-config-2.0.0.M4.jar!/:2.0.0.M4]
	at org.springframework.cloud.consul.config.ConsulPropertySource.init(ConsulPropertySource.java:75) ~[spring-cloud-consul-config-2.0.0.M4.jar!/:2.0.0.M4]
	at org.springframework.cloud.consul.config.ConsulPropertySourceLocator.create(ConsulPropertySourceLocator.java:155) ~[spring-cloud-consul-config-2.0.0.M4.jar!/:2.0.0.M4]
	at org.springframework.cloud.consul.config.ConsulPropertySourceLocator.locate(ConsulPropertySourceLocator.java:129) ~[spring-cloud-consul-config-2.0.0.M4.jar!/:2.0.0.M4]
	at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:94) ~[spring-cloud-context-2.0.0.M5.jar!/:2.0.0.M5]
	at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:626) ~[spring-boot-2.0.0.RC1.jar!/:2.0.0.RC1]
	at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:366) ~[spring-boot-2.0.0.RC1.jar!/:2.0.0.RC1]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) ~[spring-boot-2.0.0.RC1.jar!/:2.0.0.RC1]
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:136) ~[spring-boot-2.0.0.RC1.jar!/:2.0.0.RC1]
	at com.cabonline.order.Runner.main(Runner.java:15) ~[classes!/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[order-service-622.jar:?]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[order-service-622.jar:?]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[order-service-622.jar:?]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) ~[order-service-622.jar:?]
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter

Since it's used by spring-cloud-consul project which suppose to run under Java 9 then it would be nice to fix this.

@lazystone
Copy link
Contributor Author

lazystone commented Jan 31, 2018

Probably it's time to abandon Java 1.6 in favor of 1.8?
Or if you still want to have the same compatibility level, then dependency on org.apache.commons.codec.binary.Base64 is probably the lesser of two evils.

@lazystone
Copy link
Contributor Author

I beg you to raise java compatibility level to 1.8, because running java 6 or 7 in micro-service environments is a crime against the nature!
🐱 🐰 🐥 🐶

@vgv
Copy link
Member

vgv commented Feb 27, 2018

I think that raising java level to 1.8 is great idea if we won't break existing users

@vgv
Copy link
Member

vgv commented Feb 27, 2018

@spencergibb

Hi Spencer,
I know that spring-cloud-consul depends on consul-api. Which JDK versions do you support?
Will it break your users if we raise JDK version to 1.8 here?

@spencergibb
Copy link
Contributor

We have moved to Java 8

@vgv
Copy link
Member

vgv commented Mar 6, 2018

I've released version 1.3.1 today with dropped JDK 6/7 support

@vgv vgv closed this as completed Mar 6, 2018
@spencergibb
Copy link
Contributor

Probably should have been a minor release at least, not a patch.

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

No branches or pull requests

3 participants