How to use Jena to save the ontology file to the MySQL database _ MySQL
Source: Internet
Author: User
How to save the ontology file to MySQL database using Jena: bitsCN.com was configured for one day yesterday, which is Jena 2.4.0, MySQL database version 5.1.42-community, and JDK Version 1.6.0, mySQLdriver is a mysql-connector-java-3.1.14;
An example is written according to the resources on the network, and a problem occurs.
Create a model maker using database connection parameters
Model defModel = maker. createModel ("MyOntology ");
You cannot create a model from maker. createModel;
Then I wrote some debug debugging. one is to use the java interface to access mysql. the test is successful, indicating that there is no error in connectivity between java and mysql. then the problem occurs on Jena;
Then update Jena to version 2.6 to locate the problem.
Tips:
After doing this research, we found that the most common problem with using these open-source software and APIs is the version compatibility. we have encountered the compatibility problem between Protege and graphviz versions before, in addition, it often takes a long time to encounter such a problem, because the first suspect object is often the person who knows little about it.
The above content is an introduction to using Jena to save the ontology file to the MySQL database. I hope you will gain some benefits.
The above content describes how to use Jena to store the ontology file into the MySQL database. I hope it will help you in this regard. BitsCN.com
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.