[ 
http://issues.apache.org/jira/browse/NUTCH-96?page=comments#action_12331641 ] 

raghavendra prabhu commented on NUTCH-96:
-----------------------------------------

I have already commented on this bug and it is the same error  

Anyway i am attaching the same one

Ya Even I come across the same error 

The problem seems to be in the MapFile Writer where it tries to create a newWeb 
Db and the the directory already exists 

I tried to remove the file but is being used by some other resource .So it is 
not gettign deleted 

MapFile.Writer newDb = (comparator == null) ? new MapFile.Writer(fs, 
newDbFile.getPath(), keyClass, valueClass) : new MapFile.Writer(fs, 
newDbFile.getPath(), comparator, valueClass); 

I tried to delete the newDbFile.getPath() 
File dbfileexists=new File(newDbFile.getPath()); 
                if (dbfileexists.exists()) 
                { 
                System.out.println("already exists"); 
                if(FileUtil.fullyDelete(dbfileexists)) 
                { 
                    System.out.println("deleted successfully"); 
                } 
                else 
                { 
                    System.out.println("not deleted"); 
                } 
                } 

and found that it already exists and is not getting deleted when you get the 
error 

> MapFile.Writer throws directory exists exception if run multiple times in the 
> same JVM or server JVM.
> -----------------------------------------------------------------------------------------------------
>
>          Key: NUTCH-96
>          URL: http://issues.apache.org/jira/browse/NUTCH-96
>      Project: Nutch
>         Type: Bug
>   Components: fetcher
>     Versions: 0.7
>  Environment: Server 2003, 1.4.2, Resin, WebSphere, Tomcat.
>     Reporter: Michael Couck

>
> I added a bug to the 0.6 version, but I found the same behaviour in the 0.7 
> version. Specifically the MapFile.Writer doesn't get closed and deleted by 
> WebDBWriter and throws an exception if the directory already exists. Still 
> reluctant to solve this if the solution is not going to get integrated into 
> the official code of Nutch as a retrofit will be necessary with every version 
> released, however I will fix this and submit the patch for evaluation if this 
> is not evaluated in the next couple of days by the Nutch team.
> Regards
> Michael

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to