Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Java Classes / Objects - Placement
dbmathis
Hi All,
One of the main functions of my job is to write BIRT reports. I see wonderful examples of Java classes all over the web that I would like to use in my reports. The problem is that the deployment environment / report engine is locked down under strict control.
This brings me to my question. Where can I put the java classes if I don't have access to the deployment server or report engine? Can they be embedded into the report somewhere?
The process is that I download a design file and sample data XML from the locked down environment, modify it or develop a report from scratch and then upload the design file back to the locked down server. Nowhere in the process to I have access to change anything on the deployment server.
Thanks in advance.
Find more posts tagged with
Comments
mwilliams
<p>With the POJO runtime (3.7+), your jar files just need to be in the class/build path, so however you can achieve that should work.</p>
rdu
<p>Hi, I have a follow up question about this. I'm using BIRT 4.3.1 and want to integrate it with POJOs as data source. I'm using this in the business logic of a spring application and I'm also using maven. The issue I'm facing is that I can't set a correct relative path, because when I deploy it, the libs are somewhere else and not in the location I choose in the data source config of the report. I tried a lot of alternative paths manually in the XML Source of the report but all I get is:</p><p> </p><p>SEVERE: An error happened while running the report. Cause:
java.lang.IllegalArgumentException: URI is not absolute</p><p> </p><p>If I put in the absolute path where the library can be found on my local system after the deployment, it works. But naturally I can't put a absolute path in there because that path won't be valid anymore when I deploy this to another server.</p><p>I also tried to put file: in front of the relative path in the XML Source, but then I get the exception that the file can't be found.</p><p> </p><p>Any idea what I'm doing wrong?</p>
amitabher
<p>You can set the 'Shared Location of Custom POJO Data Set Classes' by 'Property Binding'.</p>
rdu
<p>Hey, thank you for your answer!</p>
<p> </p>
<p>Do you also know how this text field needs to be filled? I mean I can put anything in there, even javascript. Do I just write the path as a string?</p>
<p>I tried this:</p>
<p>"WEB-INF/lib/birt-datasets.jar"</p>
<p>and it creates this entry in the XML Source:</p>
<p> </p>
<p> <list-property name="propertyBindings"><br>
<structure><br>
<property name="name">pojoDataSetClassPath</property><br>
<property name="id">7</property><br>
<expression name="value" type="javascript">"WEB-INF/lib/birt-datasets.jar"</expression><br>
</structure></p>
<p> </p>
<p>but unfortunately I still get URI is not absolute exception</p>
<p> </p>
<p> </p>
<p>EDIT:</p>
<p>Okay I got it almost working now. What I did was to have the report and the data set classes in one project. When changes on the dataset are necessary for altering the report, I build the project, put the built jar in the 'Edit Data Source' window under 'BIRT POJO Data Source Connection Properties' for both runtime and Design Time Properties and change the report. When I'm finished, I go in the XML Source view to the position</p>
<p><property name="pojoDataSetClassPath">target/birt-datasets.jar;</property></p>
<p>and delete it. What I guess what happens now is that during runtime the report engine finds the pojo classes since they are in the same project as the report. But I'm not sure exactyl why this works.</p>
<p>It's still a bummer that I have to add and delete the jar entry from the Data Source config everytime I'm altering it.</p>
<p> </p>
<p>Is there a way that 'Shared Location of Custom POJO Data Set Classes' is helping me with this?</p>
Sohama
<p>I had same issue. Did you solve this issue? Can you post a example code here how you do it.</p>
<p> </p>
<p>Basically, I am using maven to build the project. and i have to place the birtdataset.jar in web-inf/lib folder. On java code or on UI, how this can be done?</p>