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)
BIRT 4.5 unable to load collections from MongoDB
lietwin
<p>Hi all,</p>
<p> </p>
<p>I cannot get Birt to load MongoDB collections even though the connection to the database is successful.</p>
<p> </p>
<p>I download Birt 4.5 from Eclipse webpage and try to build a report using a MongoDB datasource. </p>
<p>1) I couldn't get collection via the dropdown menu </p>
<p>[sharedmedia=core:attachments:13389]</p>
<p> </p>
<p>2) Even when I specify an existing collection, I got an exception invalid collection name</p>
<div>[sharedmedia=core:attachments:13388]</div>
<p> </p>
<p>I reinstall Birt 4.5 + Eclipse Mars, even install Birt 4.3 + Eclipse Kepler. Nothing works.</p>
<p>I'm using the 64bits version of jdk/jre 1.7 on a Windows 7 (64bits). Screenshots are attached.</p>
<p> </p>
<p>Thanks the help. </p>
Find more posts tagged with
Comments
icirillo
<p>Are you able to access the same database from the same machine where Birt is installed on but with a different DB client? there could be something blocking the connection independently from Birt.</p>
Clement Wong
<p>Also, what version is the MongoDB server?</p>
lietwin
<p>I can access the MongoDB server directly via the Mongo shell or in my java application via the java driver Morphia.</p>
<p>The version I have is 3.2</p>
Clement Wong
<p>The issue you are seeing is because the Open Source BIRT MongoDB ODA uses an older MongoDB Java driver (2.10.1).</p>
<p> </p>
<p>You can attempt to update the Java driver to the latest similar to the steps outlned from Jesse here:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/36488-mongodb-connection-issue-over-ssl/#entry135673'>http://developer.actuate.com/community/forum/index.php?/topic/36488-mongodb-connection-issue-over-ssl/#entry135673</a></p>
;
<p> </p>
<p>We have internally used one of the later MongoDB Java driver (3.2.2) in a custom build of the OS BIRT MongoDB ODA that supports SSL and Kerberos, and was able to connect to the 3.x versions of MongoDB server.</p>
lietwin
<p>Awesome. I updated the driver and everything is working so far.</p>
<p>Thanks Clement. </p>
richard.bibb
<p>I have a similar problem running BIRT and MongoDB however when I switch the libraries out the MongoDB option disappears from the create DataSource window</p>
<p> </p>
<p>I'm using Eclipse Neon (4.6.0)</p>
<div>BIRT Version: 4.6.0.v201606072122 - Build id: v20160607-2112</div>
<p>Eclipse runs on a Windows 10 Pro 64 bit install</p>
<p>MongoDB is on a Centos 7 Linux box</p>
<p> </p>
<p>I did the following:</p>
<p> </p>
<p>1) shutdown Eclipse</p>
<p>1) Retrieved mongo-java-driver-2.14.3.jar and mongo-java-driver-2.14.3-sources.jar</p>
<p>2) Moved org.eclipse.orbit.mongodb.source_2.10.1.v20130422-1135.jar and org.eclipse.orbit.mongodb_2.10.1.v20130422-1135 from C:\Users\<<me>>\.p2\pool\plugins to somewhere safe and moved the above jar files into the plugins directory.</p>
<p>3) Restarted Eclipse</p>
<p> </p>
<p>When I select "New Data Source" MongoDB is no longer displayed as a data source</p>
<p> </p>
<p>Any help would be appreciated</p>
Clement Wong
<p>
@richard
.bibb</p>
<p> </p>
<p>Just so that we are on the same page, and I can try to replicate what you are seeing:</p>
<p> </p>
<p>1. What version of Java are you using with Eclipse/BIRT? (output of "java -version")</p>
<p>2. Are you using the 32-bit or 64-bit Designer?</p>
<p>3. Did you download the All in One Eclipse/BIRT Neon package?</p>
richard.bibb
<p>Hi Clement</p>
<p> </p>
<p>1) java -version</p>
<div> java version "1.8.0_102"</div>
<div> Java(TM) SE Runtime Environment (build 1.8.0_102-b14)</div>
<div> Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)</div>
<div> </div>
<div>2) Im assuming that when you say what version of designer are you using you mean "Are you using a 32bit or 64 bit version of Eclipse?". If so I'm (fairly certain that I am) using 64 bit Eclipse although I't not sure how to tell</div>
<div> </div>
<div>3) I have the Java version of Eclipse and installed BIRT through the Help->Install New Software menu</div>
<div> </div>
<div>Whilst poking around looking for the answer to what version of Eclipse I am using I came across a file </div>
<div> </div>
<div>C:\Users\<<User>>\eclipse\java-neon\eclipse\configuration\1471422048458.txt.</div>
<div> </div>
<div>It appears to be a log file (although it only hangs around for a short while) and shows the following</div>
<div> </div>
<div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">!SESSION 2016-08-17 09:20:48.301
</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">eclipse.buildId=4.6.0.I20160606-1100</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">java.version=1.8.0_102</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">java.vendor=Oracle Corporation</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">Framework arguments: -product org.eclipse.epp.package.java.product</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product</span></em></span></div>
<div> </div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">!ENTRY org.eclipse.birt.data.oda.mongodb 4 0 2016-08-17 09:20:49.115</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">!MESSAGE FrameworkEvent ERROR</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">!STACK 0</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">org.osgi.framework.BundleException: Could not resolve module: org.eclipse.birt.data.oda.mongodb [534]</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;"> Unresolved requirement: Import-Package: com.mongodb; version="2.10.1"</span></em></span></div>
<div> </div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.Module.start(Module.java:444)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1599)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)</span></em></span></div>
<div> </div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">!ENTRY org.eclipse.birt.data.oda.mongodb.ui 4 0 2016-08-17 09:20:49.120</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">!MESSAGE FrameworkEvent ERROR</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">!STACK 0</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">org.osgi.framework.BundleException: Could not resolve module: org.eclipse.birt.data.oda.mongodb.ui [535]</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;"> Unresolved requirement: Import-Package: com.mongodb; version="2.10.1"</span></em></span></div>
<div> </div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.Module.start(Module.java:444)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1599)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)</span></em></span></div>
<div><span style="color:#0000cd;"><em><span style="font-size:12px;">at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)</span></em></span></div>
<div> </div>
<div> </div>
<div>Any help you can give would be greatly appreciated</div>
</div>
sanisaif
<blockquote class="ipsBlockquote" data-author="lietwin" data-cid="144396" data-time="1466687928">
<div>
<p>Awesome. I updated the driver and everything is working so far.</p>
<p>Thanks Clement. </p>
</div>
</blockquote>
<p>Hi I am facing similar issue. How did you update the driver?</p>
richard.bibb
Waiting on a reply. I'm guessing that Clement will be back in touch soon
Clement Wong
<p>I was able to successfully update with the following steps. Can you download the all in one package and try with my steps?</p>
<p> </p>
<p>As my next test, I will download Eclipse Neon and install BIRT as new software. What package of Eclipse did you get from this page (<a data-ipb='nomediaparse' href='
https://www.eclipse.org/downloads/packages/release/Neon/R)?'>https://www.eclipse.org/downloads/packages/release/Neon/R)?</a></p>
;
<p><br>
1. Downloaded the 64-bit Windows Eclipse Neon w/BIRT (all in one) from @ <a data-ipb='nomediaparse' href='
https://www.eclipse.org/downloads/packages/eclipse-ide-java-and-report-developers/neonr'>https://www.eclipse.org/downloads/packages/eclipse-ide-java-and-report-developers/neonr</a><br>
;
<br>
My Java info:<br>
java version "1.8.0_91"<br>
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)<br>
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b15, mixed mode)<br><br>
2. As baseline, ran a successful test against MongoDB 3.0.2 using out of the box ODA in a simple report.<br><br>
3. Exited out of Eclipse<br><br>
4. Downloaded "mongo-java-driver-2.14.3.jar" @ <a data-ipb='nomediaparse' href='
https://oss.sonatype.org/content/repositories/releases/org/mongodb/mongo-java-driver/2.14.3/'>https://oss.sonatype.org/content/repositories/releases/org/mongodb/mongo-java-driver/2.14.3/</a><br><br>
;
5. Moved "org.eclipse.orbit.mongodb_2.10.1.v20130422-1135" out from ...\eclipse-reporting-neon-R-win32-x86_64\eclipse\plugins<br><br>
6. Moved "mongo-java-driver-2.14.3.jar" into ...\eclipse-reporting-neon-R-win32-x86_64\eclipse\plugins<br><br>
7. Started Eclipse<br><br>
=> Was able to successfully Test Connection in MongoDB data source, Preview Data in the data set, and execute/view report.<br>
</p>
richard.bibb
<p>Ill test what you say and get back to you. I terms of which Eclip0se package I would get from the page you mentioned it would be the second one listed</p>
<p> </p>
<p><span style="color:rgb(44,34,85);font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;">Eclipse IDE for Java Developers 64 Bit</span></p>
<p> </p>
<p><span style="color:rgb(44,34,85);font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;">Thanks for your help. It is much appreciated</span></p>
richard.bibb
<p>Hi Clement</p>
<p> </p>
<p>I can report that you approach worked. I'm going to try and reinstall my java version of Eclipse to see if I have an issue with it.</p>
<p> </p>
<p>edit: I reinstalled my java version of Eclipse and can confirm that everything now works. Thanks once again for your help.</p>
<p> </p>
<p>Richard</p>
nvkumar
<p>After doing above steps and replacing jar files getting error in eclipse " Unable to find Hector client library jars to support Cassandra Scripted Data Source'".And its not showing mongo data source.</p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">2. As baseline, ran a successful test against MongoDB 3.0.2 using out of the box ODA in a simple report. -Where i can find this report</span></p>