• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Apache Tomcat Error: Tomcat 9.0\backup\catalina.policy

 
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey everyone,

While trying to start tomcat from eclipse I'm getting an Error that says..

Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 9.0/backup\catalina.policy: C:\Program Files\Apache Software Foundation\Tomcat 9.0\backup\catalina.policy (The system cannot find the path specified)

I can clearly see that the path itself is malformed and there's is no 'backup' directory. From where did it pulled that incorrect path and how can I correct it?

Note: Tomcat starts and stops fine when I'm trying to run it manually directly from Tomcat installation folder without any error.

Things that I have tried so far:

1. Deleted the server and re-created it in eclipse.
2. Checked, modified, removed and recreated run time for Apache Tomcat.
3. Ensure folder permissions (The folder named 'C:/Program files/Apache Software Foundation') set to 'Full Control' for all users.
4. Re-installed Apache Tomcat from scratch.
5. Moved to a new clean work space and rebuild everything from scratch.

6. and finally when it became maddening enough I deleted existing eclipse package and then downloaded and re-installed the latest eclipse package from eclipse.org

And oh yes.. I did found some solutions as below but have already tried it with no luck.

https://stackoverflow.com/questions/18333739/error-in-publishing-the-configuration-in-eclipse

There's only one thing left to do............... change my workstation.

 
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I generally advise to run Tomcat independently of any IDE - in years of following these forums, I've seen mostly problems when people try to mix them.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are 2 (or more) ways to run Tomcat from Eclipse. Plus a third option where you run Tomcat separately but have Eclipse talk to it.

Fundamentally, they're all the same thing, just differences in the way that Tomcat gets started.

The most common way to run Tomcat is to install the Eclipse J2EE spin and use its server controller. This is actually a very horrible thing to do.

Why? Because the built-in Tomcat plugin (WTP) doesn't run a clean Tomcat. Instead it selectively clones only some of the config files, leaving others behind. This causes 2 problems. First, for just about anyone, getting the run configuration to match what you think the run configuration is is not trivial. Not everything syncs up automatically. The second problem has to to with the incomplete cloning of the Tomcat config. Some of us - like me - require customizations to the files that get left behind.

Which leads to the second way to run Tomcat. Get the mongrel plugin developed by sysdeo and install it. Mongrel will co-exist happily with the built-in Tomcat plugin. In fact, they totally ignore each other, so it's simply a matter of which menu/toolbar options you use to launch Tomcat. Unlike the WTP plugin, Mongrel uses the original installed Tomcat configuration without cloning or modification. Much cleaner.

The third option is to go Tim Moores' route. Launch Tomcat stand-alone with the remote debug options switched on and have Tomcat connect to it. Actually, all 3 options do remote debug connections - it's merely a matter of who starts what and how. Note that also you can do a stand-alone launch of Tomcat on any server, not just the local host. Doing that from within Eclipse is a bit trickier.


Oh. And by the way. Neither mongrel nor stand-alone Tomcat should be copying the catalina policy file, so they shouldn't have your problem.

Most of the time, I use mongrel. It has the advantage that I can stop and restart Tomcat from Eclipse and the catalina.out log gets directed to an Eclipse console window so there's no annoying flipping back and forth in and out of Eclipse to get things going. However, stand-alone Tomcat is the ultimate proof. When the apps go into production, no sane IT shop is going to have a development IDE controlling them. It's going to be Tomcat all the way.

I'm going to try and mirror this thread into the Tomcat forum, since it's Tomcat-specific and probably of general interest to anyone using Tomcat.
 
Arnob Dey
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys,

Thanks for your responses.

Here's the solution I discovered. Do a fresh Tomcat install to a separate directory or folder or simply just copy everything from the tomcat installation directory to a different directory. Now modify the Runtime for Apache Tomcat to point to the new location. I'm not sure about the root cause of this issue but the above approach seems to be a workaround.

Neither Mongrel nor its alternative Eclipse Tomcat Plugin 9.1.0 worked for me especially with new Eclipse versions such as Neon or Oxygen. Find more below:
https://www.selikoff.net/2016/06/24/mongrel-tomcat-launcher-not-working-on-neon/

Thanks for mirroring this thread to Tomcat forum. I was initially looking out for an appropriate forum as well but missed to see it around as I searched for it.    
 
Arnob Dey
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Update: Created a backup directory and wtpwebapps(created) in Tomcat installation directory(existing). That seems to have resolved the issue.
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Arnob Dey wrote:Hey Guys,
Neither Mongrel nor its alternative Eclipse Tomcat Plugin 9.1.0 worked for me especially with new Eclipse versions such as Neon or Oxygen. Find more below:
https://www.selikoff.net/2016/06/24/mongrel-tomcat-launcher-not-working-on-neon/



There's a link to a solution for this mentioned in a very small update at that page. The link is incorrect and should be:

https://www.selikoff.net/2016/08/27/the-successor-to-sysdeo-and-mongrel-for-launching-tomcat-from-eclipse/

Sorry about that. I never moved up from the Mars release of Eclipse. People aren't paying me to work in that area these days.
 
Arnob Dey
Ranch Hand
Posts: 43
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

Thanks for providing the correct link. I'm having some trouble getting it to work with the Latest Eclipse package 'Oxygen'. Will need to take a deeper dive soon.

And you're not alone, people aren't interested in making an investment on folks like me either... But for veterans like you some might pay a fortune.

Since this issue is now resolved so I'm gonna mark this as resolved. Hope this helps some other unfortunate headbanging folks..! he he  
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic