installation problems

Hi Daniel.

This is cc'ed to the jalview-discuss list, just in case anyone out there
has had/dealt with this problem already.

Jim edited what Daniel Rigden wrote:

I've just got a new machine, running (64 bit) Ubuntu 8.04, and I'd
like to get Jalview working on it. Unfortunately, both
[InstallAnywhere and webstart] methods fail for me.

I first tried install anywhere, including jre, but I get a series
of errors like 'Locking assertion failure'.

I got this when installing for the first time, and when subsequently
trying to run it.

On Web Start off the webpage, the Exception text goes like this

JNLPException[category: Download Error : Exception:
java.net.UnknownHostException: www.jalview.org : LaunchDesc: null ]
  at
com.sun.javaws.cache.DownloadProtocol.doDownload(DownloadProtocol.java:611)
  at
com.sun.javaws.cache.DownloadProtocol.getDownloadSize(DownloadProtocol.java:808)
  at
com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:674)
  at
com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:638)
  at com.sun.javaws.Launcher.downloadResources(Launcher.java:969)
  at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:335)
  at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:217)
  at com.sun.javaws.Launcher.run(Launcher.java:164)
  at java.lang.Thread.run(Thread.java:595)

um. clear as mud. looks like www.jalview.org is not resolving for the
javaws program, which is pretty serious. I've seen this kind of thing
when the JNLP is broken - but both jalview.org and the ws-dev1 JNLP
files work fine on Sun java 4,5,and 6 javaws implementations.

I'm perfectly happy to use the command line. I installed openjdk and
pointed JAVA_HOME to /usr/lib/jvm/ [don't know if that's right]

Then I get

daniel@adenine:~/progs/jalview_cl$ java -Djava.ext.dirs=.
jalview.bin.Jalview
Java version: 1.6.0
amd64 Linux 2.6.24-19-generic
Jalview Version: Automated Build
Exception in thread "Thread-0" java.lang.NullPointerException
  at java.util.Hashtable.put(Hashtable.java:411)
  at java.util.Properties.setProperty(Properties.java:160)
  at java.lang.System.setProperty(System.java:748)
  at jalview.bin.Cache$1VersionChecker.run(Cache.java:269)
Exception in thread "main" java.awt.AWTError: Assistive Technology not
found: org.GNOME.Accessibility.JavaBridge
  at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:788)
  at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:874)
  at
javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:617)
  at jalview.bin.Jalview.main(Jalview.java:122)

yuk. That looks like an issue with the installation of openJDK. I have
to admit, we have not had much luck at all with *any* non sun JVMs - did
you have a go with the sun 1.(4,5,6) JRE - particularly - try the 32bit
version ? (googling the java.awt.AWTError yielded a page which suggests
this isn't an openJDK issue though, so.. no idea - herer really).

I appear not to have BERYL installed (though it looks quite cool)

There are some more explicit guidlines which are Compiz/Beryl related...
but it might be something that helps this issue too (the issues are all
LookAndFeel related.. so...). You could give them a go and see what
happens - :
http://66.102.9.104/search?q=cache:ED_njtYjQQcJ:dmartin.org/weblog/how-to-get-java-swing-apps-working-under-beryl-or-compiz-including-java-web-start+how-to-get-java-swing-apps-working-under-beryl-or-compiz-including-java-web-start&hl=en&client=firefox-a&gl=uk&strip=1
(this is a google-cached version of a blog entry that isn't accessible
any more...)

I'll have an ask around to see if anyone else in the lab has a recent
ubuntu install. There may be some workarounds I can introduce into
jalview to get it going on your system... but until then, the floor is
open to you all at jalview-discuss !

Jim

Daniel Rigden wrote:

Hi James

I appear to have a solution that works, although some errors still pop
up. I removed the openjdk and instead installed sun's 1.6 jre. Then I
set JAVA_HOME and did your
java -Djava.ext.dirs=. jalview.bin.Jalview

The first time I did this, although Jalview window opened everything was
a mess and non-functional. There were huge numbers of errors. The
*second* time I get something that appears to work perfectly.

ok - odd - normally errors like this are reproducible - maybe something
got set up after the first run.

However,

I do get this upon starting up

daniel@adenine:~/progs/jalview_cl$ java -Djava.ext.dirs=.
jalview.bin.Jalview
Java version: 1.6.0_06
amd64 Linux 2.6.24-19-generic
Jalview Version: Automated Build
Exception in thread "Thread-0" java.lang.NullPointerException
  at java.util.Hashtable.put(Hashtable.java:394)
  at java.util.Properties.setProperty(Properties.java:143)
  at java.lang.System.setProperty(System.java:731)
  at jalview.bin.Cache$1VersionChecker.run(Cache.java:269)

this exception isn't serious. its a minor bug in the jalview version
check code that is just about to be fixed.

Later, I get this

Exception in thread "AWT-EventQueue-0"
java.lang.ArrayIndexOutOfBoundsException: No such child: 7
  at java.awt.Container.getComponent(Container.java:281)
  at javax.swing.JComponent.rectangleIsObscured(JComponent.java:4337)
  at javax.swing.JComponent.paint(JComponent.java:1025)
  at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
  at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
  at
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
  at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
  at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
  at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
  at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)
  at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
  at
javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
  at javax.swing.SystemEventQueueUtilities
$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
  at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
  at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
  at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
  at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
  at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:164)
  at java.awt.Container$2.run(Container.java:2701)
  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
  at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
  at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
  at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
  at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
  at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
  at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
  at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

again - a non-serious exception raised by the windowing system .. one
day, it may be fixed (if we can work out how :).

but things seem to carry on working. Are these errors likely to a
problem later?

nope.

Hopefully a much simpler question... What alias would I use to set up a
jalview command to run from anywhere in the file hierarchy, not just
where jalview was installed?

basically, a shell script like this would do it :

#!/bin/bash
JALVIEW_HOME=/path to jalview lib dir
JAVA_HOME=/path to java jre dir
$JAVA_HOME/bin/java -Djava.ext.dirs=$JALVIEW_HOME jalview.bin.Jalview $@

save it somewhere on your $PATH and make sure its executable, and all
should work.

I really think that you should be able to get the webstart version
working now you have the sun jvm installed. You'll need to make sure
that the javaws executable from the sun JRE is being used to start
jalview - you should be able to find it under the bin directory of the
JRE (<path to sun JRE>/bin/javaws), but it seems to wander around
between different JVM installations. if you could find a javaws
executable under that path then you should be able to do something like:
<path to sun JRE>/bin/javaws
http://www.compbio.dundee.ac.uk/~ws-dev1/jalview/latest/webstart/jalview.jnlp

to start up Jalview via webstart. Obviously, you'd also need to fix your
web browser to launch the correct javaws executable, as well.

good to hear things are working for you now!
Jim

Hi Dan. Thanks for getting back to me.

Daniel Rigden wrote:

In fact the Webstart still doesn't work. I get this exception

com.sun.deploy.net.FailedDownloadException: Unable to load resource:
http://www.compbio.dundee.ac.uk/~ws-dev1/jalview/latest/webstart/jalview.jar
  at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
  at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source)
  at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source)
  at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
  at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
  at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
  at com.sun.javaws.Launcher.downloadResources(Unknown Source)
  at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
  at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
  at com.sun.javaws.Launcher.launch(Unknown Source)
  at com.sun.javaws.Main.launchApp(Unknown Source)
  at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
  at com.sun.javaws.Main$1.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)

That's directing the browser to open it with javaws from
jre-6u7-linux-i586.bin.

<insert something unprintable here> ... sigh.

ok. Notwithstanding any Proxy issues, it does look like something is
very broken. if the shell wrapper works then I'd go with that for the
moment - there still seems to be some installation issues with the JVM.

We do have some x86_64 machines that can be used to test
InstallAnywhere, and I'll post something to you (and the list) sometime
when I get to the bottom of this.

happy jalviewing (hopefully...) ..
Jim.