Got com.google.inject.ProvisionExceptionerror when using PostgreSQL JDBC on GraphDB - dependency issue? - postgresql

I'm getting a provision error when using PostgreSQL JDBC on GraphDB. Actually, I created a connection between postgresql and Graphdb by a virtual repository, and I made a ODBC file which includes the RDF mapping information.
Expected: Normaly I can browse PostgreSQL data's hierarchy and so on in GraphDB.
Error: The connection was fine and the repository was created successfully, but when I tried to browse the data, I got this error:
Actions that I did: I did go /opt/graphdb-free/app/lib/plugins/dependencies-plugin/dependencies-plugin.jar to modify the dependency parameter, but it didn't change anything. I did checked the syntax of ODBC file and I don't see anything wrong there.
Anyone have been though this? Was I in the right place to modify the dependency? Or it's something else?

Related

How to connect mongodb to neo4j

I am trying to connect mongodb data to neo4j.
I tried with this code "CALL apoc.mongodb.get('mongodb://localhost:27017','test','test',{name:'testDocument'})" in Neo4j.
But I get an error as
There is no procedure with the name apoc.mongodb.get registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.
I had added APOC jar files in Neo4j plugins and I gone through this link http://indexoutofrange.com/Neo4jStoredProceduresWindows/
still Iam unable to connect.
can someone please explain what shall i do to get this started.
Thanks
In addition to copying the APOC jar file to $NEO4J_HOME/plugins you'll also need to copy the mongo specific jar files into $NEO4J_HOME/plugins. For example:
mvn dependency:copy-dependencies
cp target/dependency/mongodb*.jar target/dependency/bson*.jar $NEO4J_HOME/plugins/
More information available in the docs here
I know this was made 5 years ago but this is for anyone else (like myself) who's looking for an answer.
The URI should look something like this:
CALL apoc.mongo.find("mongodb://localhost:port/databaseName.collectionName")

How do I change an entity framework project to use Microsoft SQL Server

I am trying to debug a program using Entity Framework code first on my personal (work) computer.
We have recently had a domain migration, meaning that the user I log in as now is not the same that I used before. This caused me to loose access to the databases I had on the computer. To get around this, I have uninstalled everything to do with Microsoft SQL Server on the computer, and installed the latest version of Microsoft SQL Server, 2014 - 12.0.4213.0 . I then restored the database I need.
When I first tried to run the program, Visual Studio complained that the project is set up to use SQL Server Express, which was not installed. The recommended solution is to change the project to use SQL Server instead. To do this, I must click on "the database file" and follow the instructions. I have looked through the entire solution. There is a great many files, but I found no good candidate for "the database file."
It seems that my Google fu is not strong enough to find anything about this. So my question is: how do I change the project to use SQL Server?
I also have a second, related question. I tried to solve the problem by installing SQL Server Express. However, when I try to restore the database to this, no base appears in the drop down list. When I try to run the program now, I get another error:
Unable to create the file 'c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\Timelønsblanket.mdf' because it already exists.
I guess that this is also why I cannot restore the database. What I have found in websearches warns that I should not manually delete .mdf files.
Any advice on what to do?
I have solved the problem. All that was needed was a correct connection string. No need to find a "database file".

Eclipse preloading wrong JDBC driver without asking

Right now I have an oracle 12c. To connect with the database I need to use the ojdbc7.jar driver.
My own apps connect without problem with this, but I can't make SQL Explorer to work because I always get the "Not matching protocol" error. This is because is preloading the wrong JDBC driver. Now, I made a search in the Eclipse directory and I found this file:
.\configuration\org.eclipse.osgi\927\0.cp\lib\ojdbc14.jar
This is the wrong driver, and SQL Explorer alway use this despite I configure the right one in the settings. I've tried deleting this but every time I launch eclipse this jar appears again.
Now, to "fix" this, I put the correct driver, and renamed it with "ojdbc14.jar". Right now is working but I just want to disable this because sometimes I need to connect to oracle 11g and I need to change all over again.
What pluggin is preloading this?
Thanks!

Getting derby database connection from Java (in eclipse)

I was following the following instructions:
http://www.eclipse.org/articles/article.php?file=Article-EclipseDbWebapps/index.html
in order to set-up a derby database server and everything works fine. I created the DB and could easily access it. however, these instructions use JSP to access my DB and I wand to change it so that I can access the DB through my custom Java classes but I cant create any connections to the DB. I simply tried:
Connection con = DriverManager.getConnection
("jdbc:derby://localhost:1527/features", "root", "root");
Note: here my DB is names features
I get the error:
java.sql.SQLException:
No suitable driver found for jdbc:derby://localhost:1527/features
I tried loading the class for the driver:
Class.forName("org.apache.derby.jdbc.ClientDriver");
I get the error:
java.lang.ClassNotFoundException:
org.apache.derby.jdbc.ClientDriver
I dont know where to find and put org.apache.derby.jdbc.ClientDriver. How come in the instructions they only add a context.xml under META_INF and everything work? What am I missing?
Did you:
Copy the file derbyclient.jar from that folder to your TOMCAT_ROOT/lib
folder (if you're using Tomcat 5.x, install into
TOMCAT_ROOT/common/lib). This installs the Derby JDBC driver into
Tomcat for use in a DataSource.
You need the derbyclient.jar in the classpath.

Eclipse JPA project - defining connection to Oracle RAC

Recently I wanted to play a bit with Eclipse and JPA. Thus I wanted to create a JPA project.
I got stuck when specifying the database connection, as editing the "Connection URL" (shown on the image) is not possible and I want to enter a (good, working) connection string to an Oracle RAC server which looks more or less like that:
jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS= (PROTOCOL=TCP) (HOST=...
Am I doing something obviously wrong? Or is it a "feature" of the Data Source Explorer?
Screenshot from Eclipse http://img706.imageshack.us/img706/4876/stacku.png
See Oracle's FAQ for syntax of the database connection string.