Database Back-end

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Database Back-end

Matt Williams-9
Dear List,

I'm trying to save an OWL Ontology as a DB (using MySQL).

I follow File -> Convert Project to Format ... -> OWL/ RDF Database

The dialog has the following values:

Project:
/usr/local/home/mw/tmp/nciOncology.pprj

JDBC Driver class name:
sun.jdbc.odbc.JdbcOdbcDriver

JDBC URL:
jdbc:odbc:ProtegeDB

Table:ProtegeTable

(u/name & p/word are ok).


I get the following message:
The driver was found but it is not possible to create a connection with
the driver URL.
Perhaps the URL syntax is wrong or the username/password is invalid.

        [unixODBC][Driver Manager]Data source name not found, and no default
driver specified

Now, am I just pointing at the wrong place (the server is at
localhost:3036, but I've tried that and it didn't work), or do I need a
new driver. There are some instructions on the Jambalya website about
using PostgreSQL, but they seem to be for an older version.

I'm using Protege 3.2b build 235.

Thanks a lot,

Matt


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Database Back-end

Timothy Redmond

I suspect the problem is that you are using the wrong driver for  
mysql.  There is a sun.jdbc driver for mysql but
I would recommend that you use the mysql driver from the mysql web  
page.  Given that the settings you would
use are

     JDBC Driver: com.mysql.jdbc.Driver
     JDBC URL: jdbc:mysql://localhost:3306/ProtegeDB
     Table: ProtegeTable

Another warning is that there is a bug in mysql 5.0 that causes  
incorrect behavior in Protege until the latest Protege beta (just out).
Mysql 4 and lower work.

--------------------------------
Timothy Redmond, PhD
Research Staff
Stanford Medical Informatics
Medical School Office Building X-215
251 Campus Drive
Stanford, CA 94305
[hidden email]



On Jan 24, 2006, at 5:04 AM, Matt Williams wrote:

> Dear List,
>
> I'm trying to save an OWL Ontology as a DB (using MySQL).
>
> I follow File -> Convert Project to Format ... -> OWL/ RDF Database
>
> The dialog has the following values:
>
> Project:
> /usr/local/home/mw/tmp/nciOncology.pprj
>
> JDBC Driver class name:
> sun.jdbc.odbc.JdbcOdbcDriver
>
> JDBC URL:
> jdbc:odbc:ProtegeDB
>
> Table:ProtegeTable
>
> (u/name & p/word are ok).
>
>
> I get the following message:
> The driver was found but it is not possible to create a connection  
> with
> the driver URL.
> Perhaps the URL syntax is wrong or the username/password is invalid.
>
> [unixODBC][Driver Manager]Data source name not found, and no default
> driver specified
>
> Now, am I just pointing at the wrong place (the server is at
> localhost:3036, but I've tried that and it didn't work), or do I  
> need a
> new driver. There are some instructions on the Jambalya website about
> using PostgreSQL, but they seem to be for an older version.
>
> I'm using Protege 3.2b build 235.
>
> Thanks a lot,
>
> Matt
>
>
> ----------------------------------------------------------------------
> ---
> To unsubscribe go to http://protege.stanford.edu/community/ 
> subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Database Back-end

Matt Williams-9
Dear Dr. Redmond,

Thanks a lot for that; some progress:
Now have:
JDBC Driver (as suggested)
JDBC URL: jdbc:mysql://localhost:3036/prot1 (as I have already created
the table in the DB)
Table: TEST1 (as above)

and I get:
(apologies for the length, see below).

Any further ideas?

Thanks,

Matt

STACKTRACE:

The driver was found but it is not possible to create a connection with
the driver URL.
Perhaps the URL syntax is wrong or the username/password is invalid.

Unable to connect to any hosts due to exception:
java.net.SocketException: java.net.ConnectException: Connection refused

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused
at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:143)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:225)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1805)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at
edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseSourcesEditor.validateContents(Unknown
Source)
at edu.stanford.smi.protege.util.ModalDialog.attemptClose(Unknown Source)
at edu.stanford.smi.protege.util.ModalDialog$1.actionPerformed(Unknown
Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at java.awt.Component.show(Component.java:1300)
at java.awt.Component.setVisible(Component.java:1253)
at edu.stanford.smi.protege.util.ModalDialog.init(Unknown Source)
at edu.stanford.smi.protege.util.ModalDialog.<init>(Unknown Source)
at edu.stanford.smi.protege.util.ModalDialog.showDialog(Unknown Source)
at edu.stanford.smi.protege.util.ModalDialog.showDialog(Unknown Source)
at edu.stanford.smi.protege.util.ModalDialog.showDialog(Unknown Source)
at edu.stanford.smi.protege.ui.ProjectManager.loadNewSources(Unknown Source)
at
edu.stanford.smi.protege.ui.ProjectManager.changeProjectStorageFormatRequest(Unknown
Source)
at
edu.stanford.smi.protege.action.ChangeProjectStorageFormat.actionPerformed(Unknown
Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)



Timothy Redmond wrote:

>
> I suspect the problem is that you are using the wrong driver for
> mysql. There is a sun.jdbc driver for mysql but
> I would recommend that you use the mysql driver from the mysql web
> page. Given that the settings you would
> use are
>
> JDBC Driver: com.mysql.jdbc.Driver
> JDBC URL: jdbc:mysql://localhost:3306/ProtegeDB
> Table: ProtegeTable
>
> Another warning is that there is a bug in mysql 5.0 that causes
> incorrect behavior in Protege until the latest Protege beta (just out).
> Mysql 4 and lower work.
>
> --------------------------------
> Timothy Redmond, PhD
> Research Staff
> Stanford Medical Informatics
> Medical School Office Building X-215
> 251 Campus Drive
> Stanford, CA 94305
> [hidden email]
>
>
>
> On Jan 24, 2006, at 5:04 AM, Matt Williams wrote:
>
>> Dear List,
>>
>> I'm trying to save an OWL Ontology as a DB (using MySQL).
>>
>> I follow File -> Convert Project to Format ... -> OWL/ RDF Database
>>
>> The dialog has the following values:
>>
>> Project:
>> /usr/local/home/mw/tmp/nciOncology.pprj
>>
>> JDBC Driver class name:
>> sun.jdbc.odbc.JdbcOdbcDriver
>>
>> JDBC URL:
>> jdbc:odbc:ProtegeDB
>>
>> Table:ProtegeTable
>>
>> (u/name & p/word are ok).
>>
>>
>> I get the following message:
>> The driver was found but it is not possible to create a connection with
>> the driver URL.
>> Perhaps the URL syntax is wrong or the username/password is invalid.
>>
>> [unixODBC][Driver Manager]Data source name not found, and no default
>> driver specified
>>
>> Now, am I just pointing at the wrong place (the server is at
>> localhost:3036, but I've tried that and it didn't work), or do I need a
>> new driver. There are some instructions on the Jambalya website about
>> using PostgreSQL, but they seem to be for an older version.
>>
>> I'm using Protege 3.2b build 235.
>>
>> Thanks a lot,
>>
>> Matt
>>
>>
>> -------------------------------------------------------------------------
>>
>> To unsubscribe go to
>> http://protege.stanford.edu/community/subscribe.html
>>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Database Back-end

Timothy Redmond

The error says that the connect failed; protege was unable to even  
start communicating with the database.  Looking at your URL

> JDBC URL: jdbc:mysql://localhost:3036/prot1 (as I have already  
> created the table in the DB)

it looks like the problem is that 3036 should be 3306.  Also, in a  
"convert to format" operation the table will be dropped and  
recreated.  Otherwise if you create the table you need to be sure  
that to create exactly the right columns. It is easier to let protege  
create the table.

--------------------------------
Timothy Redmond, PhD
Research Staff
Stanford Medical Informatics
Medical School Office Building X-215
251 Campus Drive
Stanford, CA 94305
[hidden email]



On Jan 25, 2006, at 3:04 AM, Matt Williams wrote:

> Dear Dr. Redmond,
>
> Thanks a lot for that; some progress:
> Now have:
> JDBC Driver (as suggested)
> JDBC URL: jdbc:mysql://localhost:3036/prot1 (as I have already  
> created the table in the DB)
> Table: TEST1 (as above)
>
> and I get:
> (apologies for the length, see below).
>
> Any further ideas?
>
> Thanks,
>
> Matt
>
> STACKTRACE:
>
> The driver was found but it is not possible to create a connection  
> with the driver URL.
> Perhaps the URL syntax is wrong or the username/password is invalid.
>
> Unable to connect to any hosts due to exception:  
> java.net.SocketException: java.net.ConnectException: Connection  
> refused
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketException
> MESSAGE: java.net.ConnectException: Connection refused
>
> STACKTRACE:
>
> java.net.SocketException: java.net.ConnectException: Connection  
> refused
> at com.mysql.jdbc.StandardSocketFactory.connect
> (StandardSocketFactory.java:143)
> at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:225)
> at com.mysql.jdbc.Connection.createNewIO(Connection.java:1805)
> at com.mysql.jdbc.Connection.<init>(Connection.java:452)
> at com.mysql.jdbc.NonRegisteringDriver.connect
> (NonRegisteringDriver.java:411)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at  
> edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseSources
> Editor.validateContents(Unknown Source)
> at edu.stanford.smi.protege.util.ModalDialog.attemptClose(Unknown  
> Source)
> at edu.stanford.smi.protege.util.ModalDialog$1.actionPerformed
> (Unknown Source)
> at javax.swing.AbstractButton.fireActionPerformed
> (AbstractButton.java:1849)
> at javax.swing.AbstractButton$Handler.actionPerformed
> (AbstractButton.java:2169)
> at javax.swing.DefaultButtonModel.fireActionPerformed
> (DefaultButtonModel.java:420)
> at javax.swing.DefaultButtonModel.setPressed
> (DefaultButtonModel.java:258)
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
> (BasicButtonListener.java:234)
> at java.awt.Component.processMouseEvent(Component.java:5488)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
> at java.awt.Component.processEvent(Component.java:5253)
> at java.awt.Container.processEvent(Container.java:1966)
> at java.awt.Component.dispatchEventImpl(Component.java:3955)
> at java.awt.Container.dispatchEventImpl(Container.java:2024)
> at java.awt.Component.dispatchEvent(Component.java:3803)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:
> 4212)
> at java.awt.LightweightDispatcher.processMouseEvent(Container.java:
> 3892)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
> at java.awt.Container.dispatchEventImpl(Container.java:2010)
> at java.awt.Window.dispatchEventImpl(Window.java:1774)
> at java.awt.Component.dispatchEvent(Component.java:3803)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
> at java.awt.EventDispatchThread.pumpOneEventForHierarchy
> (EventDispatchThread.java:242)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy
> (EventDispatchThread.java:163)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy
> (EventDispatchThread.java:153)
> at java.awt.Dialog$1.run(Dialog.java:515)
> at java.awt.Dialog.show(Dialog.java:536)
> at java.awt.Component.show(Component.java:1300)
> at java.awt.Component.setVisible(Component.java:1253)
> at edu.stanford.smi.protege.util.ModalDialog.init(Unknown Source)
> at edu.stanford.smi.protege.util.ModalDialog.<init>(Unknown Source)
> at edu.stanford.smi.protege.util.ModalDialog.showDialog(Unknown  
> Source)
> at edu.stanford.smi.protege.util.ModalDialog.showDialog(Unknown  
> Source)
> at edu.stanford.smi.protege.util.ModalDialog.showDialog(Unknown  
> Source)
> at edu.stanford.smi.protege.ui.ProjectManager.loadNewSources
> (Unknown Source)
> at  
> edu.stanford.smi.protege.ui.ProjectManager.changeProjectStorageFormatR
> equest(Unknown Source)
> at  
> edu.stanford.smi.protege.action.ChangeProjectStorageFormat.actionPerfo
> rmed(Unknown Source)
> at javax.swing.AbstractButton.fireActionPerformed
> (AbstractButton.java:1849)
>
>
>
> Timothy Redmond wrote:
>>
>> I suspect the problem is that you are using the wrong driver for  
>> mysql. There is a sun.jdbc driver for mysql but
>> I would recommend that you use the mysql driver from the mysql web  
>> page. Given that the settings you would
>> use are
>>
>> JDBC Driver: com.mysql.jdbc.Driver
>> JDBC URL: jdbc:mysql://localhost:3306/ProtegeDB
>> Table: ProtegeTable
>>
>> Another warning is that there is a bug in mysql 5.0 that causes  
>> incorrect behavior in Protege until the latest Protege beta (just  
>> out).
>> Mysql 4 and lower work.
>>
>> --------------------------------
>> Timothy Redmond, PhD
>> Research Staff
>> Stanford Medical Informatics
>> Medical School Office Building X-215
>> 251 Campus Drive
>> Stanford, CA 94305
>> [hidden email]
>>
>>
>>
>> On Jan 24, 2006, at 5:04 AM, Matt Williams wrote:
>>
>>> Dear List,
>>>
>>> I'm trying to save an OWL Ontology as a DB (using MySQL).
>>>
>>> I follow File -> Convert Project to Format ... -> OWL/ RDF Database
>>>
>>> The dialog has the following values:
>>>
>>> Project:
>>> /usr/local/home/mw/tmp/nciOncology.pprj
>>>
>>> JDBC Driver class name:
>>> sun.jdbc.odbc.JdbcOdbcDriver
>>>
>>> JDBC URL:
>>> jdbc:odbc:ProtegeDB
>>>
>>> Table:ProtegeTable
>>>
>>> (u/name & p/word are ok).
>>>
>>>
>>> I get the following message:
>>> The driver was found but it is not possible to create a  
>>> connection with
>>> the driver URL.
>>> Perhaps the URL syntax is wrong or the username/password is invalid.
>>>
>>> [unixODBC][Driver Manager]Data source name not found, and no default
>>> driver specified
>>>
>>> Now, am I just pointing at the wrong place (the server is at
>>> localhost:3036, but I've tried that and it didn't work), or do I  
>>> need a
>>> new driver. There are some instructions on the Jambalya website  
>>> about
>>> using PostgreSQL, but they seem to be for an older version.
>>>
>>> I'm using Protege 3.2b build 235.
>>>
>>> Thanks a lot,
>>>
>>> Matt
>>>
>>>
>>> --------------------------------------------------------------------
>>> -----
>>> To unsubscribe go to http://protege.stanford.edu/community/ 
>>> subscribe.html
>>>
>>
>> ---------------------------------------------------------------------
>> ----
>> To unsubscribe go to http://protege.stanford.edu/community/ 
>> subscribe.html
>>
>
> ----------------------------------------------------------------------
> ---
> To unsubscribe go to http://protege.stanford.edu/community/ 
> subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html