Jump to content
JasperReports Library 7.0 is now available ×

jasper subreport in pentaho


hanzpk

Recommended Posts

please forgive me if this kind of post is not ethical

 

i am using ireport 1.2.7 to create jasperreport 1.2.7 report with subreport and deployed it on pentaho 1.2 rc1

upon previewing in ireport everything works fine

but when it get to pentaho, it says cannot load object xxx ( which is subreport name )

 

i've tried using subreport_dir parameter too, but no success.

 

i am hoping i might get a shed of light here.

thank you

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

oh sorry for long reply .. :D

i am using pentaho 1.2 rc 3

connection using jndi

and i put the xaction file ( pentaho action files ) in the same directory with the jasper files

oh ya, it's working just fine in ireport

and it's working if i put the jasper files in pentaho/web-inf/classes on jboss/deploy

but it'll be messy

 

error stack in pentaho :

 

2006-11-20 14:17:58,703 ERROR [org.pentaho.plugin.jasperreports.JasperReportsComponent] 363b1df2-7867-11db-8710-99fb70f52e9e:COMPONENT:context-28930285-1164007062453:test4.xaction JasperReport.ERROR_0014 - Report execution failed

net.sf.jasperreports.engine.JRException: Could not load object from location : /jasper/cpdr010s1.jasper

at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:258)

at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:315)

at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275)

at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1289)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:750)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:647)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)

at org.pentaho.plugin.jasperreports.JasperReportsComponent.executeAction(JasperReportsComponent.java:491)

at org.pentaho.plugin.ComponentBase.execute(ComponentBase.java:421)

at org.pentaho.core.runtime.RuntimeContext.executeComponent(RuntimeContext.java:989)

at org.pentaho.core.runtime.RuntimeContext.executeAction(RuntimeContext.java:961)

at org.pentaho.core.runtime.RuntimeContext.performActions(RuntimeContext.java:877)

at org.pentaho.core.runtime.RuntimeContext.executeLoop(RuntimeContext.java:833)

at org.pentaho.core.runtime.RuntimeContext.executeSequence(RuntimeContext.java:739)

at org.pentaho.core.runtime.RuntimeContext.executeSequence(RuntimeContext.java:655)

at org.pentaho.core.solution.SolutionEngine.executeInternal(SolutionEngine.java:265)

at org.pentaho.core.solution.SolutionEngine.execute(SolutionEngine.java:209)

at org.pentaho.core.services.BaseRequestHandler.handleActionRequest(BaseRequestHandler.java:140)

at org.pentaho.ui.servlet.ViewAction.doGet(ViewAction.java:153)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.pentaho.core.system.SystemStatusFilter.doFilter(SystemStatusFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)

at java.lang.Thread.run(Thread.java:534)

2006-11-20 14:17:58,703 ERROR [org.pentaho.plugin.jasperreports.JasperReportsComponent] Error end:

[file name=error.zip size=17541]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/error.zip[/file]

Post edited by: hanzpk, at: 2006/11/20 06:35

Link to comment
Share on other sites

Hi,

 

It seems you are referencing a subreport template using a String expression. In such case the engine tries to see if the String is a valid URL, if it the name of a file in the file system or if it is a name of a resource within classpath. It seems everything fails and the engine cannot find the subreport template file.

Make sure you put it in a place that it is accessible to the engine at runtime. Apperently you did not.

 

We recommend putting report templates within classpath.

If you don't like it, you should try make the subreport expression dynamic using a base directory or something similar to what we did in the /demo/samples/webapp sample provided with the project, where we are looking up for an image file. Things are the same with subreport files.

 

I hope this helps.

Teodor

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