[Netarchivesuite-devel] java.lang.UnsupportedClassVersionError when deploying 3.18

Nicolas Giraud nikokode at gmail.com
Mon Nov 14 14:50:17 CET 2011


Hi Søren,

I actually found out the problem. I installed JDK 1.7.0 a while ago for
evaluation, and my Ant build would, for some reason, use this JDK instead
of the default 1.6.x configured for the Eclipse workspace. Has to go
through the "External tools configuration" setup menu to force Ant to use
the same JRE as the project.

It works now, sorry for the hasty posting...

Nicolas

2011/11/14 Søren Vejrup Carlsen <svc at kb.dk>

>  Hi Nicolas.
> Could it be, that you have compiled your code with JDK 7 instead of 6?
> We are compiling our builds with JDK 6U21
>
> Best Regards
> Søren
>
>  ------------------------------
> *Fra:* netarchivesuite-devel-bounces at ml.sbforge.org [
> netarchivesuite-devel-bounces at ml.sbforge.org] på vegne af Nicolas Giraud [
> nikokode at gmail.com]
> *Sendt:* 14. november 2011 14:29
> *Til:* netarchivesuite-devel at ml.sbforge.org
> *Emne:* [Netarchivesuite-devel] java.lang.UnsupportedClassVersionError
> when deploying 3.18
>
>
>
> ---------- Forwarded message ----------
> From: Nicolas Giraud <nikokode at gmail.com>
> Date: 2011/11/14
> Subject: java.lang.UnsupportedClassVersionError when deploying 3.18
> To: netarchivesuite-devel at lists.gforge.statsbiblioteket.dk
>
>
> Hi,
>
> I am getting a java.lang.UnsupportedClassVersionError when invoking
> DeployApplication ... What version of JDK are you guys using?
>
> Here are my details:
>
> ngiraud at Rabanastre:~/eclipse_ws/nas_install/release-test/deploy/standalone_derby$
> ./standalone_derby_deploy.sh
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> dk/netarkivet/deploy/DeployApplication : Unsupported major.minor version
> 51.0
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>     at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>     at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>     at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>     at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> Could not find the main class: dk.netarkivet.deploy.DeployApplication.
> Program will exit.
> ngiraud at Rabanastre:~/eclipse_ws/nas_install/release-test/deploy/standalone_derby$
> java -version
> java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
> Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
>
> And I use this script to launch the deploy tool:
>
> #!/bin/bash
>
> JAVA_HOME=/usr/lib/jvm/java-6-sun/
> NAS_BASE=/home/ngiraud/eclipse_ws/netarchivesuite
>
> CLASSPATH=$NAS_BASE/lib/dk.netarkivet.deploy.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/dk.netarkivet.archive.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/dk.netarkivet.common.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/dk.netarkivet.harvester.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/dk.netarkivet.monitor.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/dk.netarkivet.viewerproxy.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/dom4j-1.6.1.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/commons-logging-1.0.4.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/commons-cli-1.0.jar
> CLASSPATH=$CLASSPATH:$NAS_BASE/lib/jaxen-1.1.jar
> export CLASSPATH
>
> DEPLOY_CMD="$JAVA_HOME/bin/java \
>     -cp $CLASSPATH dk.netarkivet.deploy.DeployApplication \
>     -E$1 -C$1 -Z${NAS_BASE}/NetarchiveSuite.zip \
>     -Sstandalone_derby.security.policy \
>     -Lstandalone_derby.log.prop";
>
> $DEPLOY_CMD $*;
>
> I'm a tad puzzled, help would be welcome.
>
> Cheers,
>
> --
> Nicolas Giraud
>
> ---------------------------------------------------------------------------------------------
> Développeur Archives du Web - Bibliothèque Nationale de France
> Web Archiving Developper - National Library of France
>
> ---------------------------------------------------------------------------------------------
>
>
>
> --
> Nicolas Giraud
>
> ---------------------------------------------------------------------------------------------
> Développeur Archives du Web - Bibliothèque Nationale de France
> Web Archiving Developper - National Library of France
>
> ---------------------------------------------------------------------------------------------
>
> _______________________________________________
> Netarchivesuite-devel mailing list
> Netarchivesuite-devel at ml.sbforge.org
> http://ml.sbforge.org/mailman/listinfo/netarchivesuite-devel
>
>


-- 
Nicolas Giraud
---------------------------------------------------------------------------------------------
Développeur Archives du Web - Bibliothèque Nationale de France
Web Archiving Developper - National Library of France
---------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.sbforge.org/pipermail/netarchivesuite-devel/attachments/20111114/4ff96af7/attachment-0001.html>


More information about the Netarchivesuite-devel mailing list