-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in thread "main" java.io.IOException: Resetting to invalid mark - on getMemoAsString() #22
Comments
Im working on fix to this in my fork here https://github.com/Xachman/jdbf |
Can you please send me FoxPro file which causes this fail? To: iryndin At gmail dot com. |
Hi files are sent. I wanted to mention my current solution to this in the fork is to open and close the input stream in the MemoReader class in the read function. this seems to have solved the problem for me and the data is accurate, as far as I can tell, with the foxpro application I have running. Im building an importer to couchdb with this right now For now the only way I was able to make this possible is to limit the arguments you can pass in to file objects. |
No but I did fork the project you can try that fork out and see if my fix works for you.
…________________________________
From: Cristina Sarasua <[email protected]>
Sent: Friday, November 17, 2017 6:42 AM
To: iryndin/jdbf
Cc: Xachman; Author
Subject: Re: [iryndin/jdbf] Exception in thread "main" java.io.IOException: Resetting to invalid mark - on getMemoAsString() (#22)
hello, I also get this error. Is this issue solved?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#22 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHV1blf6TaWmrm-mF6yv9vnOH_7J_TQKks5s3XEQgaJpZM4HXPlu>.
|
I dont know for sure what version of FoxPro my client is running but its old and the type meta data gives me a value of FoxPro2x.
I got this error when using getMemoAsString(); it would show the first entry then fail on the second entry. After some debugging and googling I realized that BufferedInputStream would throw this error if the skip() value was greater then the buffer size. BUFFER_SIZE in the MemoReader is set at 8192 and memoHeader.getBlockSize()*offsetInBlocks was giving me huge numbers like 18510208. Now I didnt do well in school but 18510208 is greater then 8192. So, I set the BUFFER_SIZE to 185102080 and it went threw with no errors.
Now This is probably not the best solution to the problem but I wanted to mention it. Maybe there should be a set method for the buffer size.
The text was updated successfully, but these errors were encountered: