Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » "file not found" while publishing on HTTP-Server
"file not found" while publishing on HTTP-Server [message #544881] Mon, 05 July 2010 21:10 Go to next message
Matthias Ge is currently offline Matthias Ge
Messages: 2
Registered: July 2010
Junior Member
Hi there!

I have a problem with publishing with the HTTP-Server Adapter.

Following setup:
One HTTP-Server with runtime publishing directory to /var/www (guess it, i'm on linux)
The worspace resides in /home/macbarfuss/Development/workspace/

I can create a static web project and i did not make any change on config of the project. I can add a HTML-file (which is not html compliant, but that should not matter *g*)
My project name does not include any special characters or spaces.

But when i try to publish the project to the server i get an error:

Error during publish
Error copying file index.html: No such file or directory


workspace log contains following:

!ENTRY org.eclipse.wst.server.http.core 4 0 2010-07-05 23:07:06.987
!MESSAGE Error during publish
!SUBENTRY 1 org.eclipse.wst.server.core 4 0 2010-07-05 23:07:06.987
!MESSAGE Error copying file index.html: No such file or directory


all the error messages does not give me a hint where there is a path wrong or missing. Can anybody here help me, please?

Kind Regards

Matthias G
Re: "file not found" while publishing on HTTP-Server [message #550460 is a reply to message #544881] Fri, 30 July 2010 13:05 Go to previous messageGo to next message
Nicolas Vahlas is currently offline Nicolas Vahlas
Messages: 1
Registered: July 2010
Junior Member
Hi,

I have the same problem as you and after much searching it seems that the problem is related to the fact that your home directory and the /var/www directory are located on different partitions.

The workaround that I found was:
1) Configure the "Publishing Directory" of the HTTP Server to point to a directory on the same partition
2) Configure the Apache HTTP Server to serve from that location

This worked for me, I hope that it will help you somehow.

However, the root of the problem is still there and I haven't found the reason why eclipse manages to write in the publishing directory only if it is located in the same partition.

Nicolas
Re: "file not found" while publishing on HTTP-Server [message #550488 is a reply to message #550460] Fri, 30 July 2010 14:10 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 7/30/2010 9:05 AM, Nicolas Vahlas wrote:
> Hi,
>
> I have the same problem as you and after much searching it seems that
> the problem is related to the fact that your home directory and the
> /var/www directory are located on different partitions.
>
> The workaround that I found was:
> 1) Configure the "Publishing Directory" of the HTTP Server to point to a
> directory on the same partition
> 2) Configure the Apache HTTP Server to serve from that location
>
> This worked for me, I hope that it will help you somehow.
>
> However, the root of the problem is still there and I haven't found the
> reason why eclipse manages to write in the publishing directory only if
> it is located in the same partition.
>
> Nicolas

The file copying support in the server tooling writes to a temp folder
first and then moves the file to the desired destination. If the temp
folder and the destination are on different partitions, the move fails,
i.e. https://bugs.eclipse.org/bugs/show_bug.cgi?id=272525 Prior to WTP
3.1.2, the temp folder would be under the ".metadata" folder of your
Eclipse workspace folder. Here it would be easy for the destination to
be on a separate partition. Starting with WTP 3.1.2 (i.e. the fix for
Bug 272525), WTP tries to create a "temp" folder as a sibling of the
"Publish Directory" to avoid this issue. This is likely to avoid the
move issue, but assumes the user running Eclipse has permission to
create such a directory. I'm not sure of the likely this would cause a
problem.

Cheers,
Larry
Re: "file not found" while publishing on HTTP-Server [message #551226 is a reply to message #544881] Thu, 05 August 2010 16:34 Go to previous messageGo to next message
Matthias Ge is currently offline Matthias Ge
Messages: 2
Registered: July 2010
Junior Member
Great!

That solved it! Many thanks.

As workaround, i added an symbolic link to my /var/www, pointing to ~/Website. So I can publish into my homefolder and apache follows the symlink.

Bye!
Re: "file not found" while publishing on HTTP-Server [message #662883 is a reply to message #544881] Fri, 01 April 2011 11:30 Go to previous messageGo to next message
Marcel Pokrandt is currently offline Marcel Pokrandt
Messages: 5
Registered: November 2010
Junior Member
Thank you guys, this helped me.... I thought the whole time I made mistakes applying user-rights...
I used the same solution by creating a symbolic link on my ubuntu machine and it works now.
Re: "file not found" while publishing on HTTP-Server [message #699326 is a reply to message #662883] Thu, 21 July 2011 11:24 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de Sousa
Messages: 139
Registered: July 2009
Senior Member
Hello everyone,

I'm having this exact problem after installing WTP on a new Ubuntu install. But aven after moving the workspace to the same partition of Tomcat I keep getting this error message and am unable to deploy any web app. Any other problems that could cause this?

Thanks for the help.
Re: "file not found" while publishing on HTTP-Server [message #699911 is a reply to message #699326] Fri, 22 July 2011 14:46 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 7/21/2011 7:24 AM, Lu wrote:
> Hello everyone,
>
> I'm having this exact problem after installing WTP on a new Ubuntu
> install. But aven after moving the workspace to the same partition of
> Tomcat I keep getting this error message and am unable to deploy any web
> app. Any other problems that could cause this?
>
> Thanks for the help.

As of WTP 3.0, this problem was not an issue for Tomcat servers. It
publishes to a "wtpdeploy" folder under "CATALINA_BASE" (which by
default is down under the ".metadata" folder of your workspace) and uses
a "temp" directory that is also under "CATALINA_BASE". So your issue is
likely a different problem which happens to have the same symptom or
there is something strange with your Tomcat server. There isn't enough
detail here to tell which.

Cheers,
Larry
Re: "file not found" while publishing on HTTP-Server [message #703184 is a reply to message #699911] Wed, 27 July 2011 09:13 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de Sousa
Messages: 139
Registered: July 2009
Senior Member
Hi Larry, thank you for your reply.

I can't find any directory with the name you mention, "wtpdeploy". Eclipse is creating deployment directories directly at CATALINA_BASE, such as "CATALINA_BASE/myProject", which is a bit awkward. Strange thing is that these directories are empty, for some reason Eclipse isn't copying the project files there. I experimented increasing permissions on these directories but the result is the same.

Is there any way I can provide more detail on this issue?

Thank you.
Re: "file not found" while publishing on HTTP-Server [message #703340 is a reply to message #703184] Wed, 27 July 2011 12:58 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 7/27/2011 5:13 AM, Lu wrote:
> Hi Larry, thank you for your reply.
>
> I can't find any directory with the name you mention, "wtpdeploy".
> Eclipse is creating deployment directories directly at CATALINA_BASE,
> such as "CATALINA_BASE/myProject", which is a bit awkward. Strange thing
> is that these directories are empty, for some reason Eclipse isn't
> copying the project files there. I experimented increasing permissions
> on these directories but the result is the same.
>
> Is there any way I can provide more detail on this issue?
>
> Thank you.

What you describe implies you have made changes to the default Tomcat
server configuration in Eclipse. It would be helpful to know what
changes you have made. You could also create a second Tomcat server
with just the default configuration, which I would expect to work fine.
Then start applying your configuration changes to determine which one
or combination causes the "file not found" during publishing to appear.

Cheers,
Larry
Re: "file not found" while publishing on HTTP-Server [message #704159 is a reply to message #703340] Thu, 28 July 2011 10:41 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de Sousa
Messages: 139
Registered: July 2009
Senior Member
Thank you Larry, that was the problem. Once I changed the publishing directory to "/usr/local/tomcat/webapps" it all went well.

There was no default web server configured at Eclipse when I installed it, I had to configure one myself following a guide somewhere on the web. I still have to figure how to point it to the 8080 port, but that's just a detail.

Thank you once more.
Re: "file not found" while publishing on HTTP-Server [message #704287 is a reply to message #704159] Thu, 28 July 2011 13:11 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
On 7/28/2011 6:41 AM, Lu wrote:
> Thank you Larry, that was the problem. Once I changed the publishing
> directory to "/usr/local/tomcat/webapps" it all went well.
>
> There was no default web server configured at Eclipse when I installed
> it, I had to configure one myself following a guide somewhere on the
> web. I still have to figure how to point it to the 8080 port, but that's
> just a detail.
>
> Thank you once more.

When you mentioned Tomcat, I assumed you were creating a Tomcat server.
Your solution suggests I'm not correct about this. If I now assume
correctly that this is an HTTP Server, then if you double click on the
server in the Servers view, it will open up the server editor for this
server. In that server editor you will see where to specify the port.

Feel free read the WTP Tomcat FAQ[1] for details about the Tomcat
support. By default, it will create a separate instance of Tomcat which
will not impact your installed Tomcat, provided you alter the Tomcat
server in Eclipse to use different ports (use the server editor).
This would give you a Tomcat that is more easily controlled from within
Eclipse, should you find that useful.

Cheers,
Larry

[1] http://wiki.eclipse.org/WTP_Tomcat_FAQ
Re: "file not found" while publishing on HTTP-Server [message #705056 is a reply to message #704287] Fri, 29 July 2011 11:26 Go to previous message
Luís de Sousa is currently offline Luís de Sousa
Messages: 139
Registered: July 2009
Senior Member
Larry Isaacs wrote on Thu, 28 July 2011 09:11

When you mentioned Tomcat, I assumed you were creating a Tomcat server.
Your solution suggests I'm not correct about this. If I now assume
correctly that this is an HTTP Server, then if you double click on the
server in the Servers view, it will open up the server editor for this
server. In that server editor you will see where to specify the port.


Hi Larry, indeed I had the server not defined as a Tomcat server, and so the "Ports" tab wasn't there. This all had to do with the fact that I defined the server from the Static Web Project creation dialog, which has different options. Since this an unrelated issue, I opened a new thread.

Thank you.
Previous Topic:Identifying when a value has been inserted
Next Topic:Invoke WTP XML Formatter from commandline?
Goto Forum:
  


Current Time: Wed Sep 17 07:33:59 GMT 2014

Powered by FUDForum. Page generated in 0.07065 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software