UnsupportedClassVersionError: net/yacy/yacy

Keine Scheu, hier darf alles gefragt und diskutiert werden. Das ist das Forum für YaCy-Anfänger. Hier kann man 'wo muss man klicken' fragen und sich über Grundlagen zur Suchmaschinentechnik unterhalten.
Forumsregeln
Hier werden Fragen beantwortet und wir versuchen die Probleme von YaCy-Newbies zu klären. Bitte beantwortete Fragen im YaCy-Wiki http://wiki.yacy.de dokumentieren!

UnsupportedClassVersionError: net/yacy/yacy

Beitragvon oneaty » Mi Sep 24, 2014 2:48 pm

Hi,
After months of continuous usage, Yacy didn't restarted at the end of a scheduled weekly backup process.
Today, I tried to start it manually with this command line:

Code: Alles auswählen
./startYACY -t -l


This showed the following issue:

Code: Alles auswählen
gustavo@athlon:/usr/share/yacy$ ./startYACY.sh -t -l
****************** YaCy Web Crawler/Indexer & Search Engine *******************
**** (C) by Michael Peter Christen, usage granted under the GPL Version 2  ****
****   USE AT YOUR OWN RISK! Project home and releases: http://yacy.net/   ****
**  LOG of       YaCy: DATA/LOG/yacy00.log (and yacy<xx>.log)                **
**  STOP         YaCy: execute stopYACY.sh and wait some seconds             **
**  GET HELP for YaCy: see http://wiki.yacy.net and http://forum.yacy.de     **
*******************************************************************************
>> YaCy started as daemon process. Administration at http://localhost:8090 <<
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/yacy/yacy : Unsupported major.minor version 51.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: net.yacy.yacy. Program will exit.
I 2014/09/23 08:26:05 HeapReader close HeapFile api.bheap; trace: net.yacy.kelondro.blob.HeapModifier.close(HeapModifier.java:82) -> net.yacy.kelondro.blob.Heap.close(Heap.java:305) -> net.yacy.kelondro.blob.Heap.close(Heap.java:311) -> net.yacy.kelondro.blob.BEncodedHeap.close(BEncodedHeap.java:533) -> net.yacy.kelondro.blob.Tables.close(Tables.java:274) -> net.yacy.search.Switchboard.close(Switchboard.java:1751) -> net.yacy.yacy.startup(yacy.java:363) -> net.yacy.yacy.main(yacy.java:684)
I 2014/09/23 08:26:05 Heap closing heap /usr/share/yacy/DATA/WORK/searchfl.bheap
I 2014/09/23 08:26:05 HeapReader close HeapFile searchfl.bheap; trace: net.yacy.kelondro.blob.HeapModifier.close(HeapModifier.java:82) -> net.yacy.kelondro.blob.Heap.close(Heap.java:305) -> net.yacy.kelondro.blob.Heap.close(Heap.java:311) -> net.yacy.kelondro.blob.BEncodedHeap.close(BEncodedHeap.java:533) -> net.yacy.kelondro.blob.Tables.close(Tables.java:274) -> net.yacy.search.Switchboard.close(Switchboard.java:1751) -> net.yacy.yacy.startup(yacy.java:363) -> net.yacy.yacy.main(yacy.java:684)
D 2014/09/23 08:26:05 Blacklist Shutting down blacklists ...
D 2014/09/23 08:26:05 Blacklist All blacklists has been shutdown.
S 2014/09/23 08:26:05 SWITCHBOARD SWITCHBOARD SHUTDOWN TERMINATED
I 2014/09/23 08:26:05 ConcurrentLog shutdown of ConcurrentLog.Worker: injection of poison message
S 2014/09/23 08:26:05 SHUTDOWN goodbye. (this is the last line)
I 2014/09/23 08:26:05 ConcurrentLog terminating ConcurrentLog.Worker with 0 cached loglines.
I 2014/09/23 08:26:05 ConcurrentLog shutdown of ConcurrentLog.Worker: terminated
^C


Does anybody know how to fix this?

I'm running Yacy over Ubuntu Server 14.04
oneaty
 
Beiträge: 66
Registriert: Mo Feb 04, 2013 12:47 pm
Wohnort: Rio de Janeiro

Re: UnsupportedClassVersionError: net/yacy/yacy

Beitragvon sixcooler » Mi Sep 24, 2014 4:52 pm

Hello oneaty,

looks like you try to start YaCy with an Java-environment < 1.7.

Check by running 'java -version' from commandline - you need a java-Version >= 1.7

Cu, sixcooler.
sixcooler
 
Beiträge: 494
Registriert: Do Aug 14, 2008 5:22 pm

Re: UnsupportedClassVersionError: net/yacy/yacy

Beitragvon oneaty » Mi Sep 24, 2014 8:18 pm

Thanks for the prompt answer.

Yes, you're right, java -version returns this:

Code: Alles auswählen
java version "1.6.0_32"
OpenJDK Runtime Environment (IcedTea6 1.13.4) (6b32-1.13.4-4ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)


Do you know if I upgrade openjdk from 6 (which seems to be the current version I have) to 7 will be enough to get a newer java version?

Also, I'm not confident as to which openjdk package to install:

sudo apt-get install openjdk-7-jre

or

sudo apt-get install openjdk-7-jdk

I'm a little bit scary of installing either one of those, since they will install 106 (jre) or 121 (jdk) new packages!! Do I need all of this just to be able to run Yacy again, as I was doing until yesterday?
oneaty
 
Beiträge: 66
Registriert: Mo Feb 04, 2013 12:47 pm
Wohnort: Rio de Janeiro

Re: UnsupportedClassVersionError: net/yacy/yacy

Beitragvon oneaty » Mi Sep 24, 2014 8:22 pm

Oops, my fault, please disregard the previous message, I just came from Yacy main page and I see that the needed package is openjdk-7-jre.

Thanks.
oneaty
 
Beiträge: 66
Registriert: Mo Feb 04, 2013 12:47 pm
Wohnort: Rio de Janeiro

Re: UnsupportedClassVersionError: net/yacy/yacy

Beitragvon Orbiter » Mi Sep 24, 2014 9:50 pm

you need only a much smaller jre version: openjdk-7-jre-headless
..because YaCy does not need the X environment. That is probably the explanation why you get a suggestion of more than 100 packages for the jre/jdk you selected. Please try openjdk-7-jre-headless, that is sufficient
Orbiter
 
Beiträge: 5792
Registriert: Di Jun 26, 2007 10:58 pm
Wohnort: Frankfurt am Main

Re: UnsupportedClassVersionError: net/yacy/yacy

Beitragvon oneaty » Do Sep 25, 2014 1:16 am

Orbiter,

Unfortunately, soon after I posted my last message, I installed openjdk-7-jre and the 100+ packages that come within.

Now, after reading your message, I stoped Yacy, removed openjdk-7-jre, but then, it only removed some 20 packages, no more than that, besides installing a default-jre-headless.

I then removed this last one, and installed openjdk-7-headless, as you suggested.

I checked if java version was 1.7 or above, as per sixcooler, and then restarted Yacy, successfully.

I probably ended with some 80 useless packages installed for nothing but it probably won't do any harm beside occupying extra bandwidth during the daily updates/upgrades.

The strange thing is that all of this going on a Ubuntu Server (thus lacking the X environment), the openjdk-7-jre installation should know that the the packages associated with the X environment aren't necessary, isn't it?

Anyway, everything is fine now, and my

Thanks Sixcooler and Orbiter!
oneaty
 
Beiträge: 66
Registriert: Mo Feb 04, 2013 12:47 pm
Wohnort: Rio de Janeiro


Zurück zu Hilfe für Einsteiger und Anwender

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast

cron