Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Extract data from a JDBC data base from API - Drivers issue
hpi_mat
<p>Hello,</p>
<p>I'm quite a new Birt User. I'm trying to make a dynamic reporting application with a web user interface.</p>
<p>I started to use Birt with the designer and I manage to connect it Quite simply with my JDBC data base which is for the purpose of science on a local WAMP mysql server.</p>
<p>Until now everything was going smoothly. I used a jdbc driver which I downloaded from mysql/java bridge.</p>
<p>"com.mysql.jdbc.Driver (v5.1)"</p>
<p>Now, I'm trying to create a really simple report with the data from my data base. I started with some tutorials i found on the internet to have the general skeleton for a java basic creation. </p>
<p>My problem is, I can generate a new .rptdesign but the link with the data base is not functional. I mean, When i open the rptdesign with the designer after the generation, there is a data source with the good entries but when i try to get a preview from it it literally gives me "I don't find the driver named :</p>
<p>com.mysql.jdbc.Driver (v5.1)</p>
<p>I added the librairy and the different .jar to my .java project and buildpath. </p>
<p>What i think is not functionning, is that the librairy is not given as an entry for the report. Even if, in the designer it exists, The rptdesign couldn't find it on its own.</p>
<p>Does anybody know how to link the "mysql-connector-java-5.1.38.jar" to a new report generated in a script written in java?</p>
<p>My little leads on the subject: </p>
<p>Use something like Engine Config but i don't really get the difference between DesignConfig and Engine Config. Would be something like that</p>
<div>EngineConfig config2 = new EngineConfig(); </div>
<div>config2.getAppContext().put("OdaJDBCDriverClassPath", "absolute path to the driver including the driver's name");</div>
<div>Find the part in DesignConfig where to add a Drivers path or a Jar.</div>
<div> </div>
<div>Any help would be appreciated! You would find the file to generate my report attached to this post. Edit, I spotted and error i forgot because i tried something: instead of postgresql.Driver it is the following: <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">com.mysql.jdbc.Driver (v5.1). Sorry for the mistake</span></div>
<div>Thank you!</div>
<div>Salutation from France,</div>
<div>Matthieu</div>
Find more posts tagged with
Comments
pricher
<p>Bonjour Matthieu,</p>
<p> </p>
<p>At runtime, the jar file of your JDBC driver must be copied to the <span style="color:#b22222;"><span style="font-family:'courier new', courier, monospace;"><BIRT_HOME>/reportEngine/lib</span></span> folder, in your case <span style="color:#b22222;"><span style="font-family:'courier new', courier, monospace;">runtime/reportEngine/lib</span></span>.</p>
<p> </p>
<p>In the Designer, the same jar file goes to <span style="color:#b22222;"><span style="font-family:'courier new', courier, monospace;"><BIRT_DESIGNER_HOME>\plugins\org.eclipse.birt.report.data.oda.jdbc_<BIRT_VERSION>\drivers</span></span></p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
hpi_mat
<p>Hello!</p>
<p>I tried your point in my folder without any success! </p>
<p>But, in the mess I find the source of the problem. In fact, it comes from the name of the driver. The libraries being linked with the java project seems to be applied to the rptdesign contrary to what i may have thought. I did the following operation</p>
<p> </p>
<p>String nomDriver = "com.mysql.jdbc.Driver <strike>(5.1)</strike>";<br>
String urlBase = "jdbc:mysql://localhost/HPISIMPLE";<br>
String loginBase = "login";<br>
String passBase = "pass";<br>
String nomSourceDeDonnees = "hpisimplebase";</p>
<p>By doing that the driver is functional and ready to work!</p>
<div>Results, two days of research for a simple driver name! Totally worth it
.</div>
<div>Thanks again to you and I wish this may help somebody else!</div>
<div> </div>
<div>Matthieu</div>