Setup of Deegree2 WPVS Demo on Ubuntu 9.04 (amd64)
Hello,
I tried to setup a deegree-WPVS on a 64Bit Ubuntu Linux environment and encountered some Problems with that. The thing that wondered me, was, that I first made this procedure on my Laptop, running Ubuntu 9.04 (but in 32Bit environment), and everything went fine without a problem.
On my 64Bit Desktop it gave me the following error (in catalina.out):
[12:14:40] INFO: Reading configuration for WPVS from URL:
'file:/usr/local/tomcat/temp/0-deegree-wpvs/WEB-INF/conf/wpvs/wpvs_configuration.xml'.
Java 3D [dev] 1.5.0-build4-experimental 28 Jun 2006 09:30:26 PDT
java.lang.NoClassDefFoundError: sun/awt/Win32GraphicsDevice
at javax.media.j3d.NativePipeline.(NativePipeline.java:51)
at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169)
[...]
[12:14:51] ERROR: Cant set configuration for {0}
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
[...]
Caused by: java.lang.NoClassDefFoundError: sun/awt/Win32GraphicsDevice
It took me quite a while to realise, that the Win32GraphicsDevice is not supported in 64Bit Java.
So I decidet to use a 32Bit Version to try If it would fix the error. And it did! 
So here is how I fixed it:
1. Install a 32 Bit Java JRE
apt-get install ia32-sun-java6-bin
2. Install 32-Bit Java3D into the 32Bit Java
2.1. Get the j3d-1_5_2-linux-i586.zip from https://java3d.dev.java.net/binary-builds.html
2.2. Install it to your 32Bit-Java Env.
unzip java3d-1_5_*.zip
cd java3d-1_5_*
unzip j3d-jre.zip
sudo cp lib/ext/* /usr/lib/jvm/ia32-java-6-sun/jre/lib/ext/
sudo cp lib/i386/* /usr/lib/jvm/ia32-java-6-sun/jre/lib/i386/
3. Install Tomcat according to my HowTo
-> http://www.christian-willmes.de/content/howto-tomcat6-ubuntu-804-strato-...
But link the JAVA_HOME variable to the 32Bit Java path in the init script.
#!/bin/bash export JAVA_HOME=/usr/lib/jvm/ia32-java-6-sun export CATALINA_BASE=/usr/local/tomcat export CATALINA_OPTS="-server -Xmx1024m" case $1 in start) sh /usr/local/tomcat/bin/startup.sh ;; stop) sh /usr/local/tomcat/bin/shutdown.sh ;; restart) sh /usr/local/tomcat/bin/shutdown.sh sh /usr/local/tomcat/bin/startup.sh ;; esac exit 0
4. Download the Deegree2 WPVS Demo
-> http://download.deegree.org/deegree2.2/deegree-wpvs_v2_2.zip
4.1. Unpak the .zip file
4.2. Deploy the deegree-wpvs.war into your tomcat Hope this helps some people to save some time.
Because this is one of these errors you can spent quite alot time on... like I did.
--Christian
