• Willkommen im Geoclub - dem größten deutschsprachigen Geocaching-Forum. Registriere dich kostenlos, um alle Inhalte zu sehen und neue Beiträge zu erstellen.

Java-Fehler beim Aktualisieren von Caches

white_rabbit

Geocacher
Hallo.
Ich verwende die SVN-Version von CW. Meine Bash-Datei dazu sieht so aus:
Code:
#! /bin/bash
cd ~/zips/CacheWolf/bleeding_edge_svn
echo "CacheWolf wird aktualisiert!"
svn update
chmod 755 *.sh
./compile.sh
./getRes.sh
./buildexe.sh
echo "Done!"
./runwolf.sh

Das läuft zwar (bis auf 24 Fehler beim Compilieren), aber wenn ich versuche, einzelne Caches zu aktualisieren, erhalte ich folgende Fehlermeldung in der Shell:
Code:
java.lang.NoSuchMethodError: CacheWolf.imp.SpiderGC.spiderSingle(ILCacheWolf/InfoBox;ZZ)I
        at CacheWolf.MainMenu.updateSelectedCaches(MainMenu.java:813)
        at CacheWolf.myTableControl.popupMenuEvent(myTableControl.java:214)
        at ewe.ui.Control.popupMenuEvent(Control.java)
        at ewe.ui.TableControl.popupMenuEvent(TableControl.java)
java.lang.NoSuchMethodError: CacheWolf.imp.SpiderGC.spiderSingle(ILCacheWolf/InfoBox;ZZ)I
        at CacheWolf.MainMenu.updateSelectedCaches(MainMenu.java:813)
        at CacheWolf.myTableControl.popupMenuEvent(myTableControl.java:214)
        at ewe.ui.Control.popupMenuEvent(Control.java)
        at ewe.ui.TableControl.popupMenuEvent(TableControl.java)
        at ewe.ui.Control.onEvent(Control.java)
        at CacheWolf.myTableControl.onEvent(myTableControl.java:301)
        at ewe.ui.MenuState.onEvent(MenuState.java)
        at ewe.ui.Control.sendToListeners(Control.java)
        at ewe.ui.Control.postEvent(Control.java)
        at ewe.ui.Menu.postEvent(Menu.java)
        at ewe.ui.Control.notifyAction(Control.java)
        at ewe.ui.Menu.penReleased(Menu.java)
        at ewe.ui.Control.penClicked(Control.java)
        at ewe.ui.Control.onPenEvent(Control.java)
        at ewe.ui.Menu.onPenEvent(Menu.java)
        at ewe.ui.Control.onEvent(Control.java)
        at ewe.ui.Menu.onEvent(Menu.java)
        at ewe.ui.Control.postEvent(Control.java)
        at ewe.ui.Menu.postEvent(Menu.java)
        at ewe.ui.Window.doPostEvent(Window.java)
        at ewe.ui.Window$windowThread.run(Window.java)
        at ewe.sys.mThread.run(mThread.java)
        at ewe.sys.Coroutine.run(Coroutine.java)
Es erscheint die Anzeige "Laden von GC.... (1/1)" und das wars (Hatte vorher 25 Logs eingestellt). Geht das nur mir so oder ist das ein Bug in den NBs?
Danke.
 

MiK

Geoguru
Welche Fehler bekommst Du denn beim Kompilieren? Wenn Du nur die Java-Version benutzt, kannst Du Dir den Aufruf von buildexe.sh übrigens sparen.
 
OP
W

white_rabbit

Geocacher
Also beim Aufruf von compile erscheint das hier (schon wieder ein Fehler mehr):
Hier übrigens Ubuntu 8.04.3 mit Java version "1.5.0_07"
./compile.sh
./src/CacheWolf/Attribute.java:11: error while writing CacheWolf.Attribute: ./bin/CacheWolf/Attribute.class (No such file or directory)
public class Attribute {
^
./src/CacheWolf/GPXImporter.java:307: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
if (num >= holder.getFreshDetails().ImagesText.getCount())break;
^
./src/CacheWolf/GPXImporter.java:308: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
imgName = (String)holder.getFreshDetails().ImagesText.get(num);
^
./src/CacheWolf/SpiderGC.java:707: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
ch.getFreshDetails().Images.clear();
^
./src/CacheWolf/SpiderGC.java:708: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
ch.getFreshDetails().ImagesText.clear();
^
./src/CacheWolf/SpiderGC.java:709: cannot find symbol
symbol : variable ImagesInfo
location: class CacheWolf.CacheHolderDetail
ch.getFreshDetails().ImagesInfo.clear();
^
./src/CacheWolf/SpiderGC.java:1188: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
chD.Images.add(imgName+imgType);
^
./src/CacheWolf/SpiderGC.java:1193: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
chD.Images.add(oldImgName+imgType); // Store name of old image as image to load
^
./src/CacheWolf/SpiderGC.java:1195: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
chD.ImagesText.add(imgName); // Keep the image name
^
./src/CacheWolf/SpiderGC.java:1196: cannot find symbol
symbol : variable ImagesInfo
location: class CacheWolf.CacheHolderDetail
chD.ImagesInfo.add(null); // Need to stay in synch with ImagesText
^
./src/CacheWolf/SpiderGC.java:1235: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
chD.Images.add(imgName+imgType);
^
./src/CacheWolf/SpiderGC.java:1239: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
chD.Images.add(oldImgName+imgType); // Store name of old image as image to load
^
./src/CacheWolf/SpiderGC.java:1241: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
chD.ImagesText.add(exImgName.findNext()); // Keep the image description
^
./src/CacheWolf/SpiderGC.java:1245: cannot find symbol
symbol : variable ImagesInfo
location: class CacheWolf.CacheHolderDetail
chD.ImagesInfo.add(null);
^
./src/CacheWolf/SpiderGC.java:1247: cannot find symbol
symbol : variable ImagesInfo
location: class CacheWolf.CacheHolderDetail
chD.ImagesInfo.add(imgComment);
^
./src/CacheWolf/SpiderGC.java:1274: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
chD.Images.add(imgName+imgType);
^
./src/CacheWolf/SpiderGC.java:1276: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
chD.ImagesText.add(imgName); // Keep the image name
^
./src/CacheWolf/SpiderGC.java:1277: cannot find symbol
symbol : variable ImagesInfo
location: class CacheWolf.CacheHolderDetail
chD.ImagesInfo.add(null);
^
./src/CacheWolf/OCXMLImporter.java:449: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
holder.getFreshDetails().Images.clear();
^
./src/CacheWolf/OCXMLImporter.java:450: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
holder.getFreshDetails().ImagesText.clear();
^
./src/CacheWolf/OCXMLImporter.java:451: cannot find symbol
symbol : variable ImagesInfo
location: class CacheWolf.CacheHolderDetail
holder.getFreshDetails().ImagesInfo.clear();
^
./src/CacheWolf/OCXMLImporter.java:577: cannot find symbol
symbol : variable ImagesText
location: class CacheWolf.CacheHolderDetail
holder.getFreshDetails().ImagesText.add(picDesc);
^
./src/CacheWolf/OCXMLImporter.java:578: cannot find symbol
symbol : variable ImagesInfo
location: class CacheWolf.CacheHolderDetail
holder.getFreshDetails().ImagesInfo.add(null); // need to stay in sync with ImagesText
^
./src/CacheWolf/OCXMLImporter.java:582: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
holder.getFreshDetails().Images.add(fileName);
^
./src/CacheWolf/OCXMLImporter.java:586: cannot find symbol
symbol : variable Images
location: class CacheWolf.CacheHolderDetail
holder.getFreshDetails().Images.add(fetch(fetchURL, fileName));
^
25 errors
 

MiK

Geoguru
Passiert das auch, wenn Du CW mal komplett neu in einen anderen Ordner auscheckst?
 
OP
W

white_rabbit

Geocacher
Ja, gerade ausprobiert -- auch dann.
Hinzu kommt JETZT (rev 2082) sogar, dass CW überhaupt nicht mehr startet:
Code:
cw-pda.jnf=>CacheWolf.ewe
There was an error getting the file list.
java.lang.RuntimeException: Ewe file generation failed!
        at ewesoft.apps.jewel.EweFileSpecs.create(EweFileSpecs.java:501)
        at ewesoft.apps.jewel.Jewel.main(Jewel.java:193)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at ewe.reflect.Method.invokeInThread(Method.java)
        at ewe.reflect.Method.nativeInvoke(Method.java)
        at ewe.reflect.Method.invoke(Method.java)
        at ewe.ui.mApp$1.run(mApp.java)
        at ewe.sys.Coroutine.run(Coroutine.java)
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb75a8767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb75a88b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb20351bd]
#3 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb2139a8a]
#4 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb211f81c]
#5 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb211fa63]
#6 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x24) [0xb211fc6e]
#7 [0xb2a0db6a]
#8 [0xb2a07a7b]
#9 [0xb2a07a7b]
#10 [0xb2a05157]
#11 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb776300c]
#12 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7870278]
#13 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7762e3f]
#14 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb77c04fd]
#15 /usr/lib/j2re1.5-sun/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb756b2cd]
#16 [0xb2a0d41b]
#17 [0xb2a079a4]
#18 [0xb2a05157]
#19 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb776300c]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb75a8767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb75a881e]
#2 /usr/lib/libX11.so.6 [0xb2034518]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xb202b0a6]
#4 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb211e6df]
#5 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb211e98b]
#6 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb211fbaa]
#7 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x24) [0xb211fc6e]
#8 [0xb2a0db6a]
#9 [0xb2a07a7b]
#10 [0xb2a07a7b]
#11 [0xb2a05157]
#12 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb776300c]
#13 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7870278]
#14 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7762e3f]
#15 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb77c04fd]
#16 /usr/lib/j2re1.5-sun/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb756b2cd]
#17 [0xb2a0d41b]
#18 [0xb2a079a4]
#19 [0xb2a05157]
cw-pc.jnf=>CacheWolf.ewe
There was an error getting the file list.
java.lang.RuntimeException: Ewe file generation failed!
        at ewesoft.apps.jewel.EweFileSpecs.create(EweFileSpecs.java:501)
        at ewesoft.apps.jewel.Jewel.main(Jewel.java:193)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at ewe.reflect.Method.invokeInThread(Method.java)
        at ewe.reflect.Method.nativeInvoke(Method.java)
        at ewe.reflect.Method.invoke(Method.java)
        at ewe.ui.mApp$1.run(mApp.java)
        at ewe.sys.Coroutine.run(Coroutine.java)
Done!
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb758b767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb758b8b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb20181bd]
#3 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb211ca8a]
#4 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb210281c]
#5 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb2102a63]
#6 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x24) [0xb2102c6e]
#7 [0xb29f0b6a]
#8 [0xb29eaa7b]
#9 [0xb29eaa7b]
#10 [0xb29e8157]
#11 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb774600c]
#12 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7853278]
#13 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7745e3f]
#14 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb77a34fd]
#15 /usr/lib/j2re1.5-sun/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb754e2cd]
#16 [0xb29f041b]
#17 [0xb29ea9a4]
#18 [0xb29e8157]
#19 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb774600c]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb758b767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb758b81e]
#2 /usr/lib/libX11.so.6 [0xb2017518]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xb200e0a6]
#4 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb21016df]
#5 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb210198b]
#6 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so [0xb2102baa]
#7 /usr/lib/j2re1.5-sun/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x24) [0xb2102c6e]
#8 [0xb29f0b6a]
#9 [0xb29eaa7b]
#10 [0xb29eaa7b]
#11 [0xb29e8157]
#12 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb774600c]
#13 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7853278]
#14 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so [0xb7745e3f]
#15 /usr/lib/j2re1.5-sun/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb77a34fd]
#16 /usr/lib/j2re1.5-sun/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb754e2cd]
#17 [0xb29f041b]
#18 [0xb29ea9a4]
#19 [0xb29e8157]
java.lang.Exception: Class not found: CacheWolf.CacheWolf
        at ewe.applet.Applet.getMainWindow(Applet.java)
        at ewe.applet.Applet.init(Applet.java)
        at ewe.applet.Applet.main(Applet.java)
        at Ewe.main(Ewe.java)
Ich wundere mich nach wie vor, dass das scheinbar nur bei mir auftaucht???
 

greiol

Geoguru
white_rabbit schrieb:
Ich verwende die SVN-Version von CW. Meine Bash-Datei dazu sieht so aus:
white_rabbit schrieb:
Ich wundere mich nach wie vor, dass das scheinbar nur bei mir auftaucht???
du bist der einzige der die skripte benutzt :)

ich baue komplett mit ant und die NBs entstehen auch nicht mit den genannten scripten. ein paar davon sind überflüssig und manche schlicht fehlerhaft. hat es jemals funktioniert?
 
OP
W

white_rabbit

Geocacher
ich baue komplett mit ant und die NBs entstehen auch nicht mit den genannten scripten. ein paar davon sind überflüssig und manche schlicht fehlerhaft. hat es jemals funktioniert?
Also ok, es steht ja da, dass dieses Vorgehen veraltet ist. --> http://www.cachewolf.de/wiki/pmwiki.php/Main/CWSelbstBauen

Aber blöderweise ist die englische Alternative mit Eclipse realsiert, so dass ich keine funktionierende Alternative per Bash-Script kenne. Wie machst du es denn per ant? Kannst du mir das genauer verraten?
Danke.
 

greiol

Geoguru
man wechselt in das verzeichnis in dem build.xml liegt und tippt (vorsicht überraschung):
ant

nebenbedingung:
- ant muss installiert sein
- der pfad muss so gesetzt sein, dass ein java gefunden wird zu dem es auch ein javac (resp. die zugehörigen libs) gibt.

zusammengefasst sieht das dann bei mir so aus:
Code:
#!/bin/bash

cd ~/workspace/CacheWolf
svn up
ant -Dbuild.cab=true -Dbuild.version=`svnversion | sed -e's/M//g'`
svn revert src/CacheWolf/Version.java
 
OP
W

white_rabbit

Geocacher
Na gut -- ich mache es jetzt doch anders bzw verzichte ich halt auf das Selbst-Kompilieren, wenn es doch eh "jede" Nacht ein neues NB gibt ... also so klappt es jedenfalls wieder:

Code:
#! /bin/bash
cd ~/CacheWolf/bleeding_edge_java

aktuell=$(wget -O - --force-html http://pub.naturalnet.de/~nik/own/CacheWolf-BE/zcurrent.txt)

echo "Aktuelle Version: $aktuell"
echo "Java-Version wird heruntergeladen!"
cd java
wget -N http://www.naturalnik.de/CacheWolf-BE/r$aktuell/Jar/CacheWolf.jar
wget -N http://www.naturalnik.de/CacheWolf-BE/r$aktuell/Jar/java_ewe.dll
wget -N http://www.naturalnik.de/CacheWolf-BE/r$aktuell/datfiles.tgz
tar xvfz datfiles.tgz
cd ..

cd ppc2003
echo "PPC2003-Version wird heruntergeladen!"
wget -N http://www.naturalnik.de/CacheWolf-BE/r$aktuell/PocketPC2003/CacheWolf.exe
wget -N http://www.naturalnik.de/CacheWolf-BE/r$aktuell/CacheWolf.ewe
wget -N http://www.naturalnik.de/CacheWolf-BE/r$aktuell/datfiles.tgz
tar xvfz datfiles.tgz
cd ..

echo "Done!"
cd java
java -jar CacheWolf.jar
 
Oben