Exception in thread "main" java.lang.NoSuchMethodError: net.sf.jasperreports.engine.design.JasperDesign.setIgnorePagination(Z)V - dynamic-reports

I am new to dynamicreports, the example can be found at the link, but it gives me the following exception.
Please help me to find the issue.
Exception in thread "main" java.lang.NoSuchMethodError: net.sf.jasperreports.engine.design.JasperDesign.setIgnorePagination(Z)V
Regards

You must be sure that you are using the correct version of the libraries.
http://dynamicreports.sourceforge.net/requirements.html
In your case you have an error with jasperreports. With DynamicReports 3.0.2, the jasperreports correct version is 4.7.0 or above

Related

Error initializing GeoApiContext in Java

After upgrading version 0.2.2 of google-maps-services, trying to do the following:
GeoApiContext context = new GeoApiContext.Builder().apiKey("MY KEY").build();
I am getting the error detailed below:
Exception in thread "main" java.lang.NoClassDefFoundError: okhttp3/OkHttpClient$Builder
Hope someone can help.
Thanks,
Amir
There was a reference to an older version of okhttp in another project I had included. Took 2 hours by I got this to work.

Upgrade to Phantom cassandra 1.26 gives GenTraversableOnce$class error

I was using phantom to connect to cassandra database from my scala code. It worked before. But today after I upgraded to the latest 1.26.1, it throws the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
at scala.reflect.internal.util.WeakHashSet.<init>(WeakHashSet.scala:19)
at scala.reflect.internal.util.WeakHashSet$.apply(WeakHashSet.scala:429)
at scala.reflect.internal.SymbolTable$perRunCaches$.<init>(SymbolTable.scala:310)
at scala.reflect.internal.SymbolTable.perRunCaches$lzycompute(SymbolTable.scala:304)
at scala.reflect.internal.SymbolTable.perRunCaches(SymbolTable.scala:304)
at scala.reflect.internal.Symbols$class.$init$(Symbols.scala:71)
at scala.reflect.internal.SymbolTable.<init>(SymbolTable.scala:13)
at scala.reflect.runtime.JavaUniverse.<init>(JavaUniverse.scala:12)
at scala.reflect.runtime.package$.universe$lzycompute(package.scala:16)
at scala.reflect.runtime.package$.universe(package.scala:16)
at com.websudos.diesel.engine.reflection.EarlyInit$class.$init$(EarlyInit.scala:13)
at com.websudos.phantom.db.DatabaseImpl.<init>(DatabaseImpl.scala:42)
at data.MyDatabase.<init>(Users.scala:87)
I'm using scala 2.11.7. Strange enough that downgraded to the older version the issue remains. I know it must be something else. But I couldn't figure it out. Any help?

Caused by java.lang.NoSuchMethodError: org.postgresql.core.BaseConnection.getEncoding()Lorg/postgresql/core/Encoding;

I'm with a problem, my project uses postgreslq-jdbc jar and postgis-jdbc jar. I put it on my maven pom, and now I can't connect to database. I updated the postgreslq-jdbc.jar version to 9.4 the same as my Postgre.
Any suggestion?
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.postgresql.core.BaseConnection.getEncoding()Lorg/postgresql/core/Encoding;
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:2009)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:2366)
at com.ibatis.sqlmap.engine.type.IntegerTypeHandler.getResult(IntegerTypeHandler.java:35)
at com.ibatis.sqlmap.engine.mapping.result.ResultMap.getPrimitiveResultMappingValue(ResultMap.java:626)
at com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:345)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:122)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:98)
at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:300)
Probably you use the wrong version of class
org.postgresql.core.BaseConnection
Also you could use the wrong version of code that calls this class.

java.lang.NoSuchMethodError: com.google.common.collect.Maps.safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;

I am using guava-13.0.jar.
It is included in the classpath.
I am using netbeans Java Free Form Project.
Though I clean-build the project, I am getting the following exception.
Uncaught exception in thread main
java.lang.NoSuchMethodError: com.google.common.collect.Maps.safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
at com.google.common.collect.StandardTable.get(StandardTable.java:117)
at com.google.common.collect.HashBasedTable.get(HashBasedTable.java:135)
Can someone point out how can I fix this error?

java.lang.NoSuchMethodError: net.sf.json.JSONObject.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object

After some time to work with eclipse, jboss and json I get this library json-lib-0.9.jar and added to jboss library so here the problem is that when I run the program I get
java.lang.NoSuchMethodError:
net.sf.json.JSONObject.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object
This error ocurs when i try to make json.put(key,value). json is define as JSONObject.
Can someone help me please i don't know how resolve this one:(
Thanks,
Radu
The exact error is
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ExtJSFirstTry].[servlet.User]]
(http--127.0.0.1-8080-2) Servlet.service() for servlet servlet.User
threw exception: java.lang.NoSuchMethodError:
net.sf.json.JSONObject.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
You need to add the JSON library to your build path. Follow this tutorial .. http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)