Jaspersoft Community 'Read-Only' as of July 8, 2022
Transition to New TIBCO Community Just Weeks Away
You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.
Hello,
we use jasperreports 1.2.4 and have a very strange problem. The application server is an orion webserver 2.0.6 with jdk 1.5.0_04
We have several reports which run perfectly without any problems.
But one report (uses scriptlet) has this strange behavior:
The first user(user a) request in the webapplication with a servlet the report and get the report.
After that a second user (user b) request also the same report but receive nothing. Only the message that the datasource is null.
We analysed the situation and followed the error messages to the method setParameter(JRFillParameter parameter, Object value) in the JRFillDataset-Class.
The cause is when the Datasource is set by the method setParameter the statement If(parameter.getValueClass().isInstance(value)) is true for User A and for User B=false.
So we change the source (see bottom of the thread) that no JRException is thrown but without any affect.
This behavior is only in one report and when different users with different computers request the report from the webserver.
Any Ideas ?
protected void setParameter(JRFillParameter parameter, Object value) throws JRException
{
if (value != null)
{
if (parameter.getValueClass().isInstance(value))
{
parameter.setValue(value);
}
else
{
//new Code
//changed since exception was always thrown
//if munic users tried to print. Seems to be a java bug.
parameter.setValue(value);
System.err.println("Incompatible "
+ value.getClass().getName()
+ " value assigned to parameter "
+ parameter.getName()
+ " in the " + getName() + " dataset." );
}
// old code
// throw new JRException(
// "Incompatible "
// + value.getClass().getName()
// + " value assigned to parameter "
// + parameter.getName()
// + " in the " + getName() + " dataset."
// );
// }
}
else
{
parameter.setValue(value);
}
}
we use jasperreports 1.2.4 and have a very strange problem. The application server is an orion webserver 2.0.6 with jdk 1.5.0_04
We have several reports which run perfectly without any problems.
But one report (uses scriptlet) has this strange behavior:
The first user(user a) request in the webapplication with a servlet the report and get the report.
After that a second user (user b) request also the same report but receive nothing. Only the message that the datasource is null.
We analysed the situation and followed the error messages to the method setParameter(JRFillParameter parameter, Object value) in the JRFillDataset-Class.
The cause is when the Datasource is set by the method setParameter the statement If(parameter.getValueClass().isInstance(value)) is true for User A and for User B=false.
So we change the source (see bottom of the thread) that no JRException is thrown but without any affect.
This behavior is only in one report and when different users with different computers request the report from the webserver.
Any Ideas ?
protected void setParameter(JRFillParameter parameter, Object value) throws JRException
{
if (value != null)
{
if (parameter.getValueClass().isInstance(value))
{
parameter.setValue(value);
}
else
{
//new Code
//changed since exception was always thrown
//if munic users tried to print. Seems to be a java bug.
parameter.setValue(value);
System.err.println("Incompatible "
+ value.getClass().getName()
+ " value assigned to parameter "
+ parameter.getName()
+ " in the " + getName() + " dataset." );
}
// old code
// throw new JRException(
// "Incompatible "
// + value.getClass().getName()
// + " value assigned to parameter "
// + parameter.getName()
// + " in the " + getName() + " dataset."
// );
// }
}
else
{
parameter.setValue(value);
}
}
2 Answers:
Posted on August 7, 2006 at 9:28am
Hi,
We are currently tracking something that seems to be related to the Orion class loaders. So for no significant progress has been made on this.
Maybe you could add some feedback on this.
http://jasperforge.org/sf/go/artf1373?nav=1
Thank you,
Teodor
We are currently tracking something that seems to be related to the Orion class loaders. So for no significant progress has been made on this.
Maybe you could add some feedback on this.
http://jasperforge.org/sf/go/artf1373?nav=1
Thank you,
Teodor