I don't know whether there is a JBoss specific work around, however the
EJB spec says :
An enterprise bean must not use the java.io package to attempt to access
files and directories in the file system.
The file system APIs are not well-suited for business components to access
data. Business components should use a resource manager API, such as
JDBC, to store data.
Here's another thread on this issue;