terça-feira, 25 de setembro de 2012

iReport/JasperReports 4.7.1 + Hibernate 4.7.1 java.lang.NoSuchFieldError: BOOLEAN


Solution (Testado)


Solution is very simple.
1) Download the whole (with source) jasper tar.gz file from JasperReports home site
2) Untar the file (let the location be called $JASPER_SOURCE)
3) vim $JASPER_SOURCE/src/net/sf/jasperreports/engine/query/JRHibernateQueryExecuter.java
4) Add the following line in the top import statements
import org.hibernate.type.StandardBasicTypes;
5) Now from line 71 onwards change all "Hibernate" to "StandardBasicTypes" (till the end of the static block, that is till 84th line)
6) Save and exit the editor
7) Copy the latest hibernate3.jar (3.6.x version) into "$JASPER_SOURCE/lib" location
8) Now do the following ant command from $JASPER_SOURCE location
ant jar
You will get the modified jar in lib/jasperreports-4.x.x.jar location. Use that jar for your project
--------------- OR ------------------- 
(Não testado)
Another solution is to use old hibernate3.jar file (version 3.0.x) with your project

Nenhum comentário:

Postar um comentário