I am trying to map a simple table from an Oracle database into Stardog. I put ojdbc6.jar into the server/dbms directory and restarted the service (I am on Windows, right now just for exploration).
On my first attempt I had a syntax error in my mapping (.ttl file). That step seems to get passed now.
Next, I get a message “There was an unexpected error on the server.” It probably comes from trying to connect to the database. My properties look like this:
Oracle properties for JDBC look different (user vs. username, database vs. url), but that does not seem to make a difference. Any idea what I can try or how to find out a more detailed error message ?
There are probably more detailed information in the logs. Are there any errors or warnings in stardog.log and can you include them? What exact command are you running and what is the output of that command?
thanks for your quick reply. The command generates no warning / error in stardog.log (only the errors related to syntax in the mapping file did). The command and exception look like this:
D:\Apps\stardog-5.0\bin>stardog-admin virtual add d:\dev\DaVi\test.properties d:\dev\davi\test_map.ttl -v
There was an unexpected error on the server.
The detailed stack trace for the error is:
com.complexible.stardog.StardogException: There was an unexpected error on the server.
at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:492)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:324)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.executeHttpPost(BaseHttpClient.java:662)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.executeHttpPost(BaseHttpClient.java:637)
at com.complexible.stardog.protocols.http.client.HttpVirtualGraphAdminClientImpl.addOrUpdate(HttpVirtualGraphAdminClientImpl.java:233)
at com.complexible.stardog.protocols.http.client.HttpVirtualGraphAdminClientImpl.addGraph(HttpVirtualGraphAdminClientImpl.java:202)
at com.complexible.stardog.protocols.http.client.HttpVirtualGraphAdminClientImpl.addGraph(HttpVirtualGraphAdminClientImpl.java:51)
at com.complexible.stardog.protocols.http.client.AbstractVirtualGraphAdminConnection.addGraph(AbstractVirtualGraphAdminConnection.java:86)
at com.complexible.stardog.virtual.cli.VirtualGraphAdd.performSecure(VirtualGraphAdd.java:107)
at com.complexible.stardog.cli.admin.SecureStardogAdminCommand.call(SecureStardogAdminCommand.java:60)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)
at com.complexible.stardog.cli.admin.CLI.main(CLI.java:182)
The -v flag should come before the properties file and it is probably just being ignored. You can try it in the correct place and see if it gives you some better info on what is going on.
Can you try changing to the directory with your mappings and running it from there?
It is now an error while initializing the virtual graph rather than an unexpected error. Does that point to what I am probably doing wrong ?
D:\dev\DaVi>d:\Apps\stardog-5.0\bin\stardog-admin.bat virtual add -v test.properties test.ttl
Error while initializing virtual graph
The detailed stack trace for the error is:
com.complexible.stardog.StardogException: Error while initializing virtual graph
at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:492)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:324)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.executeHttpPost(BaseHttpClient.java:662)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.executeHttpPost(BaseHttpClient.java:637)
at com.complexible.stardog.protocols.http.client.HttpVirtualGraphAdminClientImpl.addOrUpdate(HttpVirtualGraphAdminClientImpl.java:233)
at com.complexible.stardog.protocols.http.client.HttpVirtualGraphAdminClientImpl.addGraph(HttpVirtualGraphAdminClientImpl.java:202)
at com.complexible.stardog.protocols.http.client.HttpVirtualGraphAdminClientImpl.addGraph(HttpVirtualGraphAdminClientImpl.java:51)
at com.complexible.stardog.protocols.http.client.AbstractVirtualGraphAdminConnection.addGraph(AbstractVirtualGraphAdminConnection.java:86)
at com.complexible.stardog.virtual.cli.VirtualGraphAdd.performSecure(VirtualGraphAdd.java:107)
at com.complexible.stardog.cli.admin.SecureStardogAdminCommand.call(SecureStardogAdminCommand.java:60)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)
at com.complexible.stardog.cli.admin.CLI.main(CLI.java:182)
What type of license are you using? Virtual graphs are an enterprise feature so you’ll need to be using a de, /30-day eval, or enterprise license to use that feature.
Especially given that this is a server error, your log (located at %STARDOG_HOME%\stardog.log) should absolutely have a more detailed error message when you see this client-side.
Take a look at the output of bin\stardog-admin server status to see where the Stardog Home folder is, and the stardog.log in there should have more info for you.
I am fairly confident that I downloaded the 30-day developer license. Can I confirm anywhere in the web interface ?
There is no further entry in the log after the error messages shown, sorry. I confirmed the home folder as suggested, but that log does not contain any new errors.
the license type is ok (evaluation). Also, I found useful error logs in STARDOG_HOME/logs now (but nothing in stardog.log). This revealed that I was referring to a deprecated jdbc driver class in my properties file. I am (slowly) getting closer.
Looks like the connection to the database can be established now. I am now stuck with an AbstractMethodError in a call to T4CConnection.getSchema. From searching the web, this should only happen, when an old jdbc implementation < version 4 is used and the code is compiled against a more recent version. I have ojdbc6 in my class path which should be ok. Need to go on searching.
found the final problem - ojdbc7.jar is needed instead of ojdbc6.jar. The former is for JDK1.7+ and implements the needed getSchema method. I was confused because Oracle suggests ojdbc6.jar for use with 11.2g which is what I have,
Finally:
Successfully added virtual graph mobacm1_sppid
I now have a problem with the generated query, but will open a separate item on that one. This case here is solved for me. Many thanks for your help and input.