1.
在linux下部署的,發現了一個問題:fuseki-server進程結束過一次(kill或者是ctrl+z或者是終端被關掉),再次啓動時會報錯:DatasetPrefixesTDB WARN Mangled prefix map: graph name=
java.lang.NullPointerException
XXXX
......
org.apache.jena.assembler.exceptions.AssemblerException: caught: null
xxxx
.......
然後就訪問不了了。
我發現每次重啓如果重新用jena做一次tdbloader,就不會有這個問題,這是怎麼回事呢?
解決:
刪除tdb路徑下所有prefixXXX文件,再次啓動會重新生成這些文件。我之前也被這個問題搞了很久,在jena社區提問,有人給的回答某種程度解決了這個問題,如下:“where it is building the base graph.
The TDB database has a corrupted prefix table. At the warning, this was mentioned then ignored. On this path through the code, it is an error.
Using inference means that TDB is not running transactionally.
At some time in the past, that DB has not been closed cleanly.
As it's the prefixes, often you can delete the prefix table files but if
it is a small DB, it's better to rebuild it.”
2.
在配置好fuseki_conf.ttl後,第二次運行fuseki-server.bat時,出現以下錯誤:
[2018-03-09 15:41:33] Server ERROR Exception in initialization: Failed reading assembler description: java.nio.charset.MalformedInputException: Input length = 1
[2018-03-09 15:41:33] WebAppContext WARN Failed startup of context o.e.j.w.WebAppContext@30ed9c6c{/,file:///D:/environment/apache-jena-fuseki-3.6.0/webapp/,UNAVAILABLE}
org.apache.jena.sparql.ARQException: Failed reading assembler description: java.nio.charset.MalformedInputException: Input length = 1
解決:
同上,刪除tdb路徑下所有的prefix文件
3.
Server ERROR Exception in initialization: the loading of content into file:///D:/AppsPath/apache-jena-fuseki-3.8.0/run/configuration/fuseki_conf.ttl#model_inf was aborted because of Read-only object file
解決:
版本問題,這是由於fuseki版本升級所導致的問題,ja:baseModel <#tdbGraph> ;改爲 ja:MemoryModel <#tdbGraph> ;
即可順利運行。
4.
jena好像只能在本地訪問,其他地址訪問不到?
解決:
需要將apache-jena-fuseki-3.9.0中run文件下的shiro.ini裏面的/$/** = localhostFilter註釋掉(#/$/** = localhostFilter)