dependencies cytoscape 3 app

95 views
Skip to first unread message

Jose Villaveces

unread,
May 22, 2013, 8:54:08 AM5/22/13
to cytoscap...@googlegroups.com
Hi All,

I'm working on a new cytoscape 3 app and recently, I added a new dependecy (lucene) to my pom file. However when I test the app jar in Cytoscape, the app fails to load. I had a look into the jar and apparently the dependencies are not exported, from that I conclude that I'm missing something while building the jar. How should I use external dependencies in a cytoscape app? Also, is there a way to debug an app from Eclipse?

Thanks in advance,
José

Ruth

unread,
May 22, 2013, 9:26:01 AM5/22/13
to cytoscap...@googlegroups.com

Hi Jose,

I was able to set up eclipse debugging using this tutorial:

http://opentutorials.cgl.ucsf.edu/index.php/Tutorial:Remote_Execution_for_Debugging

Are you making a bundle or a simple app? Are you using the maven-bundle-plugin to create your jar?

Ruth

--
You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-disc...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jose Villaveces

unread,
May 22, 2013, 9:54:24 AM5/22/13
to cytoscap...@googlegroups.com
Hi Ruth,

Thanks for your answer, I'm trying the tutorial you suggested. 

Are you making a bundle or a simple app? 
I'm making a bundle 

Are you using the maven-bundle-plugin to create your jar?
Yes

Ruth

unread,
May 22, 2013, 10:17:33 AM5/22/13
to cytoscap...@googlegroups.com

Hi Jose,

If it is bundle app I don’t think the dependencies are exported into the jar.  (not sure though).  In my bundle app all my dependencies are listed in the Manifest file of the jar under “Import-Package”.  Is lucene listed in the Import-Package of your Manifest?

Jose Villaveces

unread,
May 22, 2013, 10:34:07 AM5/22/13
to cytoscap...@googlegroups.com
Yes, the dependencies are listed in the manifest as follows:

Bundle-Version: 0.0.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Import-Package: javax.swing,org.apache.lucene.analysis,org.apache.lucene
 .analysis.standard,org.apache.lucene.document,org.apache.lucene.index,o
 rg.apache.lucene.queryparser.classic,org.apache.lucene.search,org.apach
 e.lucene.store,org.apache.lucene.util,org.cytoscape.application;version
 ="[3.0,4)",org.cytoscape.application.swing;version="[3.0,4)",org.cytosc
 ape.service.util;version="[3.0,4)",org.cytoscape.view.model;version="[3
 .0,4)",org.osgi.framework;version="[1.5,2)"
Tool: Bnd-1.50.0

Since I extracted the jar contents, I can tell that the dependencies are not packed. However I don't know if that is just the default behavior and dependencies should be exported in the jar by modifying the pom.xml 

Ruth

unread,
May 22, 2013, 10:39:10 AM5/22/13
to cytoscap...@googlegroups.com

Hi Jose,

When you say the app fails to load in cytoscape is there an error in the cytoscape console or do you just fail to see your app in the apps menu?

Jose Villaveces

unread,
May 22, 2013, 10:43:06 AM5/22/13
to cytoscap...@googlegroups.com
Hi Ruth,

I can see no error reported in the console, and the app is not reachable from the apps menu.

Ruth

unread,
May 22, 2013, 10:50:16 AM5/22/13
to cytoscap...@googlegroups.com

Hi Jose,

I had the same issue.  My Cyactivator class was never being called.  I was missing Bundle-Activator in my Manifest file which specified my CyActivator class.

(to the maven-bundle-plugin in my pom file I was missing: <Bundle-Activator>${bundle.namespace}.CyActivator</Bundle-Activator>)

Jose Villaveces

unread,
May 22, 2013, 11:01:33 AM5/22/13
to cytoscap...@googlegroups.com
Hi Ruth,

My CyActivator is referenced in the pom file, it is being called and works just fine. The problem comes when I use Lucene or jdom in my CyActivator class, as soon as I do that then the app is fails the console shows no error but the app is not reachable anymore from the apps menu. Thats why I think it  has something to do with the dependencies.

James Grammatikos

unread,
May 22, 2013, 12:01:12 PM5/22/13
to cytoscap...@googlegroups.com
I actually just struggled with this problem for the last few days and I found the answer here https://groups.google.com/forum/?fromgroups=#!searchin/cytoscape-discuss/maven/cytoscape-discuss/nu4XaM1iK8c/1U1dU1pPC0UJ . Essentially, I just added these two lines to my build instructions

<Embed-Dependency>commons-math;groupId=org.apache.commons;inline=true</Embed-Dependency>
<Import-Package>*;resolution:=optional</Import-Package>

replacing the id's with the correct ones and everything worked fine for me.

Jose Villaveces

unread,
May 23, 2013, 4:05:37 AM5/23/13
to cytoscap...@googlegroups.com
Hey James,

Thanks for the advice, my app is now running!
Reply all
Reply to author
Forward
0 new messages