I managed to resolve the problem myself: I removed these annotations for the FileResource:
@FormDataParam("file") InputStream uploadedInputStream,
@FormDataParam("file") FormDataContentDisposition fileDetail)
And this library from the pom.xml file:
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>1.8</version>
</dependency>
And the problem just dissapears... You can upload files without any problem. Hope it helps to anyone having the same stupid problem. If anyone happens to know the reason of this failue, please let me know.