VirtualBox

Opened 12 years ago

Closed 8 years ago

#11078 closed defect (obsolete)

java write IOException on windows to VBoxSharedFolderFS

Reported by: rc Owned by:
Component: shared folders Version: VirtualBox 4.2.0
Keywords: Cc:
Guest type: Windows Host type: Linux

Description

I was using an existing java application that writes data to a file.

The host is linux and the guest is windows XP.

If the destination file is on the guest's C: partition, the write is sucessful. If the destination file is on the guest's VBoxSharedFolderFS, the write fails.

Caused by: java.io.IOException: The parameter is incorrect

at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:282) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)

There is nothing in Java anywhere that explains, references, or describes the error "The parameter is incorrect".

The file gets created, but it is only the write that fails. Investigation showed that the write was not even attempted to the native OS system call.

I wrote a small groovy program to find the error.


OutputStream output = null

def bbuffer = new byte[ Integer.parseInt(args[0]) * 1024 ]

output = new BufferedOutputStream( new FileOutputStream( args[1] )

output.write( bbuffer )

output.close()


If the bbuffer size is 123K or smaller, the write succeeds. If the bbuffer size is 124K or larger, the write fails.

invoked with "groovy jwrite.groovy 124 sample.txt"

Caught: java.io.IOException: The parameter is incorrect

java.io.IOException: The parameter is incorrect

at java_io_FilterOutputStream$write.call(Unknown Source)

at jwrite.run(jwrite.groovy:8)

Change History (1)

comment:1 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use