Closed allenhula closed 6 years ago
@allenhula - Thanks for filling this issue. Can you please provide more details on what failed when tried 1.7? Thanks.
Here is the detailed exception:
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/microsoft/azure/iot/service/sdk/ServiceClient : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2436)
at java.lang.Class.getDeclaredFields(Class.java:1806)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:327)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:286)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:870)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.context.support.ClassPathXmlApplicationContext.
@allenhula - Thanks for the data. I see that you hit that exception when using the Java "Service" SDK with JDK 1.7. Currently we support JDK 1.7 for "Device" SDK side but not for the "Service" SDK yet. If interested in submitting a pull request, we'd happily review that. Thanks!
But the documentation on the first page says: 'Azure IoT Hub Service SDK: enables developing back-end applications for Azure IoT (supports Java 7+)'. Wrong probably! Please fix!
Any update on azure IoT Hub device/service SDK support for java 7? Any quick response more appreciated.
@katherb123 - This has been in our backlog for a while but we never had a need to prioritize it. So this has still not been addressed. However we will be happy to take a PR from you if this is of urgent need.
Hi prmathur, Please find my pull request: https://github.com/katherb123/iot-service-client/pull/1
@katherb123 - I looked at the PR. Looks like your PR just changes the java version. However compilation won't be successful if we just change the version. There are some features we use from Java 8 which should be reverted to support 1.7 in service client.
At the moment, we don't forsee having time to add support for Java 7. Because of that, I'm closing this issue.
Tried to use the jar on JDK 1.7, it is failed. Can you add support for JDK 1.7?