Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cytoscape 3 plugin development: load a XML file
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Koen Herten  
View profile  
 More options May 4 2012, 4:22 am
From: Koen Herten <koen.her...@gmail.com>
Date: Fri, 4 May 2012 01:22:45 -0700 (PDT)
Local: Fri, May 4 2012 4:22 am
Subject: Cytoscape 3 plugin development: load a XML file
Hi,

I am developing a plugin for Cytoscape 3. It will predict
transcription factors for a given gene set. I'm currently testing my
plugin and its working on Cytoscape 2.8.2, but I want it also
available if Cytoscape 3 is there for Cytoscape 3.
In my plugin there is an option to save the results to a XML (so it is
compatible with other programs in my lab). In Cytoscape 2.8.2 I use
XStream, but in Cytoscape 3 I get an error message:
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalArgumentException: XPP3 pull parser library not
present. Specify another driver. For example: new XStream(new
DomDriver())

So, I figured out that Cytoscape 3 must have already the XStream
libary somewhere available. But when I remove my added XStream jar, I
still get the same message.

So is there a way to import XML given by the Cytoscape envirement? Or
is there another way to do it?

Thanks,

Koen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Montojo  
View profile  
 More options May 4 2012, 1:42 pm
From: Jason Montojo <jrr...@gmail.com>
Date: Fri, 4 May 2012 13:42:16 -0400
Local: Fri, May 4 2012 1:42 pm
Subject: Re: [Cytoscape-discuss] Cytoscape 3 plugin development: load a XML file

Hi Koen,

How are you making your XStream JAR accessible to Cytoscape 3?  And is your
app a simplified-style app or OSGi app?

Thanks,
Jason


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Koen Herten  
View profile  
 More options May 7 2012, 10:14 am
From: Koen Herten <koen.her...@gmail.com>
Date: Mon, 7 May 2012 07:14:55 -0700 (PDT)
Local: Mon, May 7 2012 10:14 am
Subject: Re: Cytoscape 3 plugin development: load a XML file
Hi Jason,

my app is a simplified-style app. For the moment I make a big jar with
my code, the XStream jar (xstream-1.4.2.jar) and a kxml jar
(kxml2-2.3.0.jar) via an ant script (fatjar plugin of eclipse).
<?xml version="1.0"?>
<project name="iRegulon_Alpha.jar" default="main" basedir=".">
    <target name="main">
        <fatjar.build output="iRegulon_Alpha-v0.5.jar">
            <fatjar.manifest manifestfile="src/iRegulon/Cytoscape-
Plugin"/>
            <fatjar.filesource path="/home/koen/workspace/iRegulon/
bin" relpath=""/>
            <fatjar.jarsource file="/home/koen/Downloads/
xstream-1.4.2.jar" relpath=""/>
            <fatjar.jarsource file="/home/koen/Downloads/
kxml2-2.3.0.jar" relpath=""/>
        </fatjar.build>
    </target>
</project>

Then i import the jar in my code:
import com.thoughtworks.xstream.XStream;

This way worked fine in Cytoscape 2.8.2.

Thanks,
Koen

On May 4, 7:42 pm, Jason Montojo <jrr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Montojo  
View profile  
 More options May 8 2012, 10:34 am
From: Jason Montojo <jrr...@gmail.com>
Date: Tue, 8 May 2012 10:34:47 -0400
Local: Tues, May 8 2012 10:34 am
Subject: Re: [Cytoscape-discuss] Re: Cytoscape 3 plugin development: load a XML file

Hi Koen,

Cytoscape 3.0 provides XStream 1.3.1.  Technically, this isn't supposed to
be happening because the platform's dependencies shouldn't be visible to
app authors so we can avoid clashes like this one.  I'll open up a ticket
in our issue tracker and see if we can get this resolved soon.

In the meantime, I think you're running into issues because XStream uses
Java reflection to find a parser driver.  Cytoscape 3 runs inside an OSGi
container that uses very strict class loading rules which doesn't play
nicely with reflection.  You may need to explicitly specify a particular
ClassLoader like this:

// See
http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/converte...
alternatives
ReflectionProvider reflectionProvider = new PureJavaReflectionProvider();

HierarchicalStreamDriver driver = new KXml2Driver();
ClassLoader classLoader = YourPlugin.class.getClassLoader();

new XStream(reflectionProvider, driver, classLoader);

Also, you shouldn't be running your XML parsing code inside the AWT thread.
 That can cause the UI to freeze.  You should be doing that within the
context of a Task and hand it off to the TaskManager like this:

Task task = new AbstractTask() {
    @Override
    public void run(TaskMonitor taskMonitor) throws Exception {
        // Do XML parsing here
    }

};

adapter.getTaskManager().execute(new TaskIterator(task));

Hope this helps,
Jason


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »