From: fedora-devel-java-list-bounces@redhat.com [mailto:fedora-devel-java-list-bounces@redhat.com]On Behalf Of Daniel B. Thurman Sent: Thursday, December 22, 2005 9:26 AM To: Fedora Java Development List (E-mail) Subject: RE: [fedora-java] Eclipse and Tomcat
From: fedora-devel-java-list-bounces@redhat.com [mailto:fedora-devel-java-list-bounces@redhat.com]On Behalf Of Kenneth Porter Sent: Wednesday, December 21, 2005 7:14 PM To: Fedora Java Development List (E-mail) Subject: RE: [fedora-java] Eclipse and Tomcat
--On Wednesday, December 21, 2005 1:57 PM -0800 "Daniel B. Thurman" dant@cdkkt.com wrote:
I believe whomever created this tomcat version for Fedora has got some explaining to do. This is a horrible piece of junk, horrible waste of my time, and files moved all over the place that is it a major cause of confusion which departs from apache's standard configuration and installation. Heck, I cannot even simply define JAVA_HOME and find the binaries!!! Sheesh!!
Agreed, but this is unlikely to be Fedora-specific. More likely the repackaging is done to make the system comply with LSB/FHS, which Sun ignores. Even Microsoft has packaging guidelines and recommended directories that application developers routinely ignore. (It's easy to do so when everyone runs as administrator.)
First I want to apologize for my uncivilized comments - I was just plain frustrated. So I'd like to move on past this.
Yes, you are probably right - that it is vendors that routinely ignore packaging guidelines and recommended directories and so on and I am sure M$ is attacked for the same reasons. Seems that the problem may be JPackage or Fedora's problem - but for those on the outside - there is a problem and it is a mess and who's really to be blamed? Perhaps nobody is to be blamed but the end-result is there is a problem and it frustrates the heck out of anyone who wants to succeed but cannot get anywhere.
I am not sure where to begin as far as what I have on my system but I will try to explain it best as I can:
- I am using JPackage - this is where I am getting the tomcat
and other java-related packaging. I read many sites and apparently this is where most (but not all) have recommended getting updates from - which I was trying to stay with the "standard". So my Tomcat 5 version comes from JPackage, I believe.
Also, I have downloaded Sun's java kit v1.5 and followed the recommendations somewhere that explains how to get Sun's version properly packaged for installation into Fedora. It was a complicated process and it uses JPacakge's files, mentioned in that link. If anyone wants that link please let me know and I will try to find it.
- Downloaded and manually installed Apache Tomcat v5.5.12 in
/usr/local directory, for the purpose to see if I can get a running version going. The Tomcat 5 version (from JPackage) that I have does not work out of the box - I threw everything I could at it - and got only so far to see that *something* runs but no pages were being served. I noted that there is a problem in the handling of the tomcat-users.xml file and an exception was thrown but apparently this did not cause tomcat to stop running.
I went a little further to see if I can get Fedora's port of Eclipse to work with a 'Dynamic Web' project and coupled with Tomcat, the one I got working from the Apache and not the one with JPackage. The index.jsp page that I have is one that I developed on a Window platform with Eclipse and NetBeans and on a heterogenous environment and it works. So I simply opened up my project obtained over CVS an onto Fedora and the next thing to do was to refactor it, and to at least define the application server (Tomcat v5.5), and try to get it running.
Unfortunately, I cannot get the the application server (tomcat v5.5) to work. I originally tried this with Jpackage's tomcat v5 and the problem was that it would not even accept the 'Tomcat installation Directory' when provided, but it would accept the directory when I supplied the apache's version i.e. /usr/local/tomcat-5.5.12
Even when I am using apache's version I *still* cannot get Eclipse to use tomcat, to run/start it, nor to get my project's pages loaded on Tomcat.
When I looked into the Eclipse plug-ins - this was where I let it all out in my frustration: that the tomcat-5 plugins were symbolically linked into /var/lib/tomcat5 BYPASSING the one I installed in /usr/local directory so therein lies a problem - how do I get to choose my installation over that of another vendor in case the vendor does not get it right? So - that is why I belted it out - what a piece of -- well... that is history now...
It seems that there are just too many problems with this version - and this was stated in several sites talking about it.
Rather than "curse the dark", it's in everyone's best interest that those who identify concrete faults go to bugzilla and "light a candle". Did any of those sites provide bug numbers?
From the messages I read, no bug numbers were provided. Just
some people saying that they gave up trying and suggested that I download the sources and build the things I needed. Other people referred to JPackage but they warned of a packaging problem that involved in a missing jta.jar and this caused me a lot of grief in getting started. There was complaints that JPackage was slow in keeping up. But I went ahead and and got this working and JPackage is part of my Yum list for updates.
If there is any thing else I can do or provide to resolve this issue with Eclipse/Tomcat please let me know!
I am currently looking at my "hate mail" on my uncivilized comment and also follow up requests for information or to perform steps to try and getting this issue resolved.
Thanks for your patience --
Dan
Ok, with some in-depth searching, I finally got eclipse/tomcat to work but with manual tweaking....
Here is what I did so far:
1) The JPackage tomcat5 was left alone, and it was installed (/usr/share/tomcat5 w/ links to other places, one of which is /var/lib/tomcat5).
2) Installed Apache's Tomcat v5.5.12 to /usr/local directory, created the tomcat environment script in /etc/profiles.d/tomcat.sh, tested and ensured that I could run it from script (startup.sh and shutdown.sh) and ensured my browser can see the default pages at port 8080.
3) Started Fedora's Eclipse, CVS'ed my 'Dynamic Web' application, and re-configured for Fedora environment, selected Tomcat v5.5, provided the installation directory (/usr/local/tomcat-5.5.12), continued the dialog and it fails to continue after the selection of the dynamic-web application with the message that the contents of <workspace>/Server/Tomcat v5.5 Server @ localhost-config was either corrupted or empty. The fact here was that Eclipse was not able to create/copy files into this directory - so what I did was to run Eclipse on my Windows Platorm and followed similar steps and I noticed the the files created there and missing (in askerisks) in the Fedora-side workspace structure:
<Eclipse workspace> Servers Tomcat v5.5 Server @ losthost-config catalina.policy * xerver.xml * tomcat-users.xml * web.xml * .project * .runtime *
So - as a manual step, I copied all these files from the windows workspace over to the Fedora workspace, edited server.xml to change the '<Context docBase="...." /> to refelect the workspace application source.
Next, I had to shutdown tomcat (I had it running before) outside of Eclipse (cannot do this within Eclipse), then go to the Servers Tab of Eclipse, and right-click and choose "Start" and lo' tomcat started running!
I then proceeded to open the web-browser, entered: http://localhost:8080/MyWebApp and it ran fine.
As a test, I changed the /var/lib/tomcat5/server/lib directory to a link pointing to: /usr/local/tomcat-5.5.12/server/lib and back while testing (why I did this is because these Eclipse tomcat plug-in has jar file links pointing to it) but it turns out that this had no direct effect for now.
So it appears, that there is a problem with Tomcat version supplied by JPackage and Eclipse was not able to copy the over the needed Tomcat server files over and into the Eclipse Server directory with either tomcat versions. I am not sure what is causing these problems at this time.
Dan
Hi,
On Thu, 2005-12-22 at 12:37 -0800, Daniel B. Thurman wrote:
I went a little further to see if I can get Fedora's port of Eclipse to work with a 'Dynamic Web' project and coupled with
We really need to know what Eclipse plugin it is that is providing this "Dynamic Web Project" functionality. It is not part of the SDK or anything we ship so please tell us where we can get it.
Andrew
P.S. It would be nice if you could configure your mail client to do proper threading.
I believe it's the Eclipse Webtools project (WTP), which is composed of a few subprojects including what it calls Web Standard Tools (WST) and J2EE Standard Tools (JST).
The 1.0 release (well, release candidate-until tomorrow they claim) has a few dependencies on later versions of EMF and I think JEM, but I'm pretty sure I was able to get 0.7.1 working on a stock Fedora Core 4, though with similar complications to what Daniel had (I'm away from my linux box for a couple weeks now, can't check). I think the problems were ownership of tomcat files and the fact that it wouldn't properly identify the tomcat installation directory because files were named different. Anyway, 1.0 will supposedly be out tomorrow (the 23rd of December), so it might be worthwhile working from there to package it up.
See: http://www.eclipse.org/webtools/ Also, my previous reply: https://www.redhat.com/archives/fedora-devel-java-list/2005-December/msg0006...
Hope this helps,
-Adam Batkin
We really need to know what Eclipse plugin it is that is providing this "Dynamic Web Project" functionality. It is not part of the SDK or anything we ship so please tell us where we can get it.
java-devel@lists.fedoraproject.org