ClosedConnectionException - Debugging YaCy

Hier finden YaCy User Hilfe wenn was nicht funktioniert oder anders funktioniert als man dachte. Bei offensichtlichen Fehlern diese bitte gleich in die Bugs (http://bugs.yacy.net) eintragen.
Forumsregeln
In diesem Forum geht es um Benutzungsprobleme und Anfragen für Hilfe. Wird dabei ein Bug identifiziert, wird der thread zur Bearbeitung in die Bug-Sektion verschoben. Wer hier also einen Thread eingestellt hat und ihn vermisst, wird ihn sicherlich in der Bug-Sektion wiederfinden.

ClosedConnectionException - Debugging YaCy

Beitragvon Karsten » Di Okt 05, 2010 12:14 pm

Hey folks.

I am running into trouble by starting debug-mode in eclipse.
I set up my eclipse environment with the ant-file according to the introduction on this wiki-page:
http://www.yacy-websuche.de/wiki/index.php/Dev:EclipseHowTo#YaCy_debuggen_mit_Eclipse

After fixing some problems with my JDK I got the build-file to work quite correctly. Yacy starts, but all breakpoints I set don't work!

So I started the new debug-configuration on eclipse - additionally. It ends up with this error:
Code: Alles auswählen
Failed to connect to remote VM
com.sun.jdi.connect.spi.ClosedConnectionException


I am working with the head-revision of the trunk.
What am I doing wrong? How do I get my breakpoints to work?!

Regs,
Karsten
Karsten
 
Beiträge: 10
Registriert: Fr Okt 01, 2010 11:05 am
Wohnort: Karlsruhe

Re: ClosedConnectionException - Debugging YaCy

Beitragvon Lotus » Di Okt 05, 2010 2:52 pm

Just go to net.yacy.yacy.java and do a right click: Run/Debug as > Java Application... your Profile will be set up automatically. Now you can change the start parameters like memory for ex. in the configuration.
Lotus
 
Beiträge: 1699
Registriert: Mi Jun 27, 2007 3:33 pm
Wohnort: Hamburg

Re: ClosedConnectionException - Debugging YaCy

Beitragvon Karsten » Mi Okt 06, 2010 10:38 am

Lotus, you're right.
I am able to debug (working breakpoints!) the main-class.

Currently, I am focusing on debugging the welcome.html & welcome.java
To prove that no caches are involved here, I copied the welcome-stuff to welcomefoo-stuff.

As you can see on the screenshot above, the html-file is shown quite well (I added all the '!'). But all the wildcards are ignored as well as the breakpoints in the welcomefoo.java file
unresolvedWildcards.png
unresolvedWildcards.png (39.94 KiB) 2178-mal betrachtet


So what are the ways of doing to debug these files with working breakpoints? I am confused about the unresolved wildcards :shock:
Karsten
 
Beiträge: 10
Registriert: Fr Okt 01, 2010 11:05 am
Wohnort: Karlsruhe

Re: ClosedConnectionException - Debugging YaCy

Beitragvon Lotus » Mi Okt 06, 2010 12:51 pm

This usually occurs if the underlying Java-File is not yet compiled. Try using the comile target on the build.xml or project > rebuild in Eclipse.
To test the web pages you should set enableTemplateCache: false in advanced config (YaCy).
Lotus
 
Beiträge: 1699
Registriert: Mi Jun 27, 2007 3:33 pm
Wohnort: Hamburg

Re: ClosedConnectionException - Debugging YaCy

Beitragvon Karsten » Mi Okt 06, 2010 4:31 pm

Your hints don't work :(
I am not able to work with the debug-compilation.

The only breakpoints which work are these set in the init-process. As far as the website is presented no links are working!
So i am not able to set any configurations

I tried to disable the template-cache directly in code, but nothing changed.
I am really out of ideas ...
Karsten
 
Beiträge: 10
Registriert: Fr Okt 01, 2010 11:05 am
Wohnort: Karlsruhe

Re: ClosedConnectionException - Debugging YaCy

Beitragvon Lotus » Mi Okt 06, 2010 6:45 pm

Lotus
 
Beiträge: 1699
Registriert: Mi Jun 27, 2007 3:33 pm
Wohnort: Hamburg

Re: ClosedConnectionException - Debugging YaCy

Beitragvon Karsten » Do Okt 07, 2010 9:21 am

I got it to work!!

You're right.
In the ant-file you have to chose at first the clean option, followed by the compile option.
The debug-target does not work for me in that case.
After cleaning and compiling, you can simply debug via eclipse and all breakpoints work.
Unfortunately, you have to do two steps to debug, but hey - it works :)

Thank you lotus for your support !


Thread can be closed!
Karsten
 
Beiträge: 10
Registriert: Fr Okt 01, 2010 11:05 am
Wohnort: Karlsruhe


Zurück zu Fragen und Antworten

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste

cron