wood burning stoves
The moose likes Other Open Source Projects and the fly likes Jasper Report Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper Report Issue" Watch "Jasper Report Issue" New topic

Jasper Report Issue

pritam patil

Joined: Feb 09, 2010
Posts: 2
While compling jasper report following exception occurs :

Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at org.codehaus.groovy.control.CompilationUnit.createClassVisitor(CompilationUnit.java:743)
at org.codehaus.groovy.control.CompilationUnit$10.call(CompilationUnit.java:706)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:925)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:462)
at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:88)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:192)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:219)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:152)
at com.jasper.net.ComplieReport.main(ComplieReport.java:28)

With source code as below :

import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.engine.JREmptyDataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.view.JasperViewer;
import org.objectweb.asm.*;

public class ComplieReport
public static void main(String[] args)
String reportSource = "../JasperTestReport/WebContent/Report.jrxml";
String reportDest = "../JasperTestReport/WebContent/HelloReportWorld.html";

Map<String, Object> params = new HashMap();

JasperReport jasperReport =

JasperPrint jasperPrint =
jasperReport, params, new JREmptyDataSource());

jasperPrint, reportDest);


catch (JRException ex)

Jan Cumps

Joined: Dec 20, 2006
Posts: 2551

Welcome to JavaRanch, Pritam.

I have moved this post to our Other Open Source Projects forum.

Please use code tags when posting code.
You can edit your post by clicking on the Edit icon at its right top.

Regards, Jan

OCUP UML fundamental and ITIL foundation
David Newton

Joined: Sep 29, 2008
Posts: 12617

Why are you importing classes you're not using directly?

In any case, I'd say you either don't have ASM on your classpath, or have the wrong version.
vishnu priya

Joined: Nov 06, 2009
Posts: 13
I am having the same the problem.
I am getting the same exception as mentioned above.
Can any one please help me out.

Thanks in advance
David Newton

Joined: Sep 29, 2008
Posts: 12617

Same response.
I agree. Here's the link: http://aspose.com/file-tools
subject: Jasper Report Issue
It's not a secret anymore!