Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] HyperSQL back-end problem

Руслан Сорокин sorokin at oogis.ru
Thu May 19 07:56:09 PDT 2011


Hello Jonathan,

Thank you for the comprehensive and good explanation.
I probably should try MySQL instead of HyperSQL.

Best regards,
  Ru

19.05.2011, в 16:38, Jonathan Carter написал(а):

> I haven't used HyperSQL with Protege but this looks like a special case in the code for the database connector for HyperSQL might be required.
> We had a similar thing with MS SQL2005 a few years ago and I believe with DB2, where the database has specific requirements for how certain columns in the table are defined.
> 
> In this case, it looks like HyperSQL requires that VARCHAR columns have a length defined. I assume that most other JDBC compliant databases, such as MySQL don't have this requirement - the Protege database backend adapter defines everything via JDBC but has a few special cases defined.
> 
> I suspect that if you could create the table manually, the connector would work just fine - most of the issues I've had with the database backend (and I have had very few!) have been during the table creation. The trouble I have had in such cases, is that I couldn't find a way to manually complete the setup of the database and then carry on as normal. Completing the creation of the database is just a part of the conversion of your repository to the database backend and if this step fails, the whole process stops. I should point out that this makes sense - it either works or it doesn't, there's no 'sort of' or partial success. When it does work, it works very smoothly.
> 
> Hope this helps explain the error message if not resolve the problem.
> In the meantime, if you can, you might want to consider using an alternative database server, such as MySQL.
> 
> Jonathan
> _______________________________________
> 
> Jonathan Carter 
> Enterprise Architecture Solutions Ltd
> _______________________________________
> 
> Proud sponsors of The Essential Project
> The free open-source Enterprise Architecture Management Platform
> www.enterprise-architecture.org
> _______________________________________
> 
> Enterprise Architecture Solutions Ltd, Registered in England and Wales: 04097721.
> Registered Office: 76 High Street, Newport Pagnell, Milton Keynes, MK16 8AQ.
> 
> On 19 May 2011, at 11:44, Ruslan Sorokin wrote:
> 
>> Hello protege-users and team,
>> 
>> Trying to use HyperSQL as a back-end for a Protege project got this error message:
>> 
>> WARNING: Failed to create table on database HSQL Database Engine with command 'CREATE TABLE ProtegeTable (frame NVARCHAR NOT NULL, frame_type SMALLINT NOT NULL, slot NVARCHAR NOT NULL, facet NVARCHAR NOT NULL, is_template BIT NOT NULL, value_index INTEGER NOT NULL, value_type SMALLINT NOT NULL, short_value NVARCHAR, long_value CLOB)' :length must be specified in type definition: VARCHAR -- DefaultDatabaseFrameDb.createTable()
>> WARNING: Errors at copying knowledgebase jdbc:hsqldb:file:hsqldb -- java.sql.SQLSyntaxErrorException: length must be specified in type definition: VARCHAR
>>    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
>>    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
>>    at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
>>    at org.hsqldb.jdbc.JDBCStatement.executeUpdate(Unknown Source)
>>    at edu.stanford.smi.protege.storage.database.AbstractDatabaseFrameDb.executeUpdate(Unknown Source)
>>    at edu.stanford.smi.protege.storage.database.DefaultDatabaseFrameDb.createTable(Unknown Source)
>>    at edu.stanford.smi.protege.storage.database.DefaultDatabaseFrameDb.ensureEmptyTableExists(Unknown Source)
>>    at edu.stanford.smi.protege.storage.database.DefaultDatabaseFrameDb.overwriteKB(Unknown Source)
>>    at edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseFactory.copyKnowledgeBase(Unknown Source)
>>    at edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseFactory.copyKnowledgeBase(Unknown Source)
>>    at edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseFactory.saveKnowledgeBase(Unknown Source)
>>    at edu.stanford.smi.protege.model.Project.saveDomainKB(Unknown Source)
>>    at edu.stanford.smi.protege.model.Project.save(Unknown Source)
>>    at edu.stanford.smi.protege.ui.ProjectManager.save(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:1995)
>>    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
>>    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
>>    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
>>    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
>>    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
>>    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
>>    at java.awt.Component.processMouseEvent(Component.java:6289)
>>    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
>>    at java.awt.Component.processEvent(Component.java:6054)
>>    at java.awt.Container.processEvent(Container.java:2041)
>>    at java.awt.Component.dispatchEventImpl(Component.java:4652)
>>    at java.awt.Container.dispatchEventImpl(Container.java:2099)
>>    at java.awt.Component.dispatchEvent(Component.java:4482)
>>    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
>>    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
>>    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
>>    at java.awt.Container.dispatchEventImpl(Container.java:2085)
>>    at java.awt.Window.dispatchEventImpl(Window.java:2478)
>>    at java.awt.Component.dispatchEvent(Component.java:4482)
>>    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
>>    at java.awt.EventQueue.access$000(EventQueue.java:85)
>>    at java.awt.EventQueue$1.run(EventQueue.java:603)
>>    at java.awt.EventQueue$1.run(EventQueue.java:601)
>>    at java.security.AccessController.doPrivileged(Native Method)
>>    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>>    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
>>    at java.awt.EventQueue$2.run(EventQueue.java:617)
>>    at java.awt.EventQueue$2.run(EventQueue.java:615)
>>    at java.security.AccessController.doPrivileged(Native Method)
>>    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>>    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
>>    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>>    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>>    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>>    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>>    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>>    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>> Caused by: org.hsqldb.HsqlException: length must be specified in type definition: VARCHAR
>>    at org.hsqldb.error.Error.error(Unknown Source)
>>    at org.hsqldb.error.Error.error(Unknown Source)
>>    at org.hsqldb.ParserDQL.readTypeDefinition(Unknown Source)
>>    at org.hsqldb.ParserDDL.readColumnDefinitionOrNull(Unknown Source)
>>    at org.hsqldb.ParserDDL.compileCreateTableBody(Unknown Source)
>>    at org.hsqldb.ParserDDL.compileCreateTable(Unknown Source)
>>    at org.hsqldb.ParserDDL.compileCreate(Unknown Source)
>>    at org.hsqldb.ParserCommand.compilePart(Unknown Source)
>>    at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
>>    at org.hsqldb.Session.executeDirectStatement(Unknown Source)
>>    at org.hsqldb.Session.execute(Unknown Source)
>>    ... 52 more
>> 
>> What's wrong? Is anybody used HyperSQL with Protege? Any help would be very appreciated.
>> 
>> Sincerely,
>>   Ru
>> 
>> _______________________________________________
>> protege-discussion mailing list
>> protege-discussion at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>> 
>> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
> 
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> 
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20110519/51dd650c/attachment.html>


More information about the protege-discussion mailing list