diff --git a/source/de/anomic/search/DocumentIndex.java b/source/de/anomic/search/DocumentIndex.java index ea08bf1ba..8f4b1b1ad 100644 --- a/source/de/anomic/search/DocumentIndex.java +++ b/source/de/anomic/search/DocumentIndex.java @@ -60,8 +60,8 @@ public class DocumentIndex extends Segment { static final ThreadGroup workerThreadGroup = new ThreadGroup("workerThreadGroup"); - public DocumentIndex(Log log, final File segmentPath, CallbackListener callback, int cachesize) throws IOException { - super(log, segmentPath, cachesize, targetFileSize * 4 - 1, false, false); + public DocumentIndex(final File segmentPath, CallbackListener callback, int cachesize) throws IOException { + super(new Log("DocumentIndex"), segmentPath, cachesize, targetFileSize * 4 - 1, false, false); int cores = Runtime.getRuntime().availableProcessors() + 1; this.callback = callback; this.queue = new LinkedBlockingQueue(cores * 300); @@ -71,10 +71,6 @@ public class DocumentIndex extends Segment { this.worker[i].start(); } } - - public DocumentIndex(final File segmentPath, CallbackListener callback, int cachesize) throws IOException { - this(new Log("DocumentIndex"), segmentPath, callback, cachesize); - } class Worker extends Thread { public Worker(int count) { diff --git a/source/de/anomic/search/MetadataRepository.java b/source/de/anomic/search/MetadataRepository.java index 5c07c8bdd..25c750bdf 100644 --- a/source/de/anomic/search/MetadataRepository.java +++ b/source/de/anomic/search/MetadataRepository.java @@ -64,13 +64,6 @@ public final class MetadataRepository implements Iterable { private Export exportthread; // will have a export thread assigned if exporter is running private File location; private ArrayList statsDump; - - public MetadataRepository( - final File path, - final boolean useTailCache, - final boolean exceed134217727) { - this(path, "urls", useTailCache, exceed134217727); - } public MetadataRepository( final File path, @@ -126,7 +119,7 @@ public final class MetadataRepository implements Iterable { // generates an plasmaLURLEntry using the url hash // if the url cannot be found, this returns null if (urlHash == null) return null; - assert urlIndexFile != null; + assert urlIndexFile != null : "urlHash = " + urlHash; try { final Row.Entry entry = urlIndexFile.get(urlHash.getBytes()); if (entry == null) return null; diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index f03d1bf51..d0cb0dbd3 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -1367,7 +1367,7 @@ public final class Switchboard extends serverSwitch { entry selentry; while (it.hasNext()) { selentry = it.next(); - assert selentry.handle() != null; + assert selentry.handle() != null : "profile.name = " + selentry.name(); if (selentry.handle() == null) continue; if (selentry.name().equals(CrawlSwitchboard.CRAWL_PROFILE_PROXY)) crawler.profilesActiveCrawls.changeEntry(selentry, CrawlProfile.entry.RECRAWL_IF_OLDER, diff --git a/source/net/yacy/document/parser/images/bmpParser.java b/source/net/yacy/document/parser/images/bmpParser.java index 1b8d38488..ce5752e34 100644 --- a/source/net/yacy/document/parser/images/bmpParser.java +++ b/source/net/yacy/document/parser/images/bmpParser.java @@ -96,8 +96,10 @@ public class bmpParser extends AbstractParser implements Idiom { try { image = ImageIO.read(sourceStream); } catch (final EOFException e) { + Log.logException(e); throw new ParserException(e.getMessage(), location); } catch (final IOException e) { + Log.logException(e); throw new ParserException(e.getMessage(), location); } if (image == null) throw new ParserException("ImageIO returned NULL", location); diff --git a/source/net/yacy/document/parser/images/genericImageParser.java b/source/net/yacy/document/parser/images/genericImageParser.java index 284f8a90a..0a0214967 100644 --- a/source/net/yacy/document/parser/images/genericImageParser.java +++ b/source/net/yacy/document/parser/images/genericImageParser.java @@ -41,6 +41,7 @@ import net.yacy.document.Idiom; import net.yacy.document.ParserException; import net.yacy.document.parser.html.ImageEntry; import net.yacy.kelondro.data.meta.DigestURI; +import net.yacy.kelondro.logging.Log; public class genericImageParser extends AbstractParser implements Idiom { @@ -75,8 +76,10 @@ public class genericImageParser extends AbstractParser implements Idiom { try { image = ImageIO.read(sourceStream); } catch (final EOFException e) { + Log.logException(e); throw new ParserException(e.getMessage(), location); } catch (final IOException e) { + Log.logException(e); throw new ParserException(e.getMessage(), location); } if (image == null) throw new ParserException("ImageIO returned NULL", location); diff --git a/source/net/yacy/document/parser/swfParser.java b/source/net/yacy/document/parser/swfParser.java index ceeb3aa6c..4435794e4 100644 --- a/source/net/yacy/document/parser/swfParser.java +++ b/source/net/yacy/document/parser/swfParser.java @@ -82,15 +82,14 @@ public class swfParser extends AbstractParser implements Idiom { try { contents = swf2html.convertSWFToHTML(source); } catch (NegativeArraySizeException e) { - // seen in log - return null; + Log.logException(e); + throw new ParserException(e.getMessage(), location); } catch (IOException e) { - // seems to happen quite often - return null; + Log.logException(e); + throw new ParserException(e.getMessage(), location); } catch (Exception e) { - // we have seen a lot of OOM errors in the parser... Log.logException(e); - return null; + throw new ParserException(e.getMessage(), location); } String url = null; String urlnr = null; diff --git a/source/net/yacy/kelondro/index/Cache.java b/source/net/yacy/kelondro/index/Cache.java index 713e756d3..5071729f1 100644 --- a/source/net/yacy/kelondro/index/Cache.java +++ b/source/net/yacy/kelondro/index/Cache.java @@ -81,8 +81,9 @@ public final class Cache implements ObjectIndex, Iterable { } private void init() { - this.keyrow = new Row(new Column[]{index.row().column(0)}, index.row().objectOrder); - this.readHitCache = new RowSet(index.row()); + Row row = index.row(); + this.keyrow = new Row(new Column[]{row.column(0)}, row.objectOrder); + this.readHitCache = new RowSet(row); this.readMissCache = new RowSet(this.keyrow); this.readHit = 0; this.readMiss = 0; diff --git a/startYACY.sh b/startYACY.sh index ca846bf24..b336e2925 100755 --- a/startYACY.sh +++ b/startYACY.sh @@ -72,7 +72,7 @@ for option in $options;do -l|--logging) LOGGING=1 # enable asserts - JAVA_ARGS="$JAVA_ARGS -ea -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" + JAVA_ARGS="$JAVA_ARGS -ea" if [ $DEBUG -eq 1 ];then echo "can not combine -l and -d" exit 1; @@ -81,7 +81,7 @@ for option in $options;do -d|--debug) DEBUG=1 # enable asserts - JAVA_ARGS="$JAVA_ARGS -ea" + JAVA_ARGS="$JAVA_ARGS -ea -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" if [ $LOGGING -eq 1 ];then echo "can not combine -l and -d" exit 1; @@ -95,7 +95,7 @@ for option in $options;do ;; esac #case option else #parameter - if [ x$option = "--" ];then #option / parameter seperator + if [ x$option = "--" ];then #option / parameter separator isparameter=1; continue else