Open smoretti opened 4 years ago
The console looks like it is reporting the correct resource URL, but the GET has an additional /jalview at the beginning. Do you see 404 responses for those resources in the debugger's Network tab ?
Yes, I see 404 responses for those resources
Could you try adding ?j2snocore - if the 404 doesn't happen then the corefile is at fault (e.g. with http://www.jalview.org/jalview-js/JalviewJS.shtml?j2snocore).
It works. I tried to open the page with my own information in URL and jalview.js doesn't like that. i.e. /jalview/ENSGT00390000005194.1.Euteleostomi.aa.fas
If I use /jalview? Jalview opens itself as it should. So what is the right way to load alignment, tree and annotation files in jalview.js ?
I still have some 404 errors but they don't look detrimental:
OK. So the core file wasn't preserving the runtime value of j2sPath - not good. We will do some testing under: https://issues.jalview.org/browse/JAL-3516
Re remaining 404s:
Re passing files: You've a couple of options. Either pass command line args via the Info block's 'args' key, or for the alpha release jalview treats the first argument passed to the URL as a URLencoded command line (http://www.jalview.org/help/html/features/clarguments.html), so rather than /jalview/ENSGT00390000005194.1.Euteleostomi.aa.fas you can try '/jalview/?open%20ENSGT00390000005194.1.Euteleostomi.aa.fas'
So what is the right way to load alignment, tree and annotation files in jalview.js ?
If you are happy with the URL argument mechanism then construct a jalview command line like:
"open
However - it looks like both trees and annotation file parsing aren't working yet for this version! @gmungoc - do we have an issue covering loading trees and annotations in JalviewJS yet ?
Is it maybe simply that neither tree nor annotations file is in place yet at https://www.jalview.org/jalview-js/examples/? (Though having said that, I seem to reproduce this error locally where I do have these files.)
Ahem - got the newick path wrong, but the annotations path does exist: https://www.jalview.org/examples/plantfdx.annotations - I see Jalview is attempting to parse an annotation file but throwing an error in the tcoffee score file parsing routine.
This is off topic so I'm opening another gh issue: #6 for annotation files, and #7 for tree loading.
Thanks I will try both loading methods. Do you have examples for the Info block's 'args' key with alignment, tree and annotation files?
the args key takes a string that is interpreted as the Jalview.main command line. Notwithstanding #6, just add this key to the Info block: args:"-open examples/uniref50.fa -tree examples/ferredoxin.nw -annotations examples/plantfdx.annotations" Those URLs can be service endpoints, of course.
retested with latest build https://builds.jalview.org/browse/JB-GJB0-57/artifact Corefile is still a problem, and for ?j2snocore there is also an exception raised because the j2s classloader logic doesn't recognise j2spath as an absolute path, and just appends it to the document location for direct calls like class.getResource("....")
Issue with loading annotation file was in Jalview code not SwingJS - resolved under https://issues.jalview.org/browse/JAL-3603
Thanks So nothing to update in jalview-js right?
@smoretti - please take a look at https://github.com/jalview/jalview-js/tree/Release_2_11_1_js - this is the latest from JalviewJS/develop and might fix the J2S server problem.
Tagging @warownia1 - re the swingJS getResource() issue
I've hit this issue for the new Jalview site - and found a workaround: If j2sPath is set to a complete URL then everything seems to just work. So for a server where JalviewJS's j2s directory is at /jalview-js/swingjs/j2s, it can be used from pages in any other path by specifying: j2sPath: window.location.origin+'\/jalview-js/swingjs/j2s'
Hi
when I open locally JalviewJS.html everything works perfectly.
Unfortunately I have to use Jalview.js not in the root folder of the application. So my new html file specifies the right path
<script src='/jalview.js/swingjs/swingjs2.js'></script>
andj2sPath: '/jalview.js/swingjs/j2s',
but the loading fails at some point and it looks the path redefinied is not taken as relative.Here is system.out
In the browser console I can see this: GET http://dev.../jalview.js/swingjs/swingjs2.js J2SApplet load JalviewJS loadClazz... swingjs2.js:12881:12 J2SApplet load JalviewJS start applet... swingjs2.js:12881:12 J2SApplet exec JalviewJS loadClazz null -- OK swingjs2.js:12832:12 GET http://dev.../jalview.js/swingjs/j2s/core/corejvexamplefile.z.js J2SApplet exec JalviewJS start applet null -- OK swingjs2.js:12832:12 JalviewJS loaded /jalview.js/swingjs/j2s/core/corejvexamplefile.z.js:3134:51 JalviewJS running jalview.bin.Jalview /jalview.js/swingjs/j2s/core/corejvexamplefile.z.js:3134:51 GET http://dev.../jalview//jalview.js/swingjs/j2s/sun/util/resources/CalendarData.properties GET http://dev.../jalview//jalview.js/swingjs/j2s/sun/util/resources/CalendarData_en.properties
The last 2 gets don't use the redefined path.
How can I fix this?