MySQLSyntaxErrorException when doing the TopBraid Insight tutorial

78 views
Skip to first unread message

Morten Forfang

unread,
May 20, 2014, 6:22:56 AM5/20/14
to topbrai...@googlegroups.com
Hi,

I tried the TopBraid insight tutorial (http://topquadrant.com/docs/tbi/tutorial/) on my TBCME 4.4.0 with a MySQL database. After having created a database, punched in the TBI configuration parameters and gotten the connection going (prompted for password in tbc -> tables are created by TBC) I get an exception trace.

I provide details below.

Anyone has had this or a similar problem?

I do realize I'm probably doing something stupid, so any hint would be welcome.

:-)

Morten F.

-------------------------------------------------------DETAILS------------------------------------------------

Step in tutorial where it fails:

Pressing Submit right at the beginning of step 3.

Stack trace:
--------------------
An unexpected error has occured.

If you believe this is due to an issue with TopBraid Composer, then please consider to report the problem to compose...@topquadrant.com and ideally include an export of the Error Log View (Window > Show View > Error Log).

On: May 20, 2014 11:57:28 AM

Reason:
java.io.IOException: Failed to execute SWP engine
    at org.topbraid.spin.swp.engine.XMLEngine.run(XMLEngine.java:109)
    at org.topbraid.spin.swp.servlet.SWPServletUtil.runUncached(SWPServletUtil.java:744)
    at org.topbraid.spin.swp.servlet.SWPServletUtil.run(SWPServletUtil.java:501)
    at org.topbraidlive.swp.servlet.SWPServlet.run(SWPServlet.java:169)
    at org.topbraidlive.swp.servlet.SWPServlet.run(SWPServlet.java:150)
    at org.topbraidlive.swp.servlet.SWPServlet.run(SWPServlet.java:132)
    at org.topbraidlive.swp.servlet.SWPServlet.doGet(SWPServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.topbraid.auth.servlet.TBAuthEnabledServlet.service(TBAuthEnabledServlet.java:37)
    at org.topbraid.eclipsex.servlet.TBHttpServlet.service(TBHttpServlet.java:125)
    at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:586)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.topbraid.spin.util.ExceptionUtil.throwUnchecked(ExceptionUtil.java:47)
    at org.topbraidlive.tbi.elements.CreateWorkspaceCallable.create(CreateWorkspaceCallable.java:86)
    at org.topbraidlive.tbi.elements.CreateWorkspaceControlElement.run(CreateWorkspaceControlElement.java:24)
    at org.topbraid.spin.swp.engine.SWPEngine.createNodes(SWPEngine.java:532)
    at org.topbraid.spin.swp.engine.SWPEngine.createNodesFromPrototype(SWPEngine.java:613)
    at org.topbraid.spin.swp.engine.SWPEngine.createNodes(SWPEngine.java:527)
    at org.topbraid.spin.swp.engine.SWPEngine.createNodes(SWPEngine.java:491)
    at org.topbraid.spin.swp.engine.SWPEngine.run(SWPEngine.java:1113)
    at org.topbraid.spin.swp.engine.XMLEngine.run(XMLEngine.java:103)
    ... 28 more
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.topbraidlive.tbi.elements.CreateWorkspaceCallable.create(CreateWorkspaceCallable.java:82)
    ... 35 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.topbraid.spin.util.ExceptionUtil.throwUnchecked(ExceptionUtil.java:47)
    at org.topbraidlive.tbi.elements.CreateWorkspaceCallable.create(CreateWorkspaceCallable.java:155)
    at org.topbraidlive.tbi.elements.CreateWorkspaceCallable.call(CreateWorkspaceCallable.java:123)
    at org.topbraidlive.tbi.elements.CreateWorkspaceCallable.call(CreateWorkspaceCallable.java:1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    at org.topbraid.sdb.graph.SDBUtil.performFinish(SDBUtil.java:64)
    at org.topbraidlive.tbi.elements.CreateWorkspaceCallable.writeSDB(CreateWorkspaceCallable.java:260)
    at org.topbraidlive.tbi.elements.CreateWorkspaceCallable.create(CreateWorkspaceCallable.java:152)
    ... 8 more
Caused by: org.topbraid.spin.sparqlmotion.modules.SMException: Problem creating new tables
    at org.topbraid.sdb.graph.ExportToSDBModule.execute(ExportToSDBModule.java:61)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:204)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:170)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:120)
    at org.topbraid.sdb.graph.SDBUtil.performFinish(SDBUtil.java:59)
    ... 10 more
Caused by: com.hp.hpl.jena.sdb.sql.SDBExceptionSQL: SQLException indexing table 'Triples'
    at com.hp.hpl.jena.sdb.layout2.FmtLayout2.addIndexesTableTriples(FmtLayout2.java:88)
    at com.hp.hpl.jena.sdb.layout2.FmtLayout2.addIndexes(FmtLayout2.java:55)
    at com.hp.hpl.jena.sdb.store.StoreFormatterBase.create(StoreFormatterBase.java:39)
    at org.topbraid.sdb.graph.ExportToSDBModule.execute(ExportToSDBModule.java:55)
    ... 14 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'PredObj'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2812)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2761)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at com.hp.hpl.jena.sdb.sql.SDBConnection.exec(SDBConnection.java:183)
    at com.hp.hpl.jena.sdb.layout2.FmtLayout2.addIndexesTableTriples(FmtLayout2.java:86)
    ... 17 more


Platform:
--------------

Linux Mint 64-bit

$ mysql --version
mysql  Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (x86_64) using readline 6.2

/local/tbcme $ ls -R | grep mysql
mysql-connector-java-5.1.26-bin.jar


Database:
--------------
mysql> show tables;
+--------------------------------+
| Tables_in_tbl_insight_tutorial |
+--------------------------------+
| Nodes                          |
| Prefixes                       |
| Quads                          |
| Triples                        |
+--------------------------------+
4 rows in set (0.00 sec)

tbi configuration:
-------------------------

TBI root project:

TBIData
SDB URL:

jdbc:mysql://localhost:3306/tbl_insight_tutorial
SDB database type:

MySQL
SDB user name:

evn2



Mark Graham

unread,
May 20, 2014, 5:04:25 PM5/20/14
to topbrai...@googlegroups.com
Hi Morten,

I will try to recreate this issue here as well. Was this 4.4.0 recently downloaded from the website?

Can you verify that your table-name is matched to the SDB configuration?

Tables_in_tbl_insight_tutorial

SDB URL:jdbc:mysql://localhost:3306/tbl_insight_tutorial
SDB database type: MySQL

Thanks,
Mark

Thanks,
Mark


Mark Graham
TopQuadrant Support

*PRODUCT SUPPORT:*

sup...@topquadrant.com
http://www.topquadrant.com/products/support.html




--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
topbrai...@googlegroups.com
To unsubscribe from this group, send email to
topbraid-user...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

morten forfang

unread,
May 21, 2014, 3:55:26 AM5/21/14
to topbrai...@googlegroups.com
Hi,

Thanks for the quick response.

This reply will be a good one for you and a bad and possibly embarrassing one for me;

On a rebooted host I did the exercise again this morning and it seems to work now. I had saved all the steps I did (as I always do when I do this kind of work), and I just reran them on a clean database, and it worked. No errors. No nothing. So, for the purposes of this thread, I thank you for your willingness to help and we might close this issue.

--

On a sidenote however, as far as I can find, the tutorial (http://topquadrant.com/docs/tbi/tutorial) presupposes a database setup before you can complete step 2 in the tutorial, but supplies no concrete information on how to do that (turorial-style if you'd like). So, I include the steps I did below, for TQ's reference and my suggestion would be that perhaps the tutorial could feature a step 0 or an appendix that deals with the database setup?

Thanks again and sorry for the trouble.

M.

-----------------------------------------------------------my mysql database setup steps--------------------------------------------

mysql> create database tbl_insight_tutorial; 
Query OK, 1 row affected (0.00 sec) 
mysql> use tbl_insight_tutorial; 
Database changed 
mysql> grant usage on *.* to evn2@localhost identified by 'xxx'; 
Query OK, 0 rows affected (0.00 sec) 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'evn2'@'localhost' WITH GRANT OPTION; 
Query OK, 0 rows affected (0.00 sec) 
 

Mark Graham

unread,
May 21, 2014, 9:19:08 AM5/21/14
to topbrai...@googlegroups.com
Hi Morten,

Thanks for the update. Glad this is working now. And thanks for the documentation input. Very helpful and will see if we can add that.

Mark

Thanks,
Mark


Mark Graham
TopQuadrant Support

*PRODUCT SUPPORT:*

sup...@topquadrant.com
http://www.topquadrant.com/products/support.html




Hasnaa Ibraheem

unread,
Mar 8, 2016, 4:14:46 AM3/8/16
to TopBraid Suite Users
Hi,

I have an issue that is similar to the posted issue but I believe that the root cause is different, I use TopBraid Composer version 5.1.0
This issue didn't appear before I upload 62MB rdf data file, EVN starts to cache the data takes a long time causing disk performance in device manager screen to be 100% by heavily accessing the mysql database.

After taking long time (more than 40 minutes) the issue with the below stack trace appear:

---------------------------------------------------------------------------------------

!ENTRY org.topbraidlive.swp 2 0 2016-03-08 09:46:39.459
!MESSAGE Exception in SWP Engine: java.lang.NullPointerException
Pseudo-code of surrounding call stack:
<ui:loadable id="tabs-FormSearchHomePageTab" ui:loadOnDemand=true>
<ui:if ui:condition=true>
<ui:setContext ui:varName="swaTabKey"^^xsd:string ui:varValue="FormSearchHomePageTab">
<ui:setContext ui:varName="swaTabStorageKey"^^xsd:string ui:varValue="evn-home-tab"^^xsd:string>
<ui:setContext ui:queryGraph=<urn:x-union:urn%3Ax-evn-union%3AAdministrator:http%3A%2F%2Ftopbraid.org%2Fmetadata:http%3A%2F%2Ftopbraid.org%2Fteamwork>>

!STACK 0
java.lang.NullPointerException
at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1134)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5733)
at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:267)
at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:267)
at com.hp.hpl.jena.sdb.layout2.SQLBridge2.assembleBinding(SQLBridge2.java:211)
at com.hp.hpl.jena.sdb.store.SQLBridgeBase$QueryIterSQL.moveToNextBinding(SQLBridgeBase.java:198)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:154)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.moveToNextBinding(QueryIteratorWrapper.java:43)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:154)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.moveToNextBinding(QueryIteratorWrapper.java:43)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:154)
at com.hp.hpl.jena.sdb.graph.GraphSDB.graphBaseFind(GraphSDB.java:184)
at com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:268)
at org.topbraid.core.graph.concurrent.ThreadSafeGraph.threadSafeFind(ThreadSafeGraph.java:250)
at org.topbraid.core.graph.concurrent.ThreadSafeGraph.find(ThreadSafeGraph.java:240)
at org.topbraid.core.graph.concurrent.ThreadSafeGraph.find(ThreadSafeGraph.java:300)
at org.topbraid.core.graph.CachingAllGraph.cacheAll(CachingAllGraph.java:39)
at org.topbraid.core.graph.CachingAllGraph.<init>(CachingAllGraph.java:30)
at org.topbraidcomposer.editors.utils.AbstractTBCPersonality.createCachingGraph(AbstractTBCPersonality.java:123)
at org.topbraid.sparqlmotion.database.DatabaseRegistry$1.create(DatabaseRegistry.java:26)
at org.topbraid.sparqlmotion.database.DatabaseRegistry$1.create(DatabaseRegistry.java:1)
at org.topbraid.javax.util.ConcurrentCreateWeakValueMapEx.getOrCreate(ConcurrentCreateWeakValueMapEx.java:71)
at org.topbraid.sparqlmotion.database.DatabaseGraphStore.getGraph(DatabaseGraphStore.java:85)

And another related, subsequent stack traces:

java.io.IOException: Failed to execute SWP engine for view 6496edcb:1535508923c:-7bc7 of type http://uispin.org/ui#loadable
at org.topbraid.spin.swp.engine.XMLEngine.run(XMLEngine.java:118)
at org.topbraid.spin.swp.servlet.SWPServletUtil.runUncached(SWPServletUtil.java:814)
at org.topbraid.spin.swp.servlet.SWPServletUtil.run(SWPServletUtil.java:538)
at org.topbraidlive.swp.servlet.SWPServlet.run(SWPServlet.java:159)
at org.topbraidlive.swp.servlet.SWPServlet.run(SWPServlet.java:136)
at org.topbraidlive.swp.servlet.SWPServlet.run(SWPServlet.java:115)
at org.topbraidlive.swp.servlet.SWPServlet.doGet(SWPServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.topbraid.auth.servlet.TBAuthEnabledServlet.service(TBAuthEnabledServlet.java:41)
at org.topbraid.eclipsex.servlet.TBHttpServlet.service(TBHttpServlet.java:155)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1232)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:63)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:98)
at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.doDispatch(HttpServiceRuntimeImpl.java:372)
at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:357)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
        .
        .
        .
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1134)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5733)
at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:267)
at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:267)
at com.hp.hpl.jena.sdb.layout2.SQLBridge2.assembleBinding(SQLBridge2.java:211)
at com.hp.hpl.jena.sdb.store.SQLBridgeBase$QueryIterSQL.moveToNextBinding(SQLBridgeBase.java:198)


Sorry for posting stack trace like this
Your support is so much appreciated.
Reply all
Reply to author
Forward
0 new messages