Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0
WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #158652] Tue, 31 January 2006 22:59 Go to next message
Eclipse UserFriend
Originally posted by: tpp+eclipsezone.iki.fi

I have no problems creating WTP projects or publishing them onto my Tomcat 5.0 server.

However, when I try and start the Tomcat 5.0 instance, this is what I get:

java.lang.IllegalArgumentException: Document base C:\develop\workspace\.metadata\.plugins\org.eclipse.wst.serv er.core\tmp0\.\wtp-test does not exist or is not a readable directory

The wtp-test web application has properly been published into:

C:\develop\workspace\.metadata\.plugins\org.eclipse.wst.serv er.core\tmp0\webapps\wtp-test

Why is Eclipse omitting the "webapps" directory from the document base? I couldn't find a similar bug described in this forum, on Eclipse Bugzilla or by googling it.

Any ideas for an (easy) workaround?

-TPP
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #158702 is a reply to message #158652] Wed, 01 February 2006 17:58 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
With a fresh install of Eclipse 3.1.2, WTP 1.0 (using individual zips),
and a fresh workspace, I don't see this problem. In the server.xml file
under the Tomcat server's folder in the Servers project, what does the
docBase attribute contain for the Context element for this web project?

Larry

Tero Paananen wrote:
> I have no problems creating WTP projects or publishing them onto my Tomcat 5.0 server.
>
> However, when I try and start the Tomcat 5.0 instance, this is what I get:
>
> java.lang.IllegalArgumentException: Document base C:\develop\workspace\.metadata\.plugins\org.eclipse.wst.serv er.core\tmp0\.\wtp-test does not exist or is not a readable directory
>
> The wtp-test web application has properly been published into:
>
> C:\develop\workspace\.metadata\.plugins\org.eclipse.wst.serv er.core\tmp0\webapps\wtp-test
>
> Why is Eclipse omitting the "webapps" directory from the document base? I couldn't find a similar bug described in this forum, on Eclipse Bugzilla or by googling it.
>
> Any ideas for an (easy) workaround?
>
> -TPP
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #158711 is a reply to message #158702] Wed, 01 February 2006 18:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tpp+eclipsezone.iki.fi

My WTP 1.0 installation is fresh, but Eclipse 3.1.2 was installed over 3.1.1 using the 3.1.x update site. Maybe that's the problem, who knows.

The context is as follows:

<Context docBase="wtp-test" path="/wtp" reloadable="true" source="org.eclipse.jst.j2ee.server:wtp-test"/>

Thanks for the tip. I didn't figure to look into that. I changed docBase to "webapps/wtp-test" and it works like wonders. I wonder why it's not doing that thing right the first time though.

Thanks for your help!

-TPP
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #158719 is a reply to message #158711] Wed, 01 February 2006 20:28 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
The docBase attribute should be relative to the appBase attribute of the
<Host> element in server.xml. This implies that the docBase you give
below is correct for a default server.xml. At the moment, the Tomcat
support assumes appBase is set to "webapps", and has problems if it is
not. You might check what it is set to in your server.xml.

Also, since your project name isn't the same as its context-root, you
may want to keep an eye on:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=125364

I'm still working on the patch I promised in that bug.

Cheers,
Larry


Tero Paananen wrote:
> My WTP 1.0 installation is fresh, but Eclipse 3.1.2 was installed over 3.1.1 using the 3.1.x update site. Maybe that's the problem, who knows.
>
> The context is as follows:
>
> <Context docBase="wtp-test" path="/wtp" reloadable="true" source="org.eclipse.jst.j2ee.server:wtp-test"/>
>
> Thanks for the tip. I didn't figure to look into that. I changed docBase to "webapps/wtp-test" and it works like wonders. I wonder why it's not doing that thing right the first time though.
>
> Thanks for your help!
>
> -TPP
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #158727 is a reply to message #158719] Wed, 01 February 2006 21:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tpp+eclipsezone.iki.fi

appBase is unset in server.xml.

catalina.base passed onto the server from an Eclipse launch configuration created for the Tomcat server is:

C:\develop\workspace\.metadata\.plugins\org.eclipse.wst.serv er.core\tmp0

I suspect this is where it's getting it wrong. I can't change this value. Everytime I do, it's automatically changed back whenever I start the server.

-TPP
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #158735 is a reply to message #158727] Wed, 01 February 2006 21:13 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Change it in the server.xml found in the server's subfolder of the
Servers project found in your workspace. In the J2EE perspective, it's
found in the Other Projects folder of the Project Explorer navigator.
That one is used as the source for the one written down under the
".metadata" directory.

Larry

Tero Paananen wrote:
> appBase is unset in server.xml.
>
> catalina.base passed onto the server from an Eclipse launch configuration created for the Tomcat server is:
>
> C:\develop\workspace\.metadata\.plugins\org.eclipse.wst.serv er.core\tmp0
>
> I suspect this is where it's getting it wrong. I can't change this value. Everytime I do, it's automatically changed back whenever I start the server.
>
> -TPP
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #158742 is a reply to message #158735] Wed, 01 February 2006 21:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tpp+eclipsezone.iki.fi

Thanks. Worked well.

I'll see what happens when I publish another project or create another server (Tomcat 5.5).

-TPP
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #159201 is a reply to message #158742] Mon, 06 February 2006 18:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: info.catmedia.us

So does it only happen with Tomcat 5.0 not other 5.x versions?
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #159215 is a reply to message #159201] Mon, 06 February 2006 19:38 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Any Tomcat version which uses the appBase attribute on the <Host>
element to establish what relative docBase settings are relative to.
This means Tomcat all 4.x and 5.x. Tomcat support currently assumes it
is always set to "webapps".

Cheers,
Larry

Werner Keil wrote:
> So does it only happen with Tomcat 5.0 not other 5.x versions?
Re: WTP 1.0 + Eclipse 3.1.2 - problems running webapps with Tomcat 5.0 [message #159223 is a reply to message #159201] Mon, 06 February 2006 19:38 Go to previous message
Eclipse UserFriend
Originally posted by: tpp+eclipsezone.iki.fi

I didn't try 5.5 yet, other priorities at work right now.

If I had to guess what caused the problem, I'd guess it's our server.xml file. It's a little, um, messy. I should try with a clean server.xml file and see what happens.
Previous Topic:Can't Export WAR File
Next Topic:Problems doing Tutorial "Running Web service scenarios using Ant"
Goto Forum:
  


Current Time: Fri Dec 27 02:27:45 GMT 2024

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

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

Back to the top