This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195384 - java.io.IOException: Error creating temporary file transfer folder
Summary: java.io.IOException: Error creating temporary file transfer folder
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal with 5 votes (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 199109 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-12 13:20 UTC by vanob
Modified: 2011-07-28 16:14 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (44.25 KB, application/octet-stream)
2011-02-12 17:48 UTC, vanob
Details
glassfish output window content (14.14 KB, application/octet-stream)
2011-02-12 17:50 UTC, vanob
Details
web application project (17.30 KB, application/octet-stream)
2011-02-12 17:51 UTC, vanob
Details
Server log (84.97 KB, text/plain)
2011-04-04 14:37 UTC, cistox
Details
gf output window content as text/plain (14.14 KB, text/plain)
2011-04-05 15:42 UTC, Vince Kraemer
Details
messages.log as text/plain (44.25 KB, text/plain)
2011-04-05 15:46 UTC, Vince Kraemer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vanob 2011-02-12 13:20:15 UTC
[ BUILD # : 201102111519 ]
[ JDK VERSION : 1.6.23 ]

I created Web Application with bundles glassfish and when I ran the application
glassfish output window gave me the following stacktrace

SEVERE: java.io.IOException: Error creating temporary file transfer folder
	at
org.glassfish.admin.payload.PayloadFilesManager.createTempFolder(PayloadFilesMan
ager.java:718)
	at
org.glassfish.admin.payload.PayloadFilesManager.createTempFolder(PayloadFilesMan
ager.java:727)
	at
org.glassfish.admin.payload.PayloadFilesManager.access$100(PayloadFilesManager.j
ava:95)
	at
org.glassfish.admin.payload.PayloadFilesManager$Temp.<init>(PayloadFilesManager.
java:303)
Comment 1 Vince Kraemer 2011-02-12 17:11:55 UTC
Please attach...

1. the full stack trace, and

2. a sample web app project that demonstrates the behavior

If you cannot attach a sample web app project, please provide a more detailed description of the steps you followed to create the web app project that has this issue.
Comment 2 vanob 2011-02-12 17:48:44 UTC
Created attachment 105936 [details]
messages.log
Comment 3 vanob 2011-02-12 17:50:22 UTC
Created attachment 105937 [details]
glassfish output window content
Comment 4 vanob 2011-02-12 17:51:58 UTC
Created attachment 105938 [details]
web application project
Comment 5 cistox 2011-04-04 14:03:27 UTC
I also have the same issue.

-----
GRAVE: java.io.IOException: Errore nella creazione della cartella di trasferimento del file temporaneo
	at org.glassfish.admin.payload.PayloadFilesManager.createTempFolder(PayloadFilesManager.java:718)
	at org.glassfish.admin.payload.PayloadFilesManager.createTempFolder(PayloadFilesManager.java:727)
	at org.glassfish.admin.payload.PayloadFilesManager.access$100(PayloadFilesManager.java:95)
	at org.glassfish.admin.payload.PayloadFilesManager$Temp.<init>(PayloadFilesManager.java:303)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$UploadedFilesManager.extractFiles(CommandRunnerImpl.java:1413)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$UploadedFilesManager.<init>(CommandRunnerImpl.java:1394)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$UploadedFilesManager.<init>(CommandRunnerImpl.java:1372)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:821)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
	at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Errore sconosciuto nella creazione della directory C:\server\glassfish-3.1\glassfish\domains\domain1\applications\xfer-4016076689532982930
	at org.glassfish.admin.payload.PayloadFilesManager.createTempFolder(PayloadFilesManager.java:709)
	... 29 more
Comment 6 cistox 2011-04-04 14:37:52 UTC
Created attachment 107476 [details]
Server log

I am sorry the error log is partly into Italian, anyway the error is the same.

The way /gfdeploy is used is completely wrong.

Clean and Build is not working the right way even on a verified EAR (both portable and Glassfish verified)

This bug is seriously blocking !!!
Comment 7 cistox 2011-04-04 14:44:53 UTC
I change the priority, see my last upload and reasons.

This is making Glassfish unuseful for J2EE applications.

I was working on GF 2.1.1 and all was fine except for an issue with Grizzly, so I had to update to 3.0.1, but it was too buggy.

Now I tried 3.1 and I lost 3 days of work around it.
Comment 8 cistox 2011-04-04 14:58:23 UTC
I reviewed the source code of the PayloadFilesManager.java and I cannot see a good reason for not being able to create the following folder:

C:\server\glassfish-3.1\glassfish\domains\domain1\applications\xfer-6653262836660513107

Netbeans 7 RC1 is running with my Windows user (on XP) which is the Owner of the above parent folders.

I cannot help more sorry.

Cheers,
Roberto
Comment 9 Vince Kraemer 2011-04-05 05:10:13 UTC
Which build of NB are you using?

Which build of GF are you deploying onto?


(In reply to comment #8)
> I reviewed the source code of the PayloadFilesManager.java and I cannot see a
> good reason for not being able to create the following folder:
> 
> C:\server\glassfish-3.1\glassfish\domains\domain1\applications\xfer-6653262836660513107
> 
> Netbeans 7 RC1 is running with my Windows user (on XP) which is the Owner of
> the above parent folders.
> 
> I cannot help more sorry.
> 
> Cheers,
> Roberto
Comment 10 cistox 2011-04-05 08:53:04 UTC
Hello Vince,

>Which build of NB are you using?

7.0 RC1

>Which build of GF are you deploying onto?

3.1


P.S. I cannot use NB 6.9.1 as I experienced even more issues with GF 3.1

Thanks for helping
Comment 11 Vince Kraemer 2011-04-05 15:42:50 UTC
Created attachment 107516 [details]
gf output window content as text/plain

better mime-type for reading from inside the browser
Comment 12 Vince Kraemer 2011-04-05 15:46:03 UTC
Created attachment 107517 [details]
messages.log as text/plain

better mime-type for reading from browser
Comment 13 Vince Kraemer 2011-04-05 15:55:11 UTC
please attach a zip file for the 'web application project' attachment.  My windows box doesn't know how to deal with a dot-rar file.
Comment 14 Vince Kraemer 2011-04-05 16:01:03 UTC
(In reply to comment #8)
> I reviewed the source code of the PayloadFilesManager.java and I cannot see a
> good reason for not being able to create the following folder:
> 
> C:\server\glassfish-3.1\glassfish\domains\domain1\applications\xfer-6653262836660513107
> 
> Netbeans 7 RC1 is running with my Windows user (on XP) which is the Owner of
> the above parent folders.

Just to verify:

You installed NB while logged in as X.  You did not run the installer 'as administrator'.

You installed GF 3.1 while logged in as X. You did not run the installer 'as administrator'.
Comment 15 Marian Mirilovic 2011-04-05 16:24:02 UTC
decreasing the priority to P2 , we do not consider this as a stopper for NB 7.0
Comment 16 cistox 2011-04-05 17:31:39 UTC
My user is either a local Administrator and Domain Administrator but not strictly named "Administrator".

I tried to create the folder mentioned in the error by hands... and it worked using my user.

I'll be traveling for the next 3 days, I'll be not able to answer til 9th Apr.

Cheers
Roberto
Comment 17 Vince Kraemer 2011-04-21 18:24:27 UTC
investigating...

it looks like the GF plugin tickles something subtle in the server... since this exception does not get generated consistently (by a particular command sent to the server), though it does get generated often.

Many of the 'sources' of the exception are http admin commands that do not transfer files to the server... so there may be a server side fix in CommandRunnerImpl.java [Do not try to create a transfer directory unless it is really necessary]
Comment 18 Vince Kraemer 2011-04-21 23:49:44 UTC
PETRJ: Please read through this and resolve as you think appropriate.

PayloadFilesManager.createTempFolder (http://grepcode.com/file/maven.glassfish.org$content$repositories$glassfish-releases@org.glassfish.common$common-util@3.0@org$glassfish$admin$payload$PayloadFilesManager.java) looks very similar to the code here : http://stackoverflow.com/questions/617414/create-a-temporary-directory-in-java

Which is close, but still subject to race conditions... which we seem to be able to trigger from the IDE more frequently than a user can by typing asadmin commands manually.

There isn't a viable IDE side 'fix' for this.  

So, the fix is to get a build of GF that addresses the race condition and use that.

I have got the ball rolling on getting a fix integrated into a future release of GF.
Comment 19 Petr Jiricka 2011-04-22 08:56:38 UTC
> So, the fix is to get a build of GF that addresses the race condition and use that.

Is there a build like that? Where can i get it?

> I have got the ball rolling on getting a fix integrated into a future release of GF.

Yes, please do. Is there a bug report in the GlassFish JIRA that we can point to? Thanks.
Comment 20 Vince Kraemer 2011-04-26 05:05:37 UTC
one of the GF engineers gave me a suggested change to the NB plugin that seems to be effective.  It should show up in the nightly build of NB soon.
Comment 21 Quality Engineering 2011-04-27 04:48:39 UTC
Integrated into 'main-golden', will be available in build *201104270000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/87a0a6871797
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #195384: Error creating a temp directory on the server while performing a command
Comment 22 Vince Kraemer 2011-04-27 05:45:25 UTC
please verify or reopen this issue with additional information if you still see this issue in your environment.
Comment 23 Quality Engineering 2011-04-28 05:06:03 UTC
Integrated into 'main-golden', will be available in build *201104280000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/87a0a6871797
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #195384: Error creating a temp directory on the server while performing a command
Comment 24 zzion 2011-05-24 08:42:46 UTC
The bug is still in the 7.0 final? (NetBeans IDE 7.0 (Build 201104080000)).
Get it on every 2nd or 3rd deployment and no update visible within the IDE.
Comment 25 Vince Kraemer 2011-05-24 14:59:27 UTC
(In reply to comment #24)
> The bug is still in the 7.0 final? (NetBeans IDE 7.0 (Build 201104080000)).
> Get it on every 2nd or 3rd deployment and no update visible within the IDE.

in 7.0 final? Yes.

See comment 23 (http://netbeans.org/bugzilla/show_bug.cgi?id=195384#c23)

The fix should be in 7.0.1...
Comment 26 Vince Kraemer 2011-06-02 20:49:09 UTC
*** Bug 199109 has been marked as a duplicate of this bug. ***
Comment 27 John Jullion-ceccarelli 2011-07-05 20:47:35 UTC
Should this have been fixed in the patch that went out post 7.0? I've updated 7.0 but am still seeing this problem.
Comment 28 Petr Jiricka 2011-07-11 12:59:54 UTC
Possibly, though the number of fixes in the patch was really limited and controlled (only about 20 fixes), so it's hard to tell if this should have been one of them. Anyway, now it's too late for the patch.
Comment 29 nkanayan 2011-07-28 16:14:56 UTC
In my case I had GlassfishLifeCycleListenenr attached to my domain (so there were actually 2 applications running under 1 domain). When I removed the listener, the error disappeared. Dunno what is your case, but this workaround saved me lot of time