user220755
user220755

Reputation: 4446

An issue when trying to launch and deploy Jetty

I have an issue whenever I am trying to deploy Jetty on a specific machine (works with others), the machine is a non-English Windows machine.

[2013-02-15 04:14:05.894] [ERROR] Thread-39
System.err
java.lang.IllegalStateException: Cannot create tmp dir in C:\Windows\system32\config\systemprofile\AppData\Local\Temp\ for context o.e.j.w.WebAppContext{/spdy,null},C:\Program Files\server\work\tmp\my-app\webapps\spdy.war

[2013-02-15 04:14:05.894] [ERROR] Thread-39
System.err
java.io.IOException: Žw’肳‚ꂽƒpƒX‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB

I tried to see if this is an issue related to admin rights but it is not, I am launching the process with admin rights.

Any suggestions are really appreciated.

Thanks!

Upvotes: 0

Views: 2432

Answers (2)

Monika X
Monika X

Reputation: 342

This is pretty old post, but recently I had just the same problem, so I want to share my experience too.

Parts of the code causing the problem can be found here: http://download.eclipse.org/jetty/stable-8/xref/org/eclipse/jetty/webapp/WebInfConfiguration.html#225, resolveTempDirectory (WebAppContext context) method (check last lines of the method, third case explained in the comments). So, another workaround for the problem can be also changing default java.io.tmpdir folder to point to an existing one.

I have already checked on some systems and C:\Windows\system32\config\systemprofile\AppData\Local\Temp folder doesn't exist on Windows: 7, 2008, 2012.

Upvotes: 1

user220755
user220755

Reputation: 4446

Was able to find the issue out. Jetty does not create the TEMP folder if it doesn't exist so you have to check yourself and create the temp folder if it is not there.

In this instance, it ended up being that: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\ does not exist although C:\Windows\system32\config\systemprofile\AppData\Local\ does and TEMP=C:\Windows\system32\config\systemprofile\AppData\Local\Temp\

Creating "Temp" directory in C:\Windows\system32\config\systemprofile\AppData\Local\ solved the issue!

Upvotes: 5

Related Questions