Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-1439

loadGraphML throws RuntimeException "Expecting Content-Type of application/xml, not text/html"

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: BLAZEGRAPH_RELEASE_1_5_3
    • Component/s: None
    • Labels:
      None

      Description

      I'm testing the example code from blazegraph wiki and I get the following exception, I followed step by step the wiki but seems that this exception is thrown anyway

      Exception in thread "main" java.lang.RuntimeException: Expecting Content-Type of application/xml, not text/html
      	at com.bigdata.rdf.sail.webapp.client.RemoteRepositoryBase.mutationResults(RemoteRepositoryBase.java:183)
      	at com.bigdata.rdf.sail.webapp.client.RemoteRepository.postGraphML(RemoteRepository.java:191)
      	at com.bigdata.blueprints.BigdataGraphClient.loadGraphML(BigdataGraphClient.java:140)
      	at SampleBlazegraphBlueprintsRemote.main(SampleBlazegraphBlueprintsRemote.java:19)
      

      Code

      public class SampleBlazegraphBlueprintsRemote {
      	
      	protected static final Logger log = Logger.getLogger(SampleBlazegraphBlueprintsRemote.class);
      
      	public static void main(String[] args) throws Exception {
      		
      		final BigdataGraph graph = new BigdataGraphClient("http://localhost:9999/bigdata");
      		try {
      			graph.loadGraphML(SampleBlazegraphBlueprintsRemote.class.getResource("/graph-example-1.xml").getFile());
      			for (Vertex v : graph.getVertices()) {
      				log.info(v);
      			}
      			for (Edge e : graph.getEdges()) {
      				log.info(e);
      			}
      		} finally {
      			graph.shutdown();
      		}
      	}
      }
      

      pom.xml

      ...
      <repositories>
      		<repository>
      			<id>bigdata.releases</id>
      			<url>http://www.systap.com/maven/releases</url>
      		</repository>
      	</repositories>
      
      	<dependencies>
      		<dependency>
      			<groupId>com.bigdata</groupId>
      			<artifactId>bigdata</artifactId>
      			<version>1.5.2</version>
      		</dependency>
      		<dependency>
      			<groupId>org.eclipse.jetty</groupId>
      			<artifactId>jetty-client</artifactId>
      			<version>9.3.2.v20150730</version>
      		</dependency>
      
      	</dependencies>
      ...
      

        Activity

        Hide
        maria.krokhaleva maria.krokhaleva added a comment -

        Since 1.5.2 BigdataGraphClient requires 'http://localhost:9999/bigdata/sparql' url.

        Fixed in:
        https://github.com/SYSTAP/blazegraph-samples/commit/87baa8d882ce6bfc2b73d42ca4ca476f6af7962d

        Show
        maria.krokhaleva maria.krokhaleva added a comment - Since 1.5.2 BigdataGraphClient requires 'http://localhost:9999/bigdata/sparql' url. Fixed in: https://github.com/SYSTAP/blazegraph-samples/commit/87baa8d882ce6bfc2b73d42ca4ca476f6af7962d
        Hide
        beebs Brad Bebee added a comment -

        Davide Brambilla Please confirm this works for you.

        Show
        beebs Brad Bebee added a comment - Davide Brambilla Please confirm this works for you.
        Hide
        dbrambilla27 Davide Brambilla added a comment -

        I confirm, it works adding sparql to the url.
        Thanks
        Davide B.

        Show
        dbrambilla27 Davide Brambilla added a comment - I confirm, it works adding sparql to the url. Thanks Davide B.

          People

          • Assignee:
            maria.krokhaleva maria.krokhaleva
            Reporter:
            dbrambilla27 Davide Brambilla
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: