aspose file tools*
The moose likes JDBC and the fly likes Exception in thread (Z)V" title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V

pritam patil
Greenhorn

Joined: Feb 09, 2010
Posts: 2
while Compling jasper reports 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)

Source code for the same is as follows :

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();

try
{
JasperReport jasperReport =
JasperCompileManager.compileReport(reportSource);

JasperPrint jasperPrint =
JasperFillManager.fillReport(
jasperReport, params, new JREmptyDataSource());

JasperExportManager.exportReportToHtmlFile(
jasperPrint, reportDest);

JasperViewer.viewReport(jasperPrint);
}

catch (JRException ex)
{
ex.printStackTrace();
}
}
}

Please provide help on above topic........


Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2516
    
  10

Let's discuss in your other post on the same.
Closing this duplicate.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V