Home
Analytics
BIRT + Hibernate + POJO
newbie321
<p>Hi, </p>
<p> </p>
<p>Has anyone succeeded in accessing Hibernate from Birt's RCP through pojos. </p>
<p>If so, what are the steps in getting pojos to tap into the hibernate from Birt's RCP?</p>
<p> </p>
<p>Thanks,</p>
Find more posts tagged with
Comments
JFreeman
<p>Are you still needing assistance with this one?</p>
<p> </p>
<p>I'm not familiar with Hibernate but if you can provide some more details I can see if I can provide some assistance.</p>
newbie321
<p>Hi,
@JFreeman
:</p>
<p> </p>
<p>I hope you had a good weekend. Thanks for a followup and your offer to help. Yes, I still am looking for a solution that could work from within RCP. </p>
<p> </p>
<p>Here is the setup:</p>
<p>I have an report design in RCP, let's say abc.rptdesing</p>
<p>I have a Hibernate installed, configured and working</p>
<p>I want to use POJOs as my datasource/dataset ie pojo would tap into hibernate and hibernate would tap into the database and pull the data. Then I want to display that data in a table when running .rptdesign from RCP. </p>
<p> </p>
<p>The stumbling block that I can not overcome is having BIRT see Hibernate classes (the hibernateXX.jar is on eclipse's path). Because BIRT can not see the hibernate classes, it always throws an error when I am trying to define the dataset. I guess the 'royal' question would be: "How do we get BIRT see the Hibernate.jar?" Again, the jar is in Eclipse's path, but BIRT DOES NOT see it. </p>
<p> </p>
<p>I found the <a data-ipb='nomediaparse' href='
http://lifeinide.blogspot.com/2014/12/birt-with-hibernate-using-pojo-s.html'>http://lifeinide.blogspot.com/2014/12/birt-with-hibernate-using-pojo-s.html</a>
. This website is great that it solves the problem by 'spoofing' BIRT and passing the hibernate resultset at a runtime. However, I want to get hibernate working not from the runtime but from the design time (RCP). </p>
<p> </p>
<p>Any ideas on how to get this done. I am starting to think that this is impossible. But my hunch is telling me there is gotta be a way.</p>
<p> </p>
<p>Thanks for the help!!</p>
JFreeman
<p>The specifically in the Eclipse path for the RCP designer did you place the hibernate jar?</p>
newbie321
<p>the classpath for hibernate jar is defined is <strong>.classpath</strong> and the entry is as follows:</p>
<pre class="_prettyXprint">
<classpathentry kind="lib" path="C:/mylibs/hibernate-3.5.2.jar"/></pre>
<p>The above makes .jar file visible to any java class in eclipse in the same project.</p>
<p>Birt however does not see this .jar</p>
<p> </p>
<p>I also tried putting the hibernate.jar file in </p>
<pre class="_prettyXprint">
plugins\org.eclipse.birt.report.viewer_4.5.0.v201506092134\birt\WEB-INF\lib</pre>
<p>Placing the <strong>hibernate.jar </strong>into <strong>/lib/</strong> folder produces <strong><u>no effect</u></strong> ie BIRT does not see it </p>
<p> </p>
<p>Let me know where I should place the .jar to make it visible to BIRT. </p>
<p>Thanks,</p>
JFreeman
<p>Try placing it directly into ".\birt\plugins" within the RCP installation directory, restart the designer if it is running and see if you get a different result.</p>
newbie321
<p>where would I find <strong>plugins </strong> folder? Attached is what I see when using /birt/ as root.</p>
<p> </p>
<p>Thanks!! </p>
JFreeman
<p>Go up two levels to the plugins directory from where you are instead of dropping it inside of the viewer that is located inside of plugins.</p>