Hi, If trying to generate btp files from CSV-format files with headless batch mode, I face the problem as following: java -Xmx512m org.systemsbiology.biotapestry.app.ImageGeneratorApplication -csvImport 1886661535.csv -saveFile outputHelloFile.btp Exception in thread "main" java.lang.NoClassDefFoundError: org/systemsbiology/biotapestry/app/ImageGeneratorApplication Caused by: java.lang.ClassNotFoundException: org.systemsbiology.biotapestry.app.ImageGeneratorApplication at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: org.systemsbiology.biotapestry.app.ImageGeneratorApplication. Program will exit. Presumably this is due to class path configuration , then I changed to run java -Xmx512m -classpath org.systemsbiology.biotapestry.app.ImageGeneratorApplication -csvImport 1886661535.csv -saveFile outputHelloFile.btp Unrecognized option: -csvImport Could not create the Java virtual machine. did anyone meet this problem before? many thanks. Jie |
Hi Bill, many thanks, classpath works now but another ArrayIndexOutOfBoundsException problem comes up. java -Xmx512m -classpath ~/WEB-INF/sBioTapestry-J15-V5.0.1.jar org.systemsbiology.biotapestry.app.ImageGeneratorApplication -csvImport 1131323607.csv -saveFile outputHelloFile.btp Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 at org.systemsbiology.biotapestry.cmd.MainCommands$ImportFullHierarchyFromCSVAction.performOperation(MainCommands.java:7477) at org.systemsbiology.biotapestry.app.ImageGeneratorApplication.generate(ImageGeneratorApplication.java:538) at org.systemsbiology.biotapestry.app.ImageGeneratorApplication.main(ImageGeneratorApplication.java:401) I attach one example CSV file for your try. regards JIe --- On Thu, 1/20/11, Bill Longabaugh <wlong...@systemsbiology.org> wrote: |
|
Tried bioTapestry site TutorialSpreadsheetVer2.csv file, it does not go through either. regards |
--- On Thu, 1/20/11, Bill Longabaugh <wlong...@systemsbiology.org> wrote: |
|
$JAVAHOME/bin/java -Xmx512m -classpath
"$PIPETESTDIR/BT-Patch-01-21-11.jar:$PIPETESTDIR/sBioTapestry-J15-V5.0.1.jar"
org.systemsbiology.biotapestry.app.ImageGeneratorApplication -csvImport
$CSVINTEST -saveFile $BTPOUT
Note the use of quotes around and the colon delimiter inside
the classpath. Note the above this is UNIX bash shell syntax.
This fixed will be inside the next point release. Please discard
the patch and use that next official release when it appears.
Thanks for the bug report; sorry for the problem. Let me know
if further issues crop up.
-- Bill
awsome. that makes sense now. many thanks. what I do is searching interactions from evidence and generating CSV files for Biotapestry, making dynamic networks with differrent search options. Referring to biotapestry API would be a better option. Kind Regards jié zu Email: po_...@yahoo.com Tel: +44 (0)1865 222470 Fax: +44 (0)1865 222501 |
--- On Fri, 1/21/11, Bill Longabaugh <wlong...@systemsbiology.org> wrote: |
|
|
|
|
|
|
Hi, today I got this in Ubuntu. > java -Xmx512m -classpath "/var/www/BT-Patch-01-21-11.jar:/var/www/sBioTapestry-J15-V5.0.1.jar" org.systemsbiology.biotapestry.app.ImageGeneratorApplication -csvImport 1131323607.csv -saveFile tryHello.btp Exception in thread "main" java.lang.SecurityException: class "org.systemsbiology.biotapestry.app.ImageGeneratorApplication$GeneratorException"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:787) at java.lang.ClassLoader.preDefineClass(ClassLoader.java:502) at java.lang.ClassLoader.defineClass(ClassLoader.java:628) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) |
at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: org.systemsbiology.biotapestry.app.ImageGeneratorApplication. Program will exit. |
FYI. |
Kind Regards jié zu Email: po_...@yahoo.com Tel: +44 (0)1865 222470 Fax: +44 (0)1865 222501 |
--- On Fri, 1/21/11, William Longabaugh <wlong...@systemsbiology.org> wrote: |
|
|
|
If that doesn't work, then I would suggest un-jar-ing the
sBioTapestry-J15-V5.0.1.jar file as well as the patch file,
replacing the offending classes from the patch file, and
re-jar-ing up the patched directory structure.
But I think this new patch jar should work.
Note that this patch is only needed to run the command-line
ImageGeneratorApplication class. If you are calling the
BioTapestry classes from within a Java program (as described
previously), there is no need for the patch.
-- Bill
Hi, Bill, the new patch does work, but not from the command line model as java -Xmx512m -classpath "BT-Patch-01-25-11.jar:sBioTapestry-J15-V5.0.1.jar" org.systemsbiology.biotapestry.app.ImageGeneratorApplication -csvImport sample.csv -saveFile tryhello.btp |
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 at org.systemsbiology.biotapestry.cmd.MainCommands$ImportFullHierarchyFromCSVAction.performOperation(MainCommands.java:7477) at org.systemsbiology.biotapestry.app.ImageGeneratorApplication.generate(ImageGeneratorApplication.java:538) at org.systemsbiology.biotapestry.app.ImageGeneratorApplication.main(ImageGeneratorApplication.java:401) |
, which returns to out index error. then what i do is replacing original sBiotapestry-J15-V5.0.1.jar subcategory app 2 class files with your new sBT-patch-01-25-11.jar. re jar the V5.0.1 files. Anyway, it makes sense now. many thanks. |
Kind Regards jié zu Email: po_...@yahoo.com Tel: +44 (0)1865 222470 Fax: +44 (0)1865 222501 |
--- On Tue, 1/25/11, William Longabaugh <wlong...@systemsbiology.org> wrote: |
|
But your fix got the job done too...
-- Bill
zuo wrote:
> Hi, Bill,
>
> the new patch does work, but not from the command line model as
> java -Xmx512m -classpath
> "BT-Patch-01-25-11.jar:sBioTapestry-J15-V5.0.1.jar"
> org.systemsbiology.biotapestry.app.ImageGeneratorApplication -csvImport
> sample.csv -saveFile tryhello.btp
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
> at
> org.systemsbiology.biotapestry.cmd.MainCommands$ImportFullHierarchyFromCSVAction.performOperation(MainCommands.java:7477)
> at
> org.systemsbiology.biotapestry.app.ImageGeneratorApplication.generate(ImageGeneratorApplication.java:538)
> at
> org.systemsbiology.biotapestry.app.ImageGeneratorApplication.main(ImageGeneratorApplication.java:401)
>
>
> , which returns to out index error.
>
> then what i do is replacing original sBiotapestry-J15-V5.0.1.jar
> subcategory app 2 class files with your new sBT-patch-01-25-11.jar. re
> jar the V5.0.1 files.
>
> Anyway, it makes sense now. many thanks.
>
>
> Kind Regards
>
>
> ji� zu
>
> Email: po_...@yahoo.com
> Tel: +44 (0)1865 222470
> Fax: +44 (0)1865 222501
>
> --- On *Tue, 1/25/11, William Longabaugh
> </mc/compose?to=biotapes...@googlegroups.com>.
> To unsubscribe from this group, send email to
> biotapestry-us...@googlegroups.com
> </mc/compose?to=unsub...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/biotapestry-users?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "BioTapestry-users" group.
> To post to this group, send email to biotapes...@googlegroups.com.
> To unsubscribe from this group, send email to
> biotapestry-us...@googlegroups.com.
it takes a while to look for how ImageGeneratorApplication can be
integrated into my small servlet application (JSP+bean+servlet), which
is aim to convert CSV files to BTP files. Surely not in command line
mode, which works fine now, many thanks for previous helps. In a new java bean (convertCSVtoBTPBean.java), I tried to use ImageGeneratorApplication class in sBioTapestry-J15-V5.0.1.jar that is in $CLASSPATH. Briefly, here is a part of example code I copy from ImageGeneratorAppTestWrapper , public static int convertCSVtoBTP(String fileNameCSV, String fileNameBTP) throws IOException { int return_int =0; InputStream isb = null; InputStream isc = null; DirectoryNamedOutputStreamSource noss = null; ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { isb = new FileInputStream(fileNameCSV); isc = new FileInputStream(fileNameCSV); File targetDir = new File(fileNameBTP); noss = new DirectoryNamedOutputStreamSource(targetDir); } catch (IOException ioex) { System.err.println("IO Failure"); System.exit(1); } ImageGeneratorApplication iga1 = null; try { iga1 = new ImageGeneratorApplication(ImageGeneratorApplication.CSV_INPUT, isb, isc, ImageGeneratorApplication.BTP_OUTPUT, baos, new Integer(SIFImportChoicesDialog.INCREMENTAL), new Integer(NetOverlayProperties.RELAYOUT_NO_CHANGE), new Boolean(true)); iga1.process(); } catch (ImageGeneratorApplication.GeneratorException gex) { gex.getMessage(); gex.getWrappedException(); } return return_int; } // end; there is no problem for compile but running it in Firefox will cause java.lang.ClassNotFoundException: org.systemsbiology.biotapestry.app.ImageGeneratorApplication$GeneratorException can anyone shed lights for this? thanks. Kind Regards jié zu |
Email: po_...@yahoo.com Tel: +44 (0)1865 222470 Fax: +44 (0)1865 222501 |
|
|
|
|
|
|
org.systemsbiology.biotapestry.app.ImageGeneratorApplication$GeneratorException
is actually inside the sBioTapestry-J15-V5.0.1.jar file that you have
in your (JSP+bean+servlet) classpath. Given what you said a couple
of days ago, I have to wonder if that jar is one that you did surgery
on to replace the broken classes. Two classes needed to get moved
over; the missing one is one of those two. If it didn't make it
across, that could cause the problem. Make sure that the jar
in your server classpath is the original version; you should
not need the patched version for this particular usage (at
least I don't think you do).
You could create a really simple bean that just tries to create
an instance of the GeneratorException to test the validity of
your server classpath.
Hope this helps,
-- Bill
zuo wrote:
> it takes a while to look for how ImageGeneratorApplication can be
> integrated into my small servlet application (JSP+bean+servlet), which
> is aim to convert CSV files to BTP files. Surely not in command line
> mode, which works fine now, many thanks for previous helps.
>
> In a new java bean (convertCSVtoBTPBean.java), I tried to use
> ImageGeneratorApplication class in sBioTapestry-J15-V5.0.1.jar that is
> in $CLASSPATH.
>
> java.lang.ClassNotFoundException:
> org.systemsbiology.biotapestry.app.ImageGeneratorApplication$GeneratorException
>
all right. to summarise what I get so far, 1. convert csv to btp in command line mode : ok with sBT-Patch-01-25-11.jar and sBioTapestry-J15-V5.0.1.jar. 2. convert csv to btp in servlet +bean mode: ERROR: java.lang.ClassNotFoundException: org.systemsbiology.biotapestry.app.ImageGeneratorApplication$GeneratorException i have tried sBioTapestry-J15-V5.0.1.jar and sBioTapestry-J15-V5.0.1-25-01-2011.jar (modified) . ImageGeneratorApplication$GeneratorException.class can be seen in app folder of both jar files, but does not work. and I tried put both sBT-Patch-01-25-11.jar and sBioTapestry-J15-V5.0.1.jar in $CLASSPATH, sadly as well. 3. launch JNLP file from web : if open with Viewer, there is a problem : java.lang.NoClassDefFoundError: org/systemsbiology/biotapestry/ui/dialogs/MultiSelectionPropertiesDialog . i am waiting for next 5.0.2 solution. if open with Editor, there is problem with accessdenied (runtime preferences), which I do not know, may be due to digit certificate. applet does not let it go. so, it is better waiting for 5.0.2.jar solution. sorry for the questions raised by me. anyway, nice weekend. cheers |
Kind Regards jié zu Email: po_...@yahoo.com Tel: +44 (0)1865 222470 Fax: +44 (0)1865 222501 |
--- On Thu, 1/27/11, William Longabaugh <wlong...@systemsbiology.org> wrote: |
|
Answers below...
zuo wrote:
> all right. to summarise what I get so far,
> 2. convert csv to btp in servlet +bean mode: ERROR:
> java.lang.ClassNotFoundException:
> org.systemsbiology.biotapestry.app.ImageGeneratorApplication$GeneratorException
>
>
> i have tried sBioTapestry-J15-V5.0.1.jar and
> sBioTapestry-J15-V5.0.1-25-01-2011.jar (modified) .
> ImageGeneratorApplication$GeneratorException.class can be seen in app
> folder of both jar files, but does not work. and I tried put both
> sBT-Patch-01-25-11.jar and sBioTapestry-J15-V5.0.1.jar in $CLASSPATH,
> sadly as well.
This problem is really dependent on how your CLASSPATH is resolved
by your servlet, which depends on the configuration of your
server/servlet installation. I always find classpath problems
to be very tricky to track down. Worst case, start with a clean
slate, which obviously should not work, and incrementally add
classes into your classpath to resolve errors.
>
> 3. launch JNLP file from web : if open with Viewer, there is a problem
> : java.lang.NoClassDefFoundError:
> org/systemsbiology/biotapestry/ui/dialogs/MultiSelectionPropertiesDialog
> . i am waiting for next 5.0.2 solution.
>
> if open with Editor, there is problem with accessdenied (runtime
> preferences), which I do not know, may be due to digit certificate.
> applet does not let it go.
>
If running the Editor, this element is needed in the jnlp file:
<security>
<all-permissions/>
</security>
Consult the Editor launch jnlp to see what things should look like.
>
> so, it is better waiting for 5.0.2.jar solution.
I'm waiting for some feedback on a new feature slated for 5.0.2
before I can push it out. I hoping by next week.
>
>
> sorry for the questions raised by me. anyway, nice weekend.
>
Thanks.
-- Bill
many thanks. I found solutions of launching Editor, that is ok now. about $GeneratorException class, what surprised me is when I put 'import org.....ImageGeneratorApplication$GeneratorException' in my bean file, the applications are not compiled due to 'not class found ' error. certainily it is in jar file. Which makes me suspect why ImageGeneratorApplication$GeneratorException.class can not be found by compiler. As you suggest, it is better to build up $CLASSPATH from scratch. see what happens next. BTW, any chance providing java or jar only with functions of converting CSV to BTP files ? that would simplify the trace down procedure. maybe dramatical changes for you, never mind. |
Kind Regards jié zu Email: po_...@yahoo.com Tel: +44 (0)1865 222470 Fax: +44 (0)1865 222501 |
--- On Fri, 1/28/11, William Longabaugh <wlong...@systemsbiology.org> wrote: |
|