Jump to content
Changes to the Jaspersoft community edition download ×

Issue while compiling report.


Recommended Posts

By: Shekar - shekarlsp

Issue while compiling report.

2003-03-07 15:49

Hi Folks,

Seem to have a strange problem at my end. I am trying to compile a report using the JRCompiler.compileReport(jasperDesignHandle) method. All the field in my report are declared as String, but for some strange reason it throws up the following exception

 

*********Exception Starts Here**********************

04:56:56:812 AM dori.jasper.engine.JRException: Errors were encountered when compiling report design:

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:121: Invalid cast from java.lang.String to java.lang.Integer.

value = (java.lang.Integer)(((java.lang.String)field_ifspeed.getValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:136: Invalid cast from java.lang.String to java.lang.Long.

value = (java.lang.Long)(((java.lang.String)field_timeval.getValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:156: Invalid cast from java.lang.String to java.lang.Long.

value = (java.lang.Long)(((java.lang.String)field_val.getValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:206: Invalid cast from java.lang.String to java.lang.Integer.

value = (java.lang.Integer)(((java.lang.String)field_ifindex.getValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:269: Invalid cast from java.lang.String to java.lang.Integer.

value = (java.lang.Integer)(((java.lang.String)field_ifspeed.getOldValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:284: Invalid cast from java.lang.String to java.lang.Long.

value = (java.lang.Long)(((java.lang.String)field_timeval.getOldValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:304: Invalid cast from java.lang.String to java.lang.Long.

value = (java.lang.Long)(((java.lang.String)field_val.getOldValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:354: Invalid cast from java.lang.String to java.lang.Integer.

value = (java.lang.Integer)(((java.lang.String)field_ifindex.getOldValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:417: Invalid cast from java.lang.String to java.lang.Integer.

value = (java.lang.Integer)(((java.lang.String)field_ifspeed.getValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:432: Invalid cast from java.lang.String to java.lang.Long.

value = (java.lang.Long)(((java.lang.String)field_timeval.getValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:452: Invalid cast from java.lang.String to java.lang.Long.

value = (java.lang.Long)(((java.lang.String)field_val.getValue()));

^

D:AdventNet_SP5AdventNetWebNMSUntitled_report_1.java:502: Invalid cast from java.lang.String to java.lang.Integer.

value = (java.lang.Integer)(((java.lang.String)field_ifindex.getValue()));

^

12 errors

 

at dori.jasper.engine.design.JRCompiler.compileReport(JRCompiler.java:150)

at com.adventnet.demo.AdventNetReportData.getData(AdventNetReportData.java:43)

at com.adventnet.demo.ReportServerImpl.getCustomizedReportData(ReportServerImpl.java:80)

at java.lang.reflect.Method.invoke(Native Method)

at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)

at sun.rmi.transport.Transport$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

 

______Exception Ends Here_________________

 

I would like to understand as to what is happening behind the scene. Before you can ask, I have tools.jar in my classpath :-)

 

I am using a data source that I have developed. It is based on the AbstractTableModel and it is very generic. I am on WinNT.

 

Trust this info helps

 

Any help would be highly appriciated.

 

Thanks In Advance,

Shekar

 

 

 

 

By: Teodor Danciu - teodord

RE: Issue while compiling report.

2003-03-10 00:11

 

Hi,

 

Check the "class" attribute of your text field expressions.

There it seems you are using Long and Integer

to display String values.

 

I hope this helps.

Teodor

 

 

 

 

 

By: Shekar - shekarlsp

RE: Issue while compiling report.

2003-03-11 02:08

Hi Teodor,

I did figure this out. Thanks.

 

Shekar

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