PDA

View Full Version : No images (pie chart) coming up



niru
11-01-2007, 10:47 PM
Hi,

I am using Pentaho 1.5.5 integrated into our J2EE application.
I got a custom dashboard to work on the Pentaho Jboss server however when I integrated it on our j2ee webapp, I don't get any image. I don't get any errors also. Here is the debug trace I get

DEBUG: org.jfree.text.TextBlock:width = 0.0, height = 0.0
DEBUG: org.jfree.text.TextLine:width = 71.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 27.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 71.0, height = 25.15625
DEBUG: org.jfree.text.TextLine:width = 62.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 27.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 62.0, height = 25.15625
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 66.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextLine:width = 69.0, height = 12.578125
DEBUG: org.jfree.text.TextBlock:width = 69.0, height = 12.578125


any ideas why the dashboard image doesn't show up at all.

Thanks for any pointers!
http://forums.pentaho.org/images/buttons/quote.gif (http://forums.pentaho.org/newreply.php?do=newreply&p=173310)

Taqua
11-02-2007, 06:24 AM
The log messages at least indicate that someone somewhere has called JFreeChart and that the chart has been rendered.

Does your generated HTML page contains the links/image-elements to the chart? And what happens if you call that link directly? If your link calls a servlet called "getImage" or "getContent": Does your temp-directory contains the images for the charts?

And why do you stick with a pre-version instead of using the stable 1.6 release?

niru
11-16-2007, 12:13 AM
Hi Taqua

I moved to Pentaho 1.6 and still no image is displayed when I am trying to render a pie chart using charting api mimicing the dashboard example.

When I directly use the chart image, it gives an http status 404 error - Not found.

Which temp directory is the tmp chart stored in - when I click on the screen where the image is supposed to be rendered, it takes me to
https://localhost:8443/myapp/sa/getImage?image=tmp_chart_47801.png

This is my application url - however where would I find tmp_chart_*.png.

Thanks for your help!!

Can you give any pointers on how to DEBUG this. I added to my log4j.xml a logger for org.jfree in DEBUG mode as well as org.pentaho. the only debug info it prints is below

DEBUG - Starting new database transaction in this thread.
DEBUG - Opening new Session for this thread.
DEBUG - F560405CD59EA68E48F6061F78F2DE85rg.pentaho.ui.component.charting.PieDa
tasetChartComponent piechartleadsandsales.xaction: newRuntimeElement(F560405CD59
EA68E48F6061F78F2DE85,session)
DEBUG - F560405CD59EA68E48F6061F78F2DE85rg.pentaho.ui.component.charting.PieDa
tasetChartComponent piechartleadsandsales.xaction: Created instanceId: d46f2063-
93f7-11dc-9e88-ff20a01d0f34
DEBUG - d46f2063-93f7-11dc-9e88-ff20a01d0f34:SOLUTION-ENGINE piechartleadsandsal
es.xaction: Loading action sequence definition file
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml\samples\dashboard\piechartleadsandsales.xaction
DEBUG - d46f2063-93f7-11dc-9e88-ff20a01d0f34:RUNTIME:context-1489449-11951853544
53:piechartleadsandsales.xaction audit: instanceId=d46f2063-93f7-11dc-9e88-ff20a
01d0f34, objectId=org.pentaho.core.runtime.RuntimeContext, messageType=action_se
quence_start
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml
DEBUG - ::: Starting execute of samples/dashboard/piechartleadsandsales.xaction
DEBUG - :SOLUTION-ENGINEiechartleadsandsales.xaction: Getting runtime context
and data
DEBUG - Starting new database transaction in this thread.
DEBUG - Opening new Session for this thread.
DEBUG - F560405CD59EA68E48F6061F78F2DE85rg.pentaho.ui.component.charting.PieDa
tasetChartComponent piechartleadsandsales.xaction: newRuntimeElement(F560405CD59
EA68E48F6061F78F2DE85,session)
DEBUG - F560405CD59EA68E48F6061F78F2DE85rg.pentaho.ui.component.charting.PieDa
tasetChartComponent:piechartleadsandsales.xaction: Created instanceId: d9d125d4-
93f7-11dc-9e88-ff20a01d0f34
DEBUG - d9d125d4-93f7-11dc-9e88-ff20a01d0f34:SOLUTION-ENGINE piechartleadsandsal
es.xaction: Loading action sequence definition file
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml\samples\dashboard\piechartleadsandsales.xaction
DEBUG - d9d125d4-93f7-11dc-9e88-ff20a01d0f34:RUNTIME:context-9608916-11951853634
84 piechartleadsandsales.xaction audit: instanceId=d9d125d4-93f7-11dc-9e88-ff20a
01d0f34, objectId=org.pentaho.core.runtime.RuntimeContext, messageType=action_se
quence_start
DEBUG - SOLUTION-REPOSITORY: SolutionRepository.DEBUG_FILE_PATH - getFile path=C
:\pentaholib\standalonexml



The log messages at least indicate that someone somewhere has called JFreeChart and that the chart has been rendered.

Does your generated HTML page contains the links/image-elements to the chart? And what happens if you call that link directly? If your link calls a servlet called "getImage" or "getContent": Does your temp-directory contains the images for the charts?

And why do you stick with a pre-version instead of using the stable 1.6 release?

niru
11-16-2007, 12:35 AM
Hi Taqua

I actually found the image in my SOLUTION_ROOT/system/tmp directory and it has built the image correctly. However for some reason, it is not picking it up in the html page.

When I click on it, it goes to

https://localhost:8443/myapp/sa/getImage?image=tmp_chart_47801.png

https://localhost:8443/myapp/sa is my application's url. However, where is the getImage function coming from.

Is it specified somewhere in the chart function as to where to look for the image.

Really appreciate any help in this matter.

Thanks so much
Niru

niru
11-16-2007, 01:07 AM
Hi Taqua

I found the getImage method in the jfreeChart library and it is being used in ChartComponent to actually display the image I guess.

However, how do I specify to it to pick up from the image from

SOLUTION_ROOT\system\tmp path. Is there an attribute I could set to specify this.

Thanks so much
Niru

svallejo
11-16-2007, 08:49 AM
in the jsp:

//variable for the output "salidave"
ByteArrayOutputStream salidave = new ByteArrayOutputStream();

// doaction method the output of the action is given to "salidave" variable
ChartHelper.doAction( "samples", "fgsa", "metasve.xaction", "Titulo", parameters, salidave, userSession, messages, null );

in the xaction

// you MUST define the "content" response.
YOU MUST USE THE NAME "content"

<outputs>
<image-tag type="string">
<destinations>
<response>content</response>
</destinations>
</image-tag>
</outputs>

niru
11-16-2007, 10:42 AM
Hi,

Thanks for the suggestion. I added the outputs section to the xaction however it gives me the following error...

ERROR - 1bb5d22d-944f-11dc-9ca5-47e591ab8342:RUNTIME:context-21721257-1195222840
250:piechartleadsandsales.xaction RuntimeContext.ERROR_0029 - Error output parameter "image-tag" not found during save.

Has image-tag attribute been changed?

On the browser, it gives me

Could not generate chart image.
Could not load chart data from samples/dashboard/piechartleadsandsales.xaction
Thanks for your help
Niru

svallejo
11-19-2007, 08:53 AM
Please post the xaction and the JSP code.

niru
11-19-2007, 07:01 PM
Attached is my jsp and xaction



Please post the xaction and the JSP code.

svallejo
11-20-2007, 09:48 AM
Please attach the piechartleadsandsales.xml and the .jsp

niru
11-20-2007, 06:46 PM
Attached is the piechartleadsandsales.xml. The jsp being used is the MyDashboard.jsp that I previously sent.

thanks for your help!!
Niru

alien_mx
11-21-2007, 12:19 PM
Hi Taqua

I found the getImage method in the jfreeChart library and it is being used in ChartComponent to actually display the image I guess.

However, how do I specify to it to pick up from the image from

SOLUTION_ROOT\system\tmp path. Is there an attribute I could set to specify this.

Thanks so much
Niru



hi niru, i had the same problem, check the base_url in your web.xml, this take the path solution.......temp and find your image

niru
11-25-2007, 06:26 PM
The trick was to include the getContent and getImage servlets in our webapp.

Thanks a lot for responding...


hi niru, i had the same problem, check the base_url in your web.xml, this take the path solution.......temp and find your image