How Play when deployed (JBoss) sends files?

10 views
Skip to first unread message

Monteiro

unread,
Mar 31, 2010, 3:20:16 PM3/31/10
to play-framework
I've a Play application deployed but when I want to send a file it
says file not found exception, and the file is there:

2010-03-31 20:13:09,513 SEVERE [controllers.BackofficeController]
(http-0.0.0.0-8080-6)
java.io.FileNotFoundException: uploads/excel.xls (No such file or
directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at jxl.Workbook.createWorkbook(Workbook.java:301)
at jxl.Workbook.createWorkbook(Workbook.java:286)
at
modules.creators.documentcreator.ExcelWriter.creatingWorkbook(ExcelWriter.java:
63)


Is there any special way that I need to be aware where he searches the
files?

thanks.

Guillaume Bort

unread,
Mar 31, 2010, 3:29:54 PM3/31/10
to play-fr...@googlegroups.com
Probably because the "base.dir" is not the same when you run your
application using 'play run' or running from JBoss. It seems that your
File object contains only a relative path.

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

Nicolas Leroux

unread,
Apr 1, 2010, 12:59:17 AM4/1/10
to play-fr...@googlegroups.com
Hi,

I have fixed a bug yesterday in the servlet wrapper. Maybe this is related.

Nicolas

Monteiro

unread,
Apr 1, 2010, 5:43:17 AM4/1/10
to play-framework
The JBoss "base.dir" when you run applications is the home of the user
who controls the JBoss process, in my case, the JBoss user.

He was writing files to /home/jboss

:)

Reply all
Reply to author
Forward
0 new messages