This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Exception in thread "main" java.nio.channels.OverlappingFileLockException" Watch "Exception in thread "main" java.nio.channels.OverlappingFileLockException" New topic
Author

Exception in thread "main" java.nio.channels.OverlappingFileLockException

vivek dhiman
Ranch Hand

Joined: Aug 05, 2011
Posts: 111

HI

In Execution of below code, I am getting an error. Any suggestion why?



Exception

Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4164
    
  21

Have you read the API for OverlappingFileLockException? It is pretty clear about when it would be thrown. I don't know what com.fasterxml.uuid.ext.FileBasedTimestampSynchronizer is, but my guess is it opens a FileChannel on one or both of the files you pass in. And then you never send whatever signal is needed to close those channels and then try to make new ones. You should never leave the channels open.


Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in thread "main" java.nio.channels.OverlappingFileLockException
 
Similar Threads
Error running wsdl2java tool
Illegal character in URI
Strange error
File Not Found Error
StackOverflowError