|
Re: Placing library in RAP environment [message #782835 is a reply to message #782729] |
Tue, 24 January 2012 14:46 |
|
Is the library in the same folder as the report design?
Jason
On 1/24/2012 5:02 AM, Gabor Grocz wrote:
> Hello everyone,
>
> I have a stupid question. I have a report with library. It is running
> fine within eclipse but not in my RAP environment. How should I place
> the my BIRT library in a RAP environment? Now I get the following error:
>
> 2012.01.24. 9:22:11 org.eclipse.birt.report.model.core.LayoutModule
> loadLibrarySilently
> WARNING: Syntax error found, and see error details.
> Error.DesignFileException.SYNTAX_ERROR - 1 errors found! 1.)
> org.eclipse.birt.report.model.parser.DesignParserException (code =
> Error.DesignParserException.FILE_NOT_FOUND, message : The file
> "ri3_mysql.rptlibrary" is not found.)
>
> at
> org.eclipse.birt.report.model.core.LayoutModule.loadLibrary(LayoutModule.java:378)
>
>
>
> The design reference is the following:
> <list-property name="libraries">
> <structure>
> <property name="fileName">ri3_mysql.rptlibrary</property>
> <property name="namespace">ri3_mysql</property>
> </structure>
> </list-property>
>
> But however I try to place the library file I got the same error.
> Thanks,
> Gábor
>
|
|
|
|
Re: Placing library in RAP environment [message #782989 is a reply to message #782855] |
Tue, 24 January 2012 21:49 |
|
I am not very familiar with RAP, but from the log the library is not
being located. When we deploy the BIRT Viewer we set the resource
folder in the web.xml and in the designer it is set in the preferences.
What does the directory to the report look like when deployed in RAP?
Jason
On 1/24/2012 10:31 AM, Gabor Grocz wrote:
> Hi Jason,
>
> yes there is next to the report.
|
|
|
|
Re: Placing library in RAP environment [message #783396 is a reply to message #783316] |
Wed, 25 January 2012 16:30 |
|
You could try setting the resource path in the EngineConfig.
config.setResourcePath("directoryoflibs");
Jason
On 1/25/2012 8:44 AM, Gabor Grocz wrote:
> Honestly our implementation doesn't use the viewer inside the app. I use
> the following code to insert the report:
>
>
> try {
> config = new EngineConfig();
> IReportEngineFactory factory = (IReportEngineFactory) Platform
> .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
> engine = factory.createReportEngine(config);
>
> URL url;
> InputStream fs = null;
> try {
> url = getReportURL();
> fs = url.openStream();
> } catch (MalformedURLException ex) {
> ex.printStackTrace();
> } catch (IOException ex) {
> ex.printStackTrace();
> }
>
> design = engine.openReportDesign(fs);
>
> // Create task to run and render the report
> task = engine.createRunAndRenderTask(design);
>
> // Render the report to HTML
> renderOptions = new HTMLRenderOption();
> renderOptions.setOutputFormat(HTMLRenderOption.HTML);
> renderOptions.setOutputStream(outputStream);
>
> task.setRenderOption(renderOptions);
> task.run();
> task.close();
>
> browser.setText(outputStream.toString());
>
> engine.destroy();
>
> } catch (EngineException ex) {
> ex.printStackTrace();
> }
>
>
> So actually I just insert the HTML output into the swt browser. The
> design and the library are in the same directory and they are on the
> classpath. Should I set somehow the EngineConfig to find the library?
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06742 seconds