Jump to content
We've recently updated our Privacy Statement, available here ×

Unexpected exception caught


ivanyiu

Recommended Posts

I'm trying to generate a very simple report, the report can be successfully generated using iReport tools preview.

But in the Java module calling to JasperFillManager.fillReport(InputStream, hashMap, Connection), an unknown exception thrown and the description cannot provide any idea.

 

The exception is

net.sf.jasperreports.engine.JRRuntimeException: Unknown hyperlink target 0

 

Does anyone know what is the cause of the problem? Many thanks.

 

Here's the stack trace for the error.

 

net.sf.jasperreports.engine.JRRuntimeException: Unknown hyperlink target 0
    at net.sf.jasperreports.engine.JRHyperlinkHelper.getLinkTarget(JRHyperlinkHelper.java:269)
    at net.sf.jasperreports.engine.base.JRBaseTextField.normalizeLinkTarget(JRBaseTextField.java:313)
    at net.sf.jasperreports.engine.base.JRBaseTextField.readObject(JRBaseTextField.java:377)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at java.util.ArrayList.readObject(ArrayList.java:593)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
    at net.sf.jasperreports.engine.base.JRBaseReport.readObject(JRBaseReport.java:742)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:194)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:376)
 



Post Edited by ivanyiu at 04/14/2010 05:27



Post Edited by ivanyiu at 04/14/2010 05:28
Link to comment
Share on other sites

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

I've found out the problem. Since iReport is upgraded to 3.7.2, the Java project is still use the JasperReport version 3.7.0. Seems that 3.7.2 iReport generated jasper file is not compatible with the 3.7.0 Java library. After upgrading the JasperReport Java library, the report generation running correctly.
Link to comment
Share on other sites

You wrote:

>After upgrading the JasperReport Java library, the report generation running >correctly.

Could you be so kind to expalin step by step how to do?

After upgraded to 3.7.2 I am not more able to print report nor from iReport 3.7.1 nor from my Tomcat webapp, I always get the exception. The only way is from iReport 3.7.2

 

TIA

Link to comment
Share on other sites

  • 2 weeks later...

Reverting back to iReport 3.7.1 fixed this error. This may be simpler for you that upgrading to jasper reports 3.7.2. There must be an incompatibility between iReport 3.7.2 and Jasper Report 3.7.1 and

I didn't know you had to upgrade iReports and Jasper Reports in lockstep.
Link to comment
Share on other sites

Hi,

i just started with iReport and downloaded iReport-3.7.2 and could generate a simple report and preview it. Was allright. Then i tried to start this report in Oracle APEX and got the same Error Message as ivanyiu.

As he worked out there may be an incompatibility between iReport 3.7.2 and the corresponding Jasper Report library. But i can not revert back to 3.7.1. I didn't find a way to upgrade Jasper Report. Can anybody help me?

 

Michael

Link to comment
Share on other sites

  • 2 weeks later...
After reverting it works well. At first i didn't realize that download of an earlier version of ireport is possible. Now i am more than happy. iReport in connection to Oracle APEX is the ultimative solution. Really great.
Link to comment
Share on other sites

  • 3 months later...
  • 9 months later...

I have been using iReport 3.7.5 with jasperserver 3.7.1 without problem since Sep 2010. But now I'm faced with the "unknown hyperlink target 0" also. I figured the difference of what I did so far was the other reports that worked fine were edited using iReport plugin after they were uploaded to jasperserver, while this problematic one is simply uploaded with no further editing. So I tried opening the jasperserver report unit via iReport plugin, made a small edit, and replace the report unit with that file. Then it worked.

However, I did remember previously reports uploaded without further edit did work, and only this particular one did not work. Anyway, this may be worth a try if you do not with to downgrade iReport or upgrade jasperserver.

Cheers.

Link to comment
Share on other sites

  • 2 months later...

Hello,

I was using 3.6.2 version of ireport and now migrated to 3.7.6 version of ireport. I also got the same problem and resolved it.

Solution:

copied the below two jars in apache tomcat lib folder and it started working.

1) jasperreports-3.7.6.jar

2) groovy-all-1.7.5.jar

Note - these jars can be obtained from installed folder of ireport.

Path - <Program Files>/JasperSoft/iReport-3.7.6/ireport/modules/ext.

Thanks,

Raghav.

 

Link to comment
Share on other sites

  • 6 months later...

Hi ,

This kind of exception might be occure , because u have firrent name of jrxm file and namegiven in jrxm tag

 

For Ex,:-

your  jrxm file name is report.jrxml and name(in bold letters in below code) is diffrent.

<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">

Link to comment
Share on other sites

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