TopBraid 5.0 - java.lang.LinkageError

126 views
Skip to first unread message

Kalyan

unread,
Jul 10, 2015, 9:16:37 PM7/10/15
to topbrai...@googlegroups.com
Hi 

I am trying TBC Maestro edition 5.0.0 beta.

When I try to export data to my store with a plugin(plugin uses sesame api), getting linkage error as below. I don't see this error with tbc versions <=4.6.0. Can you Please help me with below error

java.lang.LinkageError: loader constraint violation: when resolving overridden method "com.abc.mygraph.repo.MyRepositoryConnection.exportStatements(Lorg/openrdf/model/Resource;Lorg/openrdf/model/URI;Lorg/openrdf/model/Value;ZLorg/openrdf/rio/RDFHandler;[Lorg/openrdf/model/Resource;)V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, com/abc/mygraph/repo/MyRepositoryConnection, and its superclass loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader), have different Class objects for the type com.abc.mygraph.repo.MyRepositoryConnection.exportStatements(Lorg/openrdf/model/Resource;Lorg/openrdf/model/URI;Lorg/openrdf/model/Value;ZLorg/openrdf/rio/RDFHandler;[Lorg/openrdf/model/Resource;)V used in the signature
    at com.abc.mygraph.repo.MyRepo.getConnection(MyRepo.java:115)
    at com.abc.mygraph.tbc.wizards.export.ExportWizardPlugin.performFinish(ExportWizardPlugin.java:91)
    at org.topbraidcomposer.wizards.export.ExportWizard$1.run(ExportWizard.java:147)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
[TopBraid Error] 2015-07-10T16:18:03+0530 - org.topbraidcomposer.core: Export failed. (loader constraint violation: when resolving overridden method 


Thanks
Kalyan


Holger Knublauch

unread,
Jul 12, 2015, 7:04:06 PM7/12/15
to topbrai...@googlegroups.com
Hi,

for 5.0 we have upgraded Sesame to version 2.8.1, so if your plugin uses a different version, it may conflict. Whatever this plugin does, did you try to make it depend on the org.topbraid.lib.sesame2 plugin, so that it automatically gets the matching version instead of its own.

HTH
Holger
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
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.

Kalyan

unread,
Aug 3, 2015, 3:59:17 AM8/3/15
to TopBraid Suite Users

Hi Holger

As per your suggestion, I made my plugin to depend on org.topbraid.lib.sesame2 and observed the below error when I try to export '.nt' to my store. And also I have removed the sesame bundle(version 2.6.8 of sesame) which I am using.

"java.lang.NoClassDefFoundError: org/openrdf/query/resultio/TupleQueryResultFormat"


Appreciate help to find the problem

Thanks
Kalyan

Holger Knublauch

unread,
Aug 3, 2015, 6:33:01 PM8/3/15
to topbrai...@googlegroups.com
Hi Kalyan,

I have verified that the class mentioned below does exist in the Sesame version 2.7.15 that we ship (with TopBraid 5). So if your plugin is declared to depend on that plugin, then it should just work.

I am puzzled by this. Maybe one of my colleagues has additional ideas.

Holger

Ankur Oberai

unread,
Aug 4, 2015, 12:02:45 PM8/4/15
to TopBraid Suite Users
Hello Kalyan,

Can you please confirm that you are running Sesame version 2.7.15 on the server?

Thanks!

Madhu Ganji

unread,
Aug 4, 2015, 4:26:52 PM8/4/15
to TopBraid Suite Users, John O'Rourke, Prasad Y
Hi Holger

Appreciate your help with the problem I am facing detailed below.

This is Madhu working to support Franz AG plugins for TBC. Till now my colleague kalyan contacted you regarding this problem. 

I followed your suggestion on the forum, tried with clean environment one more time today but the problem still persists.

The steps I followed to work with AG plugins

1. Downloaded and installed TBC-5.0.0 maestro edition in to a new workspace
2. Using available software site 'Kepler', installed 'Eclipse Java Development Tools' and 'Object Teams' packages.
3. Made my plugin depend on org.topbraid.lib.sesame2 as you suggested. Please note that AG client is upgraded to use sesame-2.7.15 (same as TBC 5.0.0)
4. Ran the plugin and I see the below error message with export api.

-----------
An error occurred.

You are advised to restart TopBraid Composer.
Please report the problem to compose...@topquadrant.com and ideally include an export of the Error Log View (Window > Show View > Error Log).

On: Aug 4, 2015 2:04:33 PM

Reason:
java.lang.NoClassDefFoundError: org/openrdf/query/resultio/TupleQueryResultFormat

    at com.franz.agraph.http.AGHTTPClient.getTupleQueryResult(AGHTTPClient.java:379)

    at com.franz.agraph.repository.AGCatalog.listRepositories(AGCatalog.java:173)

    at com.franz.agraph.repository.AGCatalog.hasRepository(AGCatalog.java:193)

    at com.franz.agraph.repository.AGCatalog.createRepository(AGCatalog.java:235)

    at com.franz.agraph.repository.AGCatalog.createRepository(AGCatalog.java:211)

    at com.franz.agraph.tbc.wizards.export.AllegroExportWizardPlugin.performFinish(AllegroExportWizardPlugin.java:90)

    at org.topbraidcomposer.wizards.export.ExportWizard$1.run(ExportWizard.java:147)

    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Caused by: java.lang.ClassNotFoundException: org.openrdf.query.resultio.TupleQueryResultFormat cannot be found by com.franz.agraph.store_4.6.0.qualifier

    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)

    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)

    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)

    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    ... 8 more
-----------    

Thanks
Madhu G

Ankur Oberai

unread,
Aug 5, 2015, 5:05:03 PM8/5/15
to topbrai...@googlegroups.com, John O'Rourke, Prasad Y
Hello Madhu,

I was able to connect to a sesame repository - 2.7.15 from TBC.
To help replicate your use case, could you email me the java code you are using for the plugin. 

Thanks,
Ankur
Regards,

Ankur Oberai
Semantic Solutions Developer
TopQuadrant Inc.

Madhu Ganji

unread,
Aug 6, 2015, 11:00:04 AM8/6/15
to TopBraid Suite Users, j...@franz.com, pra...@leadsemantics.com
Hi Ankur

AG plugin code talks to server through AG java client. Server it self is compliant with sesame-2.7.11 but I suspect this may not be a problem. Please confirm if this needs to be looked at as well.

I see the problem is that AG java client is not able to find openrdf sesame class 'TupleQueryResultFormat'. Please note that I have added 'org.topbraid.lib.sesame2' dependency for the plugin.

Based on your comments I will send the appropriate code

Thanks for the help

Thanks
Madhu G

Madhu Ganji

unread,
Aug 13, 2015, 10:10:17 AM8/13/15
to TopBraid Suite Users, j...@franz.com, pra...@leadsemantics.com
Hi Ankur

Do you have any suggestions for us. I have been trying an alternate approach. Please see if you can help me with this.

In plugin dependencies, I have removed the unused libraries(org.topbraid.lib.sesame2 also gone away) and added sesame 2.7.15 library in my plugin 'run time' and tested the plugins. With this I am able to successfully export sample ontology (from topbraid examples) to AG (.ag4 file). But, when I try to load the same file I am getting below error.

Please see there is a post in the forum which is also talking about the same problem that I am facing (https://groups.google.com/forum/#!topic/topbraid-users/EzfwFoLWVDg), but that help suggested in forum is not working for me (I tried by setting the -Xmx value for the maximum Java heap size as mentioned in http://www.topquadrant.com/knowledge-assets/faq/tbc/)


ERROR
----------------
Operation failed.

On: Aug 13, 2015 1:19:04 PM

Reason:
java.lang.NullPointerException

    at org.topbraid.core.model.Classes.getMetaClasses(Classes.java:548)

    at org.topbraid.core.model.Classes.computeMetaClasses(Classes.java:45)

    at org.topbraidcomposer.core.session.AbstractSessionWithCache.getCachedMetaClasses(AbstractSessionWithCache.java:67)

    at org.topbraid.core.model.Classes.getMetaClasses(Classes.java:166)

    at org.topbraidcomposer.editors.ResourceEditorLauncher.checkVisibility(ResourceEditorLauncher.java:271)

    at org.topbraidcomposer.editors.ResourceEditorLauncher.access$4(ResourceEditorLauncher.java:270)

    at org.topbraidcomposer.editors.ResourceEditorLauncher$5.run(ResourceEditorLauncher.java:582)

    at org.topbraidcomposer.core.io.TBCIO$2.run(TBCIO.java:482)

    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
----------------

Thanks for your help.



Thanks
Madhu G

Ankur Oberai

unread,
Aug 13, 2015, 11:26:50 AM8/13/15
to topbrai...@googlegroups.com, John O'Rourke, Prasad Y
Hello Madhu,

Could you please email the Composer log file located at - TBCMEWorkspace/.metadata/.log

Thanks!


John O'Rourke

unread,
Aug 13, 2015, 4:33:31 PM8/13/15
to topbrai...@googlegroups.com
Madhu:

Try to remember to send emails to j...@franz.com.  I don’t usually see my gmail.


John O'Rourke
j...@franz.com
+1 925 550-8220

Franz, Inc. • Proprietary and Confidential




Ankur Oberai

unread,
Aug 13, 2015, 4:46:19 PM8/13/15
to topbrai...@googlegroups.com, John O'Rourke, Prasad Y
Hello Madhu,

Also, please send us the code for the plugin.
It will be hard for us to move forward on troubleshooting this without the code snippet that you are using.
Another option would be to setup a GoToMeeting to go over your setup.
Please let us know whatever works best for you.

Thanks,
Ankur
Reply all
Reply to author
Forward
0 new messages