how to use spark(version:3.1.3 scala:2.12 ) read the data from mongoDB(version: 3.4.16) - mongodb

We use maven dependency like that
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>casbah-core_2.12</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.mongodb.spark</groupId>
<artifactId>mongo-spark-connector_2.12</artifactId>
<version>3.0.1</version>
</dependency>
The question one is that the version of org.mongodb.spark is right? Many people said maybe is '10.0.0' but some people said maybe is 'Spark-version'.The realty is '10.0.0' not work but 3.0.1 is work.However,'3.0.1' is also make other errors.And I also use MongoDB.com's demo but it also not work.
Can you give me demo about it.And analyze me about that there are so little information that I cant't understand.
Can you give me demo about it.And analyze me about that there are so little information that I cant't understand.

Related

can't create dependence of msqlconnector in pom.xml in eclipse

I can't create the dependency for mysql in eclipse.
error Missing artifact mysql:mysql-connector-java:jar:5.7.9
I use maven console to create the dependency, but It doesn't work
What can I do??
Most likely this is because the current version in 5.* series is 5.1.40.
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.40</version>
</dependency>
There is no version 5.7.9. You can check current version here or all available here.

How to make gwt material table

I got gwt material table from github https://github.com/GwtMaterialDesign/gwt-material-table
But i am not getting any jar of it to inherit. So if any one who got the jar please reply me.
If jar is not there then what we have to do either using the class from git or any other way.
After having research on it i have try to make plugin by taking all file from git but $this() is creating a problem.
I can't able figure out what is use of $this() in gwt. I have also include the file gwt material query but then also the method $this() is undefined for the type AbstractDataTable error is comming.
You will need to add this to your pom.xml
<!-- For GWT Material JQuery -->
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-jquery</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- For GWT Material Table -->
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-table</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
I'm not sure whether I understand your problem correctly. If it's about resolving dependency, you should be able simply to get it from Maven. As you see from Github, this is a Snapshot. It means you need to add proper repository to your pom.xml file. Please see the section "repositories" and details related to "snapshots-repo" provided there: https://github.com/GwtMaterialDesign/gwt-material-table/blob/master/pom.xml .
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-table</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Hope you'll find it helpful.

Could not find or load main class org.scalatest.tools.Runner

Created the maven scala project.
I had correctly specified all the configuration . But still facing this error.
any help appreciated.
I solved this error.
Its coming because I had make the entry for org.scalatest plugin and there is no src/test/scala dir and no test cases.After removing org.scalatest plugin entry from pom file everything work fine.
For anyone that comes across this issue in the future, make sure you have the following dependency in your pom.xml.
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.11</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>

Looking for a file in google youtube upload api

import com.google.common.collect.Lists;
I can't find where the package for this import is. I got the code I'm using here: https://code.google.com/p/youtube-api-samples/source/browse/samples/java/youtube-cmdline-uploadvideo-sample/src/main/java/com/google/api/services/samples/youtube/cmdline/youtube_cmdline_uploadvideo_sample/UploadVideo.java
Please help
It's in guava-jdk5-13.0.jar
It's a sub dependency of both of
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-youtube</artifactId>
<version>${project.youtube.version}</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>${project.http.version}</version>
</dependency>
If you check out the full project with git and let Maven to get the dependencies, that would be easier for you.

How to use LDAP in Lift Framework

Does anyone have a good example showing how to incorporate LDAP to a Lift Scala Project? I have problems adding the dependency in my pom.xml file
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-ldap</artifactId>
<version>2.0</version>
</dependency>
In the project tag throws me an error saying it couldnt find the version in [1.4.5-rc1,1.4.5] to match range [1.4,1.4.3) javax.mail:mail:jar:null
Any ideas?? Thank u