Importing Java OrientDB Packages - java

I am not new to Java per se... or looking up answers for myself. But for some reason I cannot import the OrientDB packages. I have looked at the following simple examples:
https://github.com/orientechnologies/orientdb/wiki/Java-Tutorial:-Introduction
Trying to work with OrientDB
example:
import com.tinkerpop.blueprints.TransactionalGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraph;
but I keep getting "package * does not exist" for any import combination I use.
I was under the impression that all I needed to get started was 'orientdb-community-1./lib/orientdb-core-1..jar'. Where is 'com', 'tinkerpoop' and 'blueprints' coming from?

Tinkerpop Blueprints is a standard for Graph Database API.
It is a separate project, you can find all the details here:
http://www.tinkerpop.com/
OrientDB supports Tinkerpop Blueprints, so it is part of the dependencies.
If you download latest OrientDB version, you will find a jar file named blueprints-core-**.jar under the /lib directory. This jar contains the com.tinkerpop.blueprints package.
To get started with OrientDB in your java application, you will need at least orientdb-commons.jar, orientdb-client.jar and orientdb-core.jar, but I suggest you to import into your classpath all the orient-*.jar files

try to import this libraries into your project
<properties>
<orientdb.version>2.1-rc4</orientdb.version>
</properties>
<dependencies>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-core</artifactId>
<version>${orientdb.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-client</artifactId>
<version>${orientdb.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-object</artifactId>
<version>${orientdb.version}</version>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-graphdb</artifactId>
<version>${orientdb.version}</version>
</dependency>
</dependencies>
Nevertheless, I'm currently working on a java based orientdb wrapper, designed to be the most user friendly and easy to use as possible. We are using this on a large scale project in my company, you can take a look at it if you want.. it might help!
https://github.com/alonsod86/orientdb-graph-wrapper
Once you download it execute mvn clean install and import it in your project, just like this
<dependency>
<groupId>es.alonso</groupId>
<artifactId>orientdb-graph-wrapper</artifactId>
<version>2.0.2-SNAPSHOT</version>
</dependency>
Hope it helps!

Related

Unable to import com.vaadin.data.util.PropertysetItem

Just tried importing PropertysetItem after adding vaadin dependency which I have mentioned below but was unable to import. Can anyone help me for finding the right dependency
dependency added
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-server</artifactId>
<version>8.4.0</version>
</dependency>
PropertysetItem as well as other related classes have been moved to the com.vaadin.v7.data.util package. You thus need to update your import statements to take the new package name into account.

Package org.springframework.cloud.netflix.sidecar does not exist

I want to use sidecar to call flask with spring cloud, but when I import org.springframework.cloud.netflix.sidecar, hint does not exist.
I guess it's because there's no jar package for sidecar.But I don't know which jar package to use.
Who can help me?
thanks!
Need to include :
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-sidecar</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-netflix-sidecar/2.1.0.RELEASE

sqljdbc4.0 to mssql-jdbc 6.2.1.jre7 migration

My application uses SQLServerConnectionPoolDataSource.
Sporadically I get a connection closed since I am using a sqljdbc4.0.
According to this https://blogs.msdn.microsoft.com/dataaccesstechnologies/2016/11/30/intermittent-jdbc-connectivity-issue-the-driver-could-not-establish-a-secure-connection-to-sql-server-by-using-secure-sockets-layer-ssl-encryption-error-sql-server-returned-an-incomplete-respons/
this problem can be resolved if we upgrade the driver. I am trying to put 6.2 version for jre7. I could not find the SQLServerConnectionPoolDataSource class. Is there any update to the class name or am I referring to a wrong jar.
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.1.jre7</version>
</dependency>
Many thanks!
I went to this page and downloaded the JAR. I opened the JAR using 7Zip and was able to find the class SQLServerConnectionPoolDataSource. Furthermore I added the following Maven depndency (which looks the same as yours) and my IDE recognized the SQLServerConnectionPoolDataSource class and I was able to use it and compile.
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.1.jre7</version>
</dependency>
After adding the dependency to your POM, try running the Maven command dependency:resolve. Maybe this will lead to your IDE recognizing the class.

Upgrading CXF and WSS4J but can't find dependencies

So I have a working project that I am trying to upgrade CXF and WSS4J
It looks like I have upgraded my client ok, but that's because I am using this for wss4j:
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j</artifactId>
<version>2.1.8</version>
<type>pom</type>
</dependency>
But my server is throwing ClassNotFound exceptions, obviously because of the type=pom.
So where do I find the new classes jars? Specifically WSPasswordCallback.
BTW, I am using CXF 3.1.9
The short answer is that they moved everything. The first place you want to look is: https://mvnrepository.com/artifact/org.apache.wss4j
That is where all the new ones are. From there you will simply need to google the class you want and see if you can find the package you need. For me WSPasswordCallback moved to the commons package...
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-ws-security-common</artifactId>
<version>2.1.8</version>
</dependency>
IMHO this could have been handled better, but it's a start to find what you need.

Where is the maven dependency for ConfigurableEmbeddedServletContainerFactory?

I am trying to follow this example for setting up SSL with Tomcat in Spring Boot. The example is unfortunately missing the import statements, so I tried to infer the correct import statement for ConfigurableEmbeddedServletContainerFactory.
However, I still encounter the following error:
The import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainerFactory cannot be resolved
I think this means I am missing the maven dependency for this particular class. Can anyone point me to what this is?
from code for file package is org.springframework.boot.context.embedded
maven dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>x.x.x</version>
</dependency>

Categories

Resources