Jump to content
Changes to the Jaspersoft community edition download ×

Error when Filling Reports


Recommended Posts

By: Danny Liu - dsyliu

Error when Filling Reports

2003-06-05 09:09

Greeting,

 

I am trying to run Jasper from a servlet and now I encounter problems when filling the report. Following is my code.

 

String path = new String();

path = TemplateProperties.getInstance().getResourcePath() + "lib";

 

System.setProperty( "jasper.reports.compile.class.path", path+"/jasperreports.jar");

JasperDesign design = JasperManager.loadXmlDesign( report.getXmlSourceWithFullPath() );

JasperReport jasperReport = JasperCompileManager.compileReport( design );

 

Map parameters = new HashMap();

Class.forName( "com.sybase.jdbc.SybDriver" );

Connection conn = DriverManager.getConnection( "jdbc:sybase:Tds:123.123.123.123:4100/myDB", "sa", "sa" );

 

JasperPrint jasperPrint = JasperFillManager.fillReport( jasperReport, parameters, conn );

 

Where report.getXmlSourceWithFullPath() returns the filename of the xml file I created using IReport. (Notice it's a .xml file, not compiled .jasper bytecode). The query I have in the xml file is "select customerID, name from customer where customerID < 50" and it's a valid query.

 

Now I got error when I reach the last line of the code, and here is the error msg:

 

Message sending failed --com.metro.xp.ui.io.QueryFailedException: An exception occurred and may or may not have been handled: MessageInsertQuery: recipients are

not allowed for debug

 

java.lang.reflect.InvocationTargetException: java.lang.AbstractMethodError

at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:411)

at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:115)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.jav

a:219)

 

 

one thing is that I encountered "UTF-8" error before, and I solved it by downloading the patch file and ant build the whole source again to create a new jasperreports.jar. I use jdk1.3, don't know if it has any effect.

 

Thank you for any help.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...