Jump to content
Changes to the Jaspersoft community edition download ×

Trouble java.sql.Time/


2004 IR Help

Recommended Posts

By: dnelson - lizardpie

Trouble java.sql.Time/

2004-12-14 13:43

I'm getting the error below when running my report within my application.

 

"duration" is a field of type time in a MySQL database. The values stored are in the form 00:00:00.

 

In the report I'm trying to do a sum and average of the duration and display it. I've created variables to do this.

 

However, when the report is filled this error occurs.

I've been having many problems displaying this duration field. In the report query, when a Read Fields is done, the duration field shows as a Date, but it's really a Time.

 

Any help would be appreciated.

 

---------------------------

java.sql.SQLException: java.sql.SQLException

at com.mysql.jdbc.ResultSet.getTimeInternal(ResultSet.java:3768)

at com.mysql.jdbc.ResultSet.getTime(ResultSet.java:1835)

at com.mysql.jdbc.ResultSet.getTime(ResultSet.java:1848)

at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:180)

at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:727)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:188)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:475)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:120)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:222)

at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:741)

at com.apexvoice.omniview.util.GenerateReportWorker.construct(Unknown Source)

at com.apexvoice.omniview.util.SwingWorker$2.run(Unknown Source)

at java.lang.Thread.run(Thread.java:595)

 

NESTED BY :

java.sql.SQLException: java.sql.SQLException

at com.mysql.jdbc.ResultSet.getTimeInternal(ResultSet.java:3768)

at com.mysql.jdbc.ResultSet.getTime(ResultSet.java:1835)

at com.mysql.jdbc.ResultSet.getTime(ResultSet.java:1848)

at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:180)

at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:727)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:188)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:475)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:120)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:222)

at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:741)

at com.apexvoice.omniview.util.GenerateReportWorker.construct(Unknown Source)

at com.apexvoice.omniview.util.SwingWorker$2.run(Unknown Source)

at java.lang.Thread.run(Thread.java:595)

 

NESTED BY :

net.sf.jasperreports.engine.JRException: Unable to get value for field 'duration' of class 'java.sql.Time'

at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:279)

at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:727)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:188)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:475)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:120)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:222)

at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:741)

at com.apexvoice.omniview.util.GenerateReportWorker.construct(Unknown Source)

at com.apexvoice.omniview.util.SwingWorker$2.run(Unknown Source)

at java.lang.Thread.run(Thread.java:595)

Caused by: java.sql.SQLException: java.sql.SQLException

at com.mysql.jdbc.ResultSet.getTimeInternal(ResultSet.java:3768)

at com.mysql.jdbc.ResultSet.getTime(ResultSet.java:1835)

at com.mysql.jdbc.ResultSet.getTime(ResultSet.java:1848)

at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:180)

... 10 more

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...