Ubuntu

Eclipse can't find catalina.policy and bootstrap.jar where it expects them

Reported by Azamat S. Kalimoulline on 2008-11-13
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tomcat6 (Debian)
Fix Released
Unknown
tomcat6 (Ubuntu)
Wishlist
Abhinav Upadhyay

Bug Description

Because Eclipse expect that catalina.policy and bootstrap.jar should be in catalina home, but couldn't find them.

Thierry Carrez (ttx) wrote :

Tomcat 6 is set up following the rules described in Tomcat6's RUNNING.txt to separate instances, with:
CATALINA_HOME in /usr/share/tomcat6
CATALINA_BASE in /var/lib/tomcat6 or any of the "tomcat6-instance-create" created directories

bootstrap.jar is in CATALINA_HOME/bin
If you make use of it, catalina.policy should be in CATALINA_BASE/conf. At this point it is not linked in /var/lib/tomcat6 and not installed by default in user instances. We could add it but it would be in CATALINA_BASE, not CATALINA_HOME...
If Eclipse expects to find everything in the same directory, then it is probably not compatible with the CATALINA_HOME/CATALINA_BASE setups described in Tomcat documentation.

Could you please detail your use case ? I suspect you want to use Eclipse to directly configure/use Tomcat 6 for development purposes. In that case you should probably be using user instances rather than the system instance.
See "Using private instances" in http://doc.ubuntu.com/ubuntu/serverguide/C/tomcat.html
You can then create a catalina.policy in yourinstance/conf, link yourinstance/bin/bootstrap.jar to /usr/share/tomcat6/bin/bootstrap.jar, and point Eclipse to yourinstance.

Eclipse shouldn't be using the system instance anyway (system configuration should be done by root, not the user).

Changed in tomcat6:
status: New → Incomplete

Eclipse uses installed tomcat, but create in fact it's own user instance, e.g. it creates separate server.xml, catalina.policy, catalina.properties, context.xml, tomcat-users.xml and web.xml configuration files. So, when configure installed runtime, it can be pointed to system installation (unpacked zip). There are also can be system configuration, but in Eclipse it might be redefined, so it can use another port, another polices and so on.
One condition it requires a "valid" tomcat installation. When creating server runtime in eclipse, it requires bootstrap.jar in bin. When deploying application it requires catalina.policy file which used as initial catalina.policy for user installation.
Now I do as you adviced: create my tomcat user instance, link bootstrap.jar and copy catalina.policy. It works. But I want to do less work and to work my user instance out of the box in Eclipse.

Thierry Carrez (ttx) on 2008-11-17
Changed in tomcat6:
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Niels Thykier (niels-thykier) wrote :

I believe that this bug has also been filed against Debian as 551091 [1]

~Niels

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551091

Thierry Carrez (ttx) on 2009-12-14
Changed in tomcat6 (Ubuntu):
status: Confirmed → Triaged
Changed in tomcat6 (Debian):
status: Unknown → Incomplete

I created a user instance of tomcat6 using tomcat6-instance-create

When I try to configure in Eclipse, it complains that lib/jasper-el.jar not found. I can overcome this by creating a symbolic link to /usr/share/tomcat6/lib in my user instance directory.

Next, when I try to start the server, it will complain about not finding catalina.policy (as reported in the bug) in the conf directory.

I can again overcome this by creating another symbolic link, but indeed this is too much work.

I am working on it. I will modify the tomcat6-instance-create script to create necessary symlinks, so that eclipse can be configured properly for setting up tomcat in its development environment.

Changed in tomcat6 (Ubuntu):
assignee: nobody → Abhinav Upadhyay (er-abhinav-upadhyay)
tags: added: bitesize
Changed in tomcat6 (Ubuntu):
status: Triaged → In Progress

I added a few lines to tomcat6-instance-create, so that it will setup symlinks for the files which Eclipse expects to be present inside the server directories.

It should now be possible to setup tomcat inside Eclipse for development purposes without any additional work.

tags: added: patch

 As Thierry pointed out in his review of the previous patch, that tomcat6-user does not come with catalina.policy file, making it difficult to configure with eclipse for development purposes, and it also rendered my previous patch useless. Therefore I updated the last patch, so that tomcat6-user package now will include a catalina.policy file as well.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tomcat6 - 6.0.28-10ubuntu2

---------------
tomcat6 (6.0.28-10ubuntu2) natty; urgency=low

  * debian/tomcat6-instance-create: Eclipse can now be configured to use a user instance
    of tomcat6 using tomcat6-instance-create without any additional work.
    tomcat6-instance-create will setup all the necessary symlinks to make eclipse work.
    (Closes: #551091) (LP: #297675)
 -- Abhinav Upadhyay <email address hidden> Fri, 11 Mar 2011 13:55:28 +0530

Changed in tomcat6 (Ubuntu):
status: In Progress → Fix Released
Thierry Carrez (ttx) wrote :

Also pushed to debian-java svn (rev13433)

Changed in tomcat6 (Debian):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.