Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Receiving error: "java.lang.NoClassDefFoundError: [Ljava/util/HashMap$Entry" when run testrail java API on JAVA 8, it work well on java 7, please help, thanks


#1

I built Test rail java API in my code, it works well on java 7, when I upgraded to Java 8, I got following errors, please help, thanks

java.lang.NoClassDefFoundError: [Ljava/util/HashMap$Entry;
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:158)
at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:146)
at com.equifax.qa.testassist.infrastructure.PropertyProvider.getPropertyValue(PropertyProvider.groovy:43)
at com.equifax.qa.testassist.extension.dav.CombineRuleSpec.creatClient(CombineRuleSpec.groovy:40)
at com.equifax.qa.testassist.extension.dav.TestCombine.setupSpec(TestCombine.groovy:52)


#2

Hello David,

Thanks for your posting! Are you reusing the same jar compiled for Java 7 with Java 8? I seems that you would need to recompile the Java files as some HashMap internals have changed and the previously generated jar is no longer compatible. As the bindings are available in source code, you can simply recompile the binding with Java 8:

http://docs.gurock.com/testrail-api2/bindings-java

Cheers,
Tobias