Can create virtual graph from CLI and query in Studio but not create or edit in studio

I'm running Stardog 7.0.0 on Ubuntu Linux, Postgres 11.4? on AWS RDS and Studio 1.11.0 on WIndows 10.

I can create and add virtual graphs, via the CLI on the Linux Stardog server

ubuntu@ip-172-26-7-74:~$ /opt/stardog_application_7/bin/stardog-admin virtual add --overwrite synthea_omop_rds.ttl
Successfully added virtual graph synthea_omop_rds

and query them in teh Studio

   GRAPH <virtual://synthea_omop_rds> {
      ?s ?p ?o

but if I try to edit them or create a new one in Studio, I get an error:

failed to create virtual graph ...

and my log says

ERROR 2019-09-13 13:59:34,553 [stardog-user-4] com.stardog.http.server.undertow.ErrorHandling:writeError(138): Unexpected error on the server
java.lang.RuntimeException: java.sql.SQLException: Unable to load class: com.postgresql.Driver from ClassLoader:sun.misc.Launcher$AppClassLoader@1de0aca6;

but I thought I had the right JDBC jar in the right location, at least from previous experience with 6.2 via the web console:

ubuntu@ip-172-26-7-74:~$ sudo find / -name "postgresql*jar" | grep stard

Where Stardog was launched like this

ubuntu@ip-172-26-7-74:~$ ps -ef | grep stard

ubuntu    5615     1  0 Sep09 ?        00:00:00 /bin/bash /opt/stardog_application_7/bin/stardog-admin server start --disable-security --web-console
ubuntu    5617  5615  3 Sep09 ?        03:24:18 java -Dstardog.home=/opt/stardog_data_7/ -Xmx2g -Xms2g -XX:MaxDirectMemorySize=1500m -Djava.library.path=/opt/stardog_application_7/bin/../lib -XX:SoftRefLRUPolicyMSPerMB=1 -XX:+UseParallelOldGC -XX:+UseCompressedOops -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Dapple.awt.UIElement=true -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=/opt/stardog_application_7/bin/../server/dbms/log4j2.xml -Dstardog.install.location=/opt/stardog_application_7/bin/.. -server -classpath /opt/stardog_application_7/bin/../client/ext/*:/opt/stardog_application_7/bin/../client/api/*:/opt/stardog_application_7/bin/../client/cli/*:/opt/stardog_application_7/bin/../client/http/*:/opt/stardog_application_7/bin/../client/pack/*:/opt/stardog_application_7/bin/../server/ext/*:/opt/stardog_application_7/bin/../server/dbms/*:/* com.complexible.stardog.cli.admin.CLI server start --disable-security --web-console

Hey Mark,
That's curious indeed. Did you install the JDBC jar file before you started Stardog?

I think so, but it's been a while. should I restart the Stardog server process?

If it's not too much trouble, that would help narrow down the issue. We do support creating virtual graphs without restarting but knowing whether the problem persists would indicate if that's the issue.

OK, I restarted.

I can edit the mappings in Studio now and create a new virtual graph, as long as I leave the auto-generate checkbox un-ticked. Is there any way to set up auto-generation from the command line?

Thanks. I'll try to reproduce the issue on our side.

You can create a virtual graph and have the mappings generated by omitting the mappings on the command line.

1 Like

That auto-mapping by omission trick is great.

Hi Mark,

I just wanted check in regarding the above (I'm the Studio team lead). Would you mind clarifying exactly what is not working in Studio here? For example, are you saying that you cannot edit mappings in Studio for virtual graphs that are created with "auto-generate mappings" checked? If there's a bug here, we'd like to fix it!


1 Like

I think what I'm saying is I can't create a new virtual graph (given the setup in my original post), in Stardog Studio, if the auto-generate model box is checked. I don't think I'm experiencing any other limitations at this point. I'm experimenting now and will keep you posted.

@jason I continue to have sporadic problems modifying virtual graph mappings in the Stardog Studio. Specifically: editing the SMS2 mappings, clicking Save Changes and getting this response:

Failed to update virtual graph ...

I could swear I did an update like that yesterday, but now I'm getting the error message. Can you suggest a way for me to give you more precise feedback?

@jess is there a way for me to change my mappings in the file system when I get stuck like this? I.e., is it possible to manage virtual graphs both within the Studio, and with virtual add -o?

You can export the mappings with the virtual mappings CLI command. Then you can create/overwrite a virtual graph with the modified mappings.

1 Like

@jason Never mind... I had tried to create a triple using a column that wasn't included in the SQL select. I fixed that and now it can be saved in the Studio. Maybe more detailed error messages would help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.