以文本方式查看主题 - 计算机科学论坛 (http://bbs.xml.org.cn/index.asp) -- 『 Semantic Web(语义Web)/描述逻辑/本体 』 (http://bbs.xml.org.cn/list.asp?boardid=2) ---- 请大家帮我解决这个问题吧,急啊1! (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=60996) |
-- 作者:tuojia2001 -- 发布时间:4/7/2008 10:55:00 AM -- 请大家帮我解决这个问题吧,急啊1! 我在用JENA将OWL文件导入Mysql数据库中时,出现一下错误:请大侠们帮我看看啊。 ERROR [main] (RDFDefaultErrorHandler.java:40) - Exception during database access 谢谢啊 |
-- 作者:tuojia2001 -- 发布时间:4/7/2008 11:03:00 AM -- 请大侠们多多指教啊。谢谢了。 |
-- 作者:jpz6311whu -- 发布时间:4/7/2008 11:10:00 AM -- 请把完整的报错信息和程序代码贴出来看看 |
-- 作者:tuojia2001 -- 发布时间:4/7/2008 11:17:00 AM -- 下面视我将owl导入mysql数据库的程序: import java.io.*; import com.hp.hpl.jena.db.*; import com.hp.hpl.jena.rdf.model.*; /** /** MySQL driver classname */ /** URL of database to use */ /** User credentials */ /** Name of the Jena model to create */ /** Locations of wordnet graphs to load */ /** try { // Get a connection to the db // Get a ModelMaker for database-backed models // Create a new model named "document". try { // Importing models inside a transaction helps performance. // Read each of the three WordNet documents into the model System.err.println(e.toString()); try { /** // Use the class loader to find the input file if (in == null) { // Read the triples from the file into the model |
-- 作者:jpz6311whu -- 发布时间:4/7/2008 11:33:00 AM -- 报错的完整stacktrace贴出来,报错信息太少了没办法帮你呀 |
-- 作者:songjiesdnu -- 发布时间:2/26/2013 7:46:00 PM -- 请修改数据库中字段的编码 我也遇到同样的错误。最后发现是数据表字段编码的问题,因为jena自动创建的表的字段使用的是默认的latin编码,导致对于中文编码的文件不能写入到数据表中。你改一下表的字段编码类型就行了,我改成的是utf8的。你试试~~
|
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
78.125ms |