users@glassfish.java.net

java.lang.NoClassDefFoundError Installing GlassFishv2.1.1 on Debian Server

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Feb 2010 06:58:50 PST

Hi,

over the last few days, I have been trying to install GlassFishv2.1.1 on a Debian server and have not been successful yet.
I would really appreciate your help.

This is what I have done:

-logged in as sudo bash
-Java was installed on server
-- # java -version
-- java version "1.5.0"
-- gij (GNU libgcj) version 4.3.2
-installed ant with "aptitude install ant"
- cd /var/www/ which is location of glassfish-installer-v2.1.1-linux-ml.jar
-followed the instructions here: https://glassfish.dev.java.net/downloads/v2.1.1-final.html
- java -Xmx256m -jar filename.jar
- cd glassfish
- ant -f setup.xml
this did not work and gave the following error:
/var/www/glassfish# ant -f setup.xml
Buildfile: setup.xml

get.java.home:

setup.init:

tools.init.windows:

tools.init.solaris:

tools.init.solaris-sparc:

tools.init.solaris-x86:

tools.init.linux:

tools.init.darwin:

check-osforbuildjarinstaller:

check-installer-compatibility:

installer-message:

all:

get.java.home:

setup.init:

check-java:

get.java.home:

setup.init:

validate-java:
     [echo] Current Java Version 1.5.0

get.java.home:

setup.init:

glassfish-jarunpack:
     [echo] Applying UnPack200 on Packed jars using JDK1.5
     [echo] /var/www/glassfish/lib/Pack200Task.jar

get.java.home:

setup.init:

nonmac-jarunpack:

get.java.home:

setup.init:

nonaix-jarunpack:

jarpack-tasks:

jar-unpack:

BUILD FAILED
/var/www/glassfish/setup.xml:163: The following error occurred while executing this line:
/var/www/glassfish/setup.xml:791: The following error occurred while executing this line:
/var/www/glassfish/setup.xml:997: The following error occurred while executing this line:
/var/www/glassfish/setup.xml:1001: The following error occurred while executing this line:
/var/www/glassfish/setup.xml:783: Could not create type unpack200 due to java.lang.NoClassDefFoundError: java.util.jar.Pack200

Total time: 0 seconds

after that, I tried this:
- chmod -R +x lib/ant/bin
- lib/ant/bin/ant -f setup.xml
which did not work either and prodeced the same mistake after 4 seconds of building.

I retried the whole thing as "sudo su" but that did not do anything different.
I have tried to uninstall java, but none of my commands worked (apt-get remove [sun-j2sdk1.5, sun-java5-jdk, sun, jdk, java])
Does anyone have an idea on how to proceed in this matter?
I have installed v2.1.1 because the java project to go with glassfish is written in Java 1.5 and I am not quite sure how to migrate it safely to 1.6.

Thanks in advance,
Hanne
[Message sent by forum member 'hanne' (hanne.kosinowski_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=387405