Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Cannot get any Library file to work(Cannot get any Library file to work)
Cannot get any Library file to work [message #1668379] Thu, 12 March 2015 13:08 Go to next message
Al Koch is currently offline Al KochFriend
Messages: 62
Registered: August 2011
Member
Hello,

I have been trying for over a month to use a Library with a report. I have tried creating numerous Libraries but I always end up crashing the ViewerServlet. I have attached as simple a Library and report as is possible to create which doesn't crash the ViewerServlet but instead fails to display properly. I suspect this problems may be related to my crashes.

Here's the details:

- In the Library I simply place a Text element on the Library's Layout page and then I drag that onto the report's Layout page. The Report runs under the ViewerServlet without crashing or generating an error but I don't see the Text element from the Library on the Report.
- The Library and Report are in the same folder in the Designer and I place them both in the deployed BIRT.war folder so that they have the same relative location when deployed.
- I am running BIRT under JBoss 7.
- I access the report with http://IPAddressOfJBoss:JBossPort/BIRT/frameset?__report=Rep1.rptdesign

Thank you for your help.

Re: Cannot get any Library file to work [message #1687941 is a reply to message #1668379] Fri, 20 March 2015 00:34 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Works for me. I think the issue you're having is the full path to the library. When I looked at your report, it had the full path etc/... listed as the path to the library. In my report, it simply says Lib1.rptlibrary and it works deployed to BIRT in JBoss 7.1.1. Hope this helps.

Michael

Developer Evangelist, Silanis
Re: Cannot get any Library file to work [message #1688426 is a reply to message #1687941] Fri, 20 March 2015 17:26 Go to previous messageGo to next message
Al Koch is currently offline Al KochFriend
Messages: 62
Registered: August 2011
Member
Hi Michael ,

Thank you for your response.

When you mentioned the path I took a guess and looked at the XML for the report and I see that the Library has a "full path" that looks like:
<property name="fileName">src/main/webapp/resources/Reports/Lib1.rptlibrary</property>.
I manually changed that to look like:
<property name="fileName">Lib1.rptlibrary</property>
and the report worked!

However, I am confused as to how that path is set and how I can control it.

I have a typical Eclipse Java EE folder setup when I am designing and to try and keep things simple I create both the Library and the report in the same folder (src/main/webapp/resources/Reports). Then I copy both of them to the BIRT.war folder. I can now see thats why the server could not locate the Library but how do I specify what the path used in <property> is supposed to be? Do I have to replicate the desired deployment path structure under my Eclipse project's top level folder?

Thank you for your help.


Re: Cannot get any Library file to work [message #1688469 is a reply to message #1688426] Fri, 20 March 2015 19:27 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Whatever path you use in your project is the path that it'll have to be in your deployment, unless you change the value in the XML. So, from the root of your project to the file, you'll need that same setup in your deployed viewer war. In your case, the library should work if you created the structure of src/main/webapp/resources/Reports/ and placed your library there.

Michael

Developer Evangelist, Silanis
Re: Cannot get any Library file to work [message #1689378 is a reply to message #1688469] Mon, 23 March 2015 12:46 Go to previous messageGo to next message
Al Koch is currently offline Al KochFriend
Messages: 62
Registered: August 2011
Member
Hi Michael,

Thanks but I am curious. This requires that I replicate in the Eclipse project directory structure my desired deployment directory structure but that isn't an ideal layout. Is there a reason why a "full path" is used rather than a relative path? It seems (at least in my case) a relative path is more flexible.

As always, thank you for your help!
Re: Cannot get any Library file to work [message #1689423 is a reply to message #1689378] Mon, 23 March 2015 14:54 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

BIRT looks relative to the resources folder defined in the web.xml (which is the root folder of the web viewer). You could change this setting in the web.xml to be where you put your reports and it'd then be relative to your reports folder. However, this won't change the design vs deployment issue where you have different paths in your design environment vs your deployment environment. Are you using a JavaEE project or a report project? If you create a report project and create a folder called reports and one called libraries in the root of the report project, when you deploy these to your web viewer, if you put your reports in a folder called reports and your libraries in a folder called libraries that you create in the root folder of the web viewer, you should have not problems going between your design and deployment environments.

Michael

Developer Evangelist, Silanis
Re: Cannot get any Library file to work [message #1689431 is a reply to message #1689423] Mon, 23 March 2015 15:14 Go to previous messageGo to next message
Al Koch is currently offline Al KochFriend
Messages: 62
Registered: August 2011
Member
Hi Michael,

Thanks for the prompt reply. - that clears things up.

I am working my way towards integrating the web viewer/server into an existing Java EE project so that's why I had wanted to place the reports and Libraries on a specific path that I didn't want to have to create in the deployment. However, from your responses I've seen that I can leave the reports in the current "Reports" folder alongside all the other "Resources" in the Project and put the Library in a folder at the root of the Project. Then I can place Libraries and reports in folders under BIRT.war that "make sense" for the prpject

One final quick question. As I just mentioned, I am "working my way towards integrating the web viewer/server into an existing Java EE project ". Do you have any recommended tutorials or other docs for integrating the server into a Java EE project?

Thank you.
Re: Cannot get any Library file to work [message #1690061 is a reply to message #1689431] Tue, 24 March 2015 22:05 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

When you say server, you're just talking about the BIRT Runtime, right? Not the F-Type server?

Michael

Developer Evangelist, Silanis
Re: Cannot get any Library file to work [message #1690170 is a reply to message #1690061] Wed, 25 March 2015 14:43 Go to previous message
Al Koch is currently offline Al KochFriend
Messages: 62
Registered: August 2011
Member
Yes, sorry I wasn't clear about that!
Previous Topic:Exporting Reports from Windows to Linux Environment
Next Topic:How do I use a Web Font with a BIRT report?
Goto Forum:
  


Current Time: Sat Apr 27 03:14:46 GMT 2024

Powered by FUDForum. Page generated in 0.03786 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top