I am getting the below error while converting xlsx file to csv using Apache poi. I have checked and I am using all 4.1.0 jar. Which jar should I specifically check for this issue?
Caught throwable Found class org.apache.poi.util.POILogger, but interface was expected
java.lang.IncompatibleClassChangeError: Found class org.apache.poi.util.POILogger, but interface was expected
Related
When I try to create a RemoteWebDriver in 3.11, I see this error below.
This worked fine up through 3.10. I've reverted to 3.10 for now.
I tried adding in the gson jar from google, but I still see same error.
Anyone else see this? I'm running one selenium server as hub, and then running
a node against it with webdriver for ff or chrome, same issue.
com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder;
java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder;
at org.openqa.selenium.json.Json.(Json.java:47)
at org.openqa.selenium.logging.profiler.HttpProfilerLogEntry.constructMessage(HttpProfilerLogEntry.java:37)
at org.openqa.selenium.logging.profiler.HttpProfilerLogEntry.(HttpProfilerLogEntry.java:29)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:135)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:209)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:132)
at oracle.ojet.automation.test.selenium.WebDriverManager._buildRemoteWebDriver(WebDriverManager.java:573)
This error message...
java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder;
...implies that the JVM was unable to find the method setLenient()Lcom/google/gson/GsonBuilder.
Reason
Release Notes of Selenium v3.10.0 clearly mentions:
Migrate Selenium Grid to reduce exporting GSON and Apache HttpClient as much to public APIs.
Further, Release Notes of Selenium v3.12.0 clearly mentions:
Remove GSON from how we coerce JSON to Java types.
Clean up the internals of Selenium's JSON handling, including deprecating places where GSON leaks from our APIs.
Finally, Release Notes of Selenium v3.13.0 clearly mentions:
Introduced our own JSON parser and outputter, allowing GSON to be removed from our dependencies.
Solution
To get rid of the warning and errors upgrade to Selenium v3.14.0, where Release Notes clearly mentions:
Completely removed the GSON dependency. We now use reflection to try and find the class.
I am using PEXML library for giving physics to bodies in my game. It worked very well in desktop but when I ran in android it is giving me error at code
playerPhysics = new PEXML(Gdx.files.internal("data/physics.xml").file());
and showing error
java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/JAXBContext; at com.hi5dev.box2d_pexml.PEXML.loadXML(PEXML.java:124) at com.hi5dev.box2d_pexml.PEXML.(PEXML.java:24)
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.bind.JAXBContext" on path: DexPathList[[dex file "/data/data/com.myplayer.football/files/instant-run/dex/slice-slice_9...
Google search shows javax.xml.bind.JAXBContext is in the file javax.xml.bind.jar
Java needs to find this file at runtime. It looks for it in your Java classpath ( set of directories ).
You need this Jar to be in your runtime classpath
The error you wrote about shows you the classpath.
You can either
put javax.xml.bind.jar in the current classpath
or
Modify the classpath to include the location of javax.xml.bind.jar
Lookup how to modify the Java classpath for your operating system.
I have written a RESTful service in java and want to produce json out of the get method. I was struggling with many no class def found error due to issues in jar versions or dependencies.
For example
Jackson error: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/Versioned
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonMappingException$Reference
I have created a dynamic web project in eclipse and added the jars in classpath and Maven is not used here.
Any idea on the list of dependent jars ??
I have finally found the jar versions and dependencies
I have written simple RESTEasy Hello World web-service. It used to work just fine when invoked from IE or from within Eclipse(RAD), but when I hit it from Google Chrome, it used give Exception saying.
com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet RestEasy: java.lang.NoClassDefFoundError: org/jboss/resteasy/util/HeaderParameterParser
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.parse(MediaTypeHeaderDelegate.java:57)
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.fromString(MediaTypeHeaderDelegate.java:18)
at javax.ws.rs.core.MediaType.valueOf(MediaType.java:150)
at org.jboss.resteasy.util.MediaTypeHelper.parseHeader(MediaTypeHelper.java:203)
at org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractAccepts(ServletUtil.java:120)
at org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractHttpHeaders(ServletUtil.java:83)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:186)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
But now this Exception is occurring in all the cases.
I am sure that the jar file containing HeaderParameterParser class which is restreasy-jaxrs2.2.3.GA.jar is on the classpath.
I am using
RESTEasy 2.2.3.GA(also tried with 3.o.1Final).
Websphere Application Server v8.0
RAD 8.0
Maven
I am running Java ME application in Eclipse..I have JSON code in my pp and I have also json.jar lib, but when I run the application, I get an eror like this.
Uncaught exception: java.lang.NoClassDefFoundError: org/json/me/JSONObject
- parsing.Parsing$1.run(), bci=88
Looks like your json.jar lib is not bundled with your app code. The contents from json.jar must be available inside the final app jar file.
If you are using Eclipse Pulsar be sure to check this lib at Project .. Properties .. Java Build Path .. Order and Export tab.