Problems with database connection

13 views
Skip to first unread message

schizzo

unread,
Dec 21, 2009, 4:34:49 AM12/21/09
to cytoscape-helpdesk
Hi everybody,

I am developing a cytoscape-plugin, that loads some information from a
oracle-database and visualizes it in a graph. Therefore I had to
include the external jar-file ojdbc6.jar into my plugin-project. I
added a classpath variable in the build.xml and everything is working
fine, but only if I start the developer-version of Cytoscape from my
Eclipse-project.
If I try to start the plugin in the "normal" Cytospace_2.6.3-release
(copy the file into the plugin-folder) no database-connection can be
established. Since I want to offer the plugin for some users, that
dont have the experience how to set up an Eclipse-project, I would
like to ask if anybody has an idea, why my plugin isnt working in the
normal release.

Thank you very much!

Peng-Liang Wang

unread,
Dec 21, 2009, 5:22:41 PM12/21/09
to cytoscape...@googlegroups.com

If you add your lib jar in the path for the build.xml, it is only available for compiling, but not on running time. If you plugin depends on a lib jar, an easy way is to include it in your pugin, i.e. unjar the lib and copy all the classes to your plugin.

 

Peng




--

You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To post to this group, send email to cytoscape...@googlegroups.com.
To unsubscribe from this group, send email to cytoscape-helpd...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cytoscape-helpdesk?hl=en.



schizzo

unread,
Dec 22, 2009, 6:05:02 AM12/22/09
to cytoscape-helpdesk
Hi Peng,

thanks for your answer. I extracted the jar-file and put all the class-
files in my plugin, but still I cant get a connection to the database.
Can you tell me in which folder (e. g. the source- or the base-folder)
I have to put the class-files exactly? Do I still need to configure
the classpath or some import-options in Eclipse?

And I have found another problem with loading of cys-files: When I try
to open a cys-file I get the following errors:

java.lang.RuntimeException: java.io.IOException: The AElfred parser
is a SAX2 XMLReader

and on the cytoscape-console:

cytoscape.data.readers.CytoscapeSessionReader[ERROR]: Unable to read
XGMML file: LIFE.xgmml. java.io.IOException: The AElfred parser is a
SAX2 XMLReader java.io.IOException: The AElfred parser is a SAX2
XMLReader java.lang.RuntimeException: java.io.IOException: The AElfred
parser is a SAX2 XMLReader at cytoscape.Cytoscape.createNetwork
(Cytoscape.java:1410) at
cytoscape.data.readers.CytoscapeSessionReader.walkTree
(CytoscapeSessionReader.java:737) at
cytoscape.data.readers.CytoscapeSessionReader.loadCySession
(CytoscapeSessionReader.java:644) at
cytoscape.data.readers.CytoscapeSessionReader.unzipSessionFromURL
(CytoscapeSessionReader.java:481) at
cytoscape.data.readers.CytoscapeSessionReader.read
(CytoscapeSessionReader.java:347) at
cytoscape.actions.OpenSessionTask.run(OpenSessionAction.java:211) at
cytoscape.task.util.TaskWrapper.run(TaskManager.java:160)


thanks for your help.

> > cytoscape-helpd...@googlegroups.com<cytoscape-helpdesk%2Bunsu...@googlegroups.com>

Peng-Liang Wang

unread,
Dec 22, 2009, 12:57:42 PM12/22/09
to cytoscape...@googlegroups.com

You may look at this sample – to include lib in your plugin. http://chianti.ucsd.edu/svn/csplugins/trunk/ucsd/pwang/tutorial13/

What version of Java are you using? Cytoscape should work with Java 5.

 

Peng



To unsubscribe from this group, send email to cytoscape-helpd...@googlegroups.com.
Message has been deleted

schizzo

unread,
Dec 23, 2009, 5:54:52 AM12/23/09
to cytoscape-helpdesk
Hello Peng-Liang,

thanks for the sample, now the database-connection can be established.
GREAT!
Normally I am using the newest update of java 1.6, but now I re-
compiled
the cytospace-sources with jdk_1.5.0_22 and the compliance level for
class-files set to 1.5. Unfortunately I still get the same error when
I
try to load a cys-file:

java.lang.RuntimeException: java.io.IOException: The AElfred parser
is
a SAX2 XMLReader

I am sorry to ask you again, if you have any idea what is going
wrong.
Thanks and merry christmas!

On Dec 22, 6:57 pm, Peng-Liang Wang <penwang2...@gmail.com> wrote:
> You may look at this sample – to include lib in your plugin.http://chianti.ucsd.edu/svn/csplugins/trunk/ucsd/pwang/tutorial13/

> > <cytoscape-helpdesk%2Bunsu...@googlegroups.com<cytoscape-helpdesk%252Buns...@googlegroups.com>

Peng-Liang Wang

unread,
Dec 23, 2009, 1:29:11 PM12/23/09
to cytoscape...@googlegroups.com

Plugin developer usually doesn’t have to compile Cytoscape from source. All he/she should do is to compile the plugin and copy the plugin to the plugins folder of Cytoscape. It seems you have a lib that conflicts with the cytoscape lib, something related to SAX3 XMLReader.

 
Peng

On Wed, Dec 23, 2009 at 2:50 AM, Christian Groth <gr...@lifebiosystems.com> wrote:
Hello Peng-Liang,

thanks for the sample, now the database-connection can be established.
GREAT!
Normally I am using the newest update of java 1.6, but now I re-compiled
the cytospace-sources with jdk_1.5.0_22 and the compliance level for
class-files set to 1.5. Unfortunately I still get the same error when I
try to load a cys-file:
java.lang.RuntimeException:  java.io.IOException: The AElfred parser is
a SAX2 XMLReader

I am sorry to ask you again, if you have any idea what is going wrong.
Thanks and merry christmas!
>         > > cytoscape-helpdesk
>         +unsub...@googlegroups.com<cytoscape-helpdesk%

>         2Bunsu...@googlegroups.com>
>
>         > > .
>         > > For more options, visit this group at
>         > >http://groups.google.com/group/cytoscape-helpdesk?hl=en.
>
>         --
>
>         You received this message because you are subscribed to the
>         Google Groups "cytoscape-helpdesk" group.
>         To post to this group, send email to
>         cytoscape...@googlegroups.com.
>         To unsubscribe from this group, send email to
>         cytoscape-helpd...@googlegroups.com.
>         For more options, visit this group at
>         http://groups.google.com/group/cytoscape-helpdesk?hl=en.
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "cytoscape-helpdesk" group.
> To post to this group, send email to
> cytoscape...@googlegroups.com.
> To unsubscribe from this group, send email to cytoscape-helpdesk
> +unsub...@googlegroups.com.

> For more options, visit this group at
> http://groups.google.com/group/cytoscape-helpdesk?hl=en.
--
Christian Groth
Life Biosystems GmbH
Poststrasse 34
69115 Heidelberg
Germany
Tel:    +49.6221.5028725
Fax:    +49.6221.4859521
Email:  gr...@lifebiosystems.com
www.lifebiosystems.com
------------------------------------------------------
LIFE Biosystems GmbH

Geschäftsführer: Dr. Stephan Brock / Dr. Hartmut Voss /
Dr. Friedrich von Bohlen und Halbach

Sitz der Gesellschaft: Heidelberg

Handelsregister: Amtsgericht Mannheim - HRB 338037
------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages