fix for problem with initializer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6160 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 6fc18b9d51
commit 160031758d

@ -247,30 +247,13 @@ public final class yacySeedDB implements httpdAlternativeDomainNames {
if(!parentDir.mkdirs()) if(!parentDir.mkdirs())
Log.logWarning("yacySeedDB", "could not create directories for "+ seedDBFile.getParent()); Log.logWarning("yacySeedDB", "could not create directories for "+ seedDBFile.getParent());
} }
Class[] args;
try { try {
args = new Class[]{"".getClass(), Class.forName("java.util.Map")}; return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, null, this);
} catch (final ClassNotFoundException e2){
e2.printStackTrace();
args = null;
}
Method initializeHandlerMethod;
try {
initializeHandlerMethod = this.getClass().getMethod("initializeHandler", args);
} catch (final SecurityException e1) {
e1.printStackTrace();
initializeHandlerMethod = null;
} catch (final NoSuchMethodException e1) {
e1.printStackTrace();
initializeHandlerMethod = null;
}
try {
return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, initializeHandlerMethod, this);
} catch (final Exception e) { } catch (final Exception e) {
// try again // try again
FileUtils.deletedelete(seedDBFile); FileUtils.deletedelete(seedDBFile);
try { try {
return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, initializeHandlerMethod, this); return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, null, this);
} catch (IOException e1) { } catch (IOException e1) {
e1.printStackTrace(); e1.printStackTrace();
System.exit(-1); System.exit(-1);

Loading…
Cancel
Save