Jump to content
JasperReports Library 7.0 is now available ×

Image not found


Recommended Posts

By: Outey Ky - chhunak

Image not found

2002-10-29 17:45

When I tried to run the HTML.jsp example in Websphere 3.5.3 I am encountering the following problem:

 

dori.jasper.engine.JRException: Image not found : dori/jasper/engine/images/pixel.GIF

at dori.jasper.engine.JRException.(JRException.java:95)

 

Here is my JSP file, and in my Websphere classpath I also have listed jasperreport.jar file.

 

<%@ page errorPage="error.jsp" %>

<%@ page import="dori.jasper.*" %>

<%@ page import="dori.jasper.engine.*" %>

<%@ page import="java.util.*" %>

<%@ page import="java.io.*" %>

<%@ page import="javax.servlet.*" %>

<%@ page import="javax.servlet.http.*" %>

<%@ page import="com.ssr.gedi.servlet.*" %>

<%@ page import="com.ssr.gedi.servlet.ServletReport" %>

<%@ page import="com.ssr.gedi.servlet.ServletLogin" %>

<%@ page import="com.ssr.gedi.servlet.ServletFather" %>

<%@ page import="com.ssr.gedi.classes.*" %>

 

<%

File reportFile = new File(application.getRealPath("/reports/mydoc.jasper"));

 

Map parameters = new HashMap();

parameters.put("ReportTitle", "TestReport");

parameters.put("BaseDir", reportFile.getParentFile());

 

String htmlFileName =

JasperRunManager.runReportToHtmlFile(

reportFile.getPath(),

parameters,

new JREmptyDataSource());

 

response.sendRedirect("/reports/mydoc.html");

%>

 

I am not sure I am gettting this image not found problem.

 

 

By: Teodor Danciu - teodord

RE: Image not found

2002-10-30 12:45

 

Hi,

 

Have you compiled the library source files and

created the jasperreports.jar file yourself?

Check to see it contains 3 GIF files in the

dori/jasper/engine/images directory.

 

I hope this helps.

Teodor

 

 

 

By: Outey Ky - chhunak

RE: Image not found

2002-10-30 12:53

Thanks. I took the downloaded jasperreports.jar and copy to my project api directory on websphere server and reference it in project classpath , and I can see that I have 10 GIFs files there under dori/jasper/engine/images so what I did is create a directory under my serlvets path of dori/jasper/engine/images and place all ten of those images there. It's okay now, but I don't see why it was giving problem in Jasperreports.jar

 

Maybe b/c of Websphere 3.5.3

 

Thanks again.

 

 

By: Teodor Danciu - teodord

RE: Image not found

2002-10-30 13:04

 

Hi,

 

In the dori/jasper/engine/images there are only

3 GIF files.

Maybe you are talking about the

dori/jasper/view/images directory,

which indeed contains 10 GIFs.

 

Anyway, these images are used by the library

and should be part of the classpath.

This is why they are included in the

jasperreports.jar.

If you build this JAR file yourself, make sure you

include them.

 

Good luck!

Teodor

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