Muralidhar Yaragalla
Muralidhar Yaragalla

Reputation: 427

There is no report design object available. :birt report design

Hi I have a report which is working fine on my local machine. i am using eclipse birt and birt viewer app. when i deploy on the cloud machine (which we brought on internet) report pdf is not getting displayed instead it is showing the following error. what could be the problem?

My localhost OS is windows7. cloud server is linux. we are working with birt4.3. work environment is tomcat7 ,mysql database. we are using pojodata source for report generation. kindly help me solve this. thanking you.

org.eclipse.birt.report.exception.ViewerException: There is no report design object available. at org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:226) at org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:230) at org.eclipse.birt.report.context.ViewerAttributeBean.(ViewerAttributeBean.java:118) at org.eclipse.birt.report.context.BirtContext.__init(BirtContext.java:44) at org.eclipse.birt.report.context.BaseContext.(BaseContext.java:69) at org.eclipse.birt.report.context.BirtContext.(BirtContext.java:30) at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:150) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:243) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at com.zedlabs.birt.BIRTFilterForFrameworks.doFilter(BIRTFilterForFrameworks.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

Upvotes: 1

Views: 6553

Answers (4)

Hey StackExchange
Hey StackExchange

Reputation: 2125

Ensure BIRT development tools match the runtime version.

If you transfert your rptdesign by FTP/SFTP, ensure the transfer is made is ASCII

Upvotes: 0

Aity
Aity

Reputation: 11

Set value of following context param to false in web.xml:

<context-param>
    <param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
    <param-value>false</param-value> 
</context-param>

Upvotes: 1

Volodymyr Grynda
Volodymyr Grynda

Reputation: 41

The following worked for me:

Edit with new version of Birt designer, then open this file with text editor and change this labels to your version.

<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
    <property name="createdBy">Eclipse BIRT Designer Version 4.3.2.v20140211-1400 Build &lt;4.3.2.v20140218-1056></property>

Upvotes: 0

Rich Tillis
Rich Tillis

Reputation: 1571

The BIRT runtime is unable to locate your rptdesign files (the reports). You need to make sure you have configured the BIRT home. You do not need to set BIRT home in an Eclipse-based application which is why it works for you in the IDE. This link to Actuate provides help setting up the report engine.

Actuate's description of BIRT home and how its used:

The BIRT home, which is the location of the BIRT plug-ins and libraries, is the key property that the report engine requires. The report engine cannot parse a report design nor render the report without a defined BIRT home. For a stand-alone application, the BIRT home is an absolute path to a file system location. For an application running from a web archive (.war) file on an application server, the BIRT home is a relative path in the WAR file.

For a stand-alone application, use one of the following techniques:

1 - Call EngineConfig.setBIRTHome( ) with an argument that is the path to the BIRT home directory, for example:

config.setBIRTHome( "C:/birt-runtime-<version>/ReportEngine" );

2 - In the application’s environment, set up the BIRT_HOME and CLASSPATH variables to access the required libraries. For example, in a Windows batch file, include commands similar to the following ones before launching the stand-alone application:

set BIRT_HOME="C:\birt-runtime-<version>\ReportEngine"
SET CLASSPATH=%BIRT_HOME%\<required library 1>;%BIRT_HOME%\<required library 2 and so on>;%CLASSPATH%

To develop an application that uses a BIRT_HOME environment variable, set BIRT_HOME in the VM arguments in the Eclipse Run dialog. For example, in VM arguments, type text similar to the following line:

-DBIRT_HOME="C:\birt-runtime-<version>\ReportEngine"

For a deployed web application, use one of the following techniques:

1 - If the application has a location in the file system, use the servlet context to find the real path of the BIRT home, for example:

config.setBIRTHome( servletContext.getRealPath( "/WEB-INF" ) );

2 - If the application runs from a WAR file, use a relative path from the WAR file root, as shown in the following example. This configuration uses PlatformServletContext.

config.setBIRTHome( "" );

Additionally,

BIRT home is the default location the BIRT runtime is expecting to find the report files. If you choose another location to store your reports, you will also have to update the report viewer context parameters. Also, described by Actuate here:

To determine the locations for report designs, images in reports, and log files, the BIRT report viewer uses context parameters defined in the web.xml file. The path provided as the value for any of these parameters can be relative or absolute. A relative path is relative to the root folder of the BIRT report viewer application. A path to a writable location for a BIRT report viewer that is deployed as a WAR file must be an absolute path.

By default, the relative path for report designs is relative to the BIRT report viewer’s root folder. Place all report designs in this folder or use the full path to the report design in the URL. Using a relative path is not convenient for deployment of the BIRT report viewer in a WAR file as changes to report designs would require repackaging the WAR file. To set a different location for report designs, change the BIRT_VIEWER_WORKING_FOLDER parameter in the BIRT report viewer application’s web.xml file

To set the location for report designs:

  1. Navigate to $TOMCAT_INSTALL/webapps.
  2. Open web.xml in a code editor by performing one of the following steps, based on your deployment configuration:
    • If you use a WAR file to deploy the BIRT report viewer, extract WEB-INF/web.xml from birt.war into a temporary location.
    • If you use a folder to deploy the BIRT report viewer, navigate to /WEB-INF.
  3. Locate the following element:
<context-param>
<param-name>BIRT_VIEWER_WORKING_FOLDER</param-name> 
<param-value></param-value> 
</context-param>
  1. Change the param-value element, so that it includes the absolute path to the folder for the report designs, similar to the following code where Report_Folder is the absolute path to the folder for the report designs:
<context-param>
<param-name>BIRT_VIEWER_WORKING_FOLDER</param-name> 
<param-value>Report_Folder</param-value> 
</context-param>
  1. Save web.xml and close the editor.
  2. If you use a WAR file to deploy the BIRT report viewer, replace WEB-INF/web.xml in birt.war with the file just modified.
  3. Copy the report designs into the folder specified in the param-value element for BIRT_VIEWER_WORKING_FOLDER.
  4. Restart Apache Tomcat.

Sorry for this long list of potential solutions. Actuate provides many helpful details for the number of different ways you may have set up your environment. Hope this helps...

Upvotes: 2

Related Questions