About plugins and library

40 views
Skip to first unread message

Andrea Splendiani

unread,
Oct 3, 2005, 9:32:24 AM10/3/05
to cytoscap...@googlegroups.com
I have a question about plugin a libraries (I had the same problem tim
ago... )
I have a plugin with "lot" of libraries taht I'm trying to port to 2.2

Where can I specify the path where the "plugin" should look for
libraries ?

*) if I put them in the plugin directoy (or in another directory with
the -p option) I get various error messages (probably it tries to load
libraries as plugins).
*) I cannot easily make a jar with plugins, since in versione 2.1 I've
tried but I get another kind of memory related error. I will try anyway
this way.

The question is:
where can I define the classpath for a plugin to search libraries ?

best,
Andrea

Gary Bader

unread,
Oct 3, 2005, 9:53:12 AM10/3/05
to cytoscap...@googlegroups.com
Hi Andrea,
It should work by just putting all libraries in the plugin directory
along with your plugin. The plugin loader recognizes plugins by their
internal method signature, so it shouldn't create an error for libraries
(non-plugin jar files). I currently do this with Biojava libraries
(about 5 jar files) and it works well. Maybe there is another conflict
somewhere? Have you tried packaging all class files into the same jar
as a test?

Gary

Andrea Splendiani

unread,
Oct 3, 2005, 1:44:52 PM10/3/05
to cytoscap...@googlegroups.com
Il giorno 03/ott/05, alle 15:53, Gary Bader ha scritto:

>
> Hi Andrea,
> It should work by just putting all libraries in the plugin directory
> along with your plugin. The plugin loader recognizes plugins by their
> internal method signature, so it shouldn't create an error for
> libraries (non-plugin jar files).
Well, I get a java.lang.NoClassDefFoundError for
javax.management.SynamicMBeam. May be something from some libraries,
but I should have everything included.

> I currently do this with Biojava libraries (about 5 jar files) and
> it works well. Maybe there is another conflict somewhere?
Well, maybe. But that's not so easy to find.

> Have you tried packaging all class files into the same jar as a test?
Not now but in the past, had some other kind of interesting error.
However, when I run things through eclipes it almost work...

I am wondering: how do exactly plugin loading works ?
I mean, I load a plugin, this can search the "global" classpath ? only
some well defined directory (ex. plugins) ? Does cytoscape ovverrides
the environment classpath ? Does starting Cytoscape from a jar make
problems for the classpath ?


Andrea

WLigt...@gmail.com

unread,
Oct 4, 2005, 3:57:40 AM10/4/05
to cytoscape-discuss
Well, I've had similar problems, all of them were because the libraries
I used, where incomplete. the classes it didn't find, where somehow not
in the jar file, but they were referenced to from some other classes in
the jar file. Probably some of the classes have been uncleanly removed
from the library.
Willem

Message has been deleted

Andrea Splendiani

unread,
Oct 4, 2005, 8:43:27 AM10/4/05
to cytoscap...@googlegroups.com
It seems my problem come from the fact that some of the libraries
needed by the plugin in turns needs libraries from the standard
platform. So it seems the loader is unable to "see" these classes. And
clearly it is not the case to add them in plugin directory.
Furthermome, since it runs through eclipse (without adding libraries in
the plugin directory!), it seems to be a "visibility" problem due to
some way of loading classes. Perhaps the jar loader has not a complete
view of the classpath or something like this...
Still checking...

Andrea

Il giorno 04/ott/05, alle 10:03, WLigt...@gmail.com ha scritto:

>
> Hi,
> I've had the same problems in the past. But putting the jars in the
> plugin directory is the only thing you will have to do. But sometimes,
> the jar files are faulty. And I mean with that, that the classes that
> are not found (java.lang.NoClassDefFoundError) these classes were
> somehow missing from the jar files I used. Sometimes, these classes
> where OS specific and that was why they were omitted (I guess). But
> cytoscape needs ALL classes to be there.
> And I have arranged for some lib jars that contained everything I
> needed, and they work perfectly. So you might have to examine the jar
> files a little closer.
> Willem
>

Marcio da Silva

unread,
Oct 21, 2005, 8:00:45 AM10/21/05
to cytoscap...@googlegroups.com
Hi,

I added a page at the wiki to discuss this topic. Please share your
experiences there.

Best,

Marcio

Marcio da Silva

unread,
Oct 21, 2005, 8:01:11 AM10/21/05
to cytoscap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages