2

ubuntu Linuxのtomcat7の下にopenrdf-sesameとopenrdf-workbench(2.8.6)をインストールしました。次のデータをロードしました。

@prefix mur: <http://madeup.com/recipe#>.
@prefix branda: <http://madeup.com/branda#>.
@prefix brandb: <http://madeup.com/brandb#>.
@prefix brandc: <http://madeup.com/brandc#>.

mur:sausage a mur:sausage;
    mur:label "sausage".

branda:sausage a mur:sausage;
    branda:label "Brand A extra spicy sausage";
    branda:href "http://www.google.com/";
    branda:image "http://lorempixel.com/600/300/food/4/Brand%20A%20extra%20spicy%20sausage";
    mur:upc "01234".

brandb:sausage a mur:sausage;
    brandb:label "Brand B mild sausage";
    brandb:href "http://www.bing.com/";
    brandb:image "http://lorempixel.com/600/300/food/3/Brand%20B%20mild%20sausage";
    mur:upc "56789".

brandc:stockpot a mur:stockpot.

mur:spaghetti_recipe a mur:Recipe;
    mur:label "World famous sausage and spaghetti";
    mur:has_ingredient mur:sausage,
        [ a mur:sausage;
          mur:quantity "2";
          mur:units "lbs";
          mur:note "2 lbs sausage casings removed";
          branda:note "2 lbs Brand A extra spicy sausage (caseless)";
          brandb:note "2 lbs (1 package) of Brand B mild sausage with the casings removed"
        ];
    mur:has_ingredient mur:onion,
        [ a mur:onion;
          mur:quantity "1";
          mur:size "small";
          mur:label "1 small onion, chopped (optional)"
        ];
    mur:has_ingredient mur:garlic,
        [ a mur:garlic;
          mur:quantity "3";
          mur:label "3 garlic cloves, minced"
        ];
    mur:has_ingredient mur:tomato,
        [ a mur:tomato;
          mur:quantity "28";
          mur:units "ounces";
          mur:label "28 ounces of diced tomatoes"
        ];
    mur:has_ingredient mur:tomato_paste,
        [ a mur:tomato_paste;
          mur:quantity "12";
          mur:units "ounces";
          mur:label "12 ounces of tomato paste"
        ];
    mur:has_ingredient mur:water,
        [ a mur:water;
          mur:quantity "2";
          mur:units "cups";
          mur:label "If you want to simmer it as less, add less)"
        ];
   mur:has_ingredient mur:basil,
        [ a mur:basil;
          mur:quantity "3";
          mur:units "teaspoons";
          mur:label "3 teaspoons basil"
        ];
    mur:has_ingredient mur:spaghetti,
        [ a mur:spaghetti;
          mur:subtype "thin";
          mur:quantity "1";
          mur:units "lb";
          mur:label "1 lb thin spaghetti"
        ];
    mur:has_direction
        [ mur:step 1;
          mur:uses mur:sausage;
          mur:uses mur:stockpot;
          mur:label "In large, heavy stockpot, brown sausage, breaking up as you stir";
          branda:label "In large, heavy stockpot, brown Brand A extra spicy sausage, breaking up as you stir";
          brandb:label "In large, heavy stockpot, brown Brand B mild sausage breaking up as you stir"
        ].

それに対してsparqlクエリを実行できないようです。私はもう試した:

select distinct ?property
where { 
    ?s ?property ?o .
}

そのクエリから結果が得られません。ワークベンチから試してみると、ブラウザーに次のようなページが表示されます。この XML ファイルには、スタイル情報が関連付けられていないようです。ドキュメントツリーを以下に示します。すると、その下には何もありません。Python で SPARQLWrapper を使用して同じクエリを実行すると、結果として空の XML ドキュメントも返されます。ワークベンチでコンテキストをクリックするとコンテキストが表示され、名前空間をクリックすると nsamspace が表示されますが、タイプをクリックするとサーバーが 500 エラーをスローします。「java.lang.NoClassDefFoundError: java/util/Objects」がスタック トレースの先頭にある。

何か案は?

4

1 に答える 1

3

Java 7 の機能の一部が誤って Sesame 2.8 コードベースに取り込まれたことが判明しました。Sesame 2.8 は Java 6 と互換性があるとドキュメントに記載されているにもかかわらず、実際にはリリース 2.8.6 には Java 7 ランタイムが必要です。

これはバグ ( SES-2325を参照) であり、次の Sesame パッチ リリースで修正される予定です。当面の回避策は、Java 7 または 8 にアップグレードすることです (とにかく、これは非常に良い考えです)。

于 2015-10-03T23:03:33.843 に答える