I can't start Tomcat

Aurora266 -  
topcoder Posted messages 82 Registration date   Status Member Last intervention   -
Hello,

I'm working on J2EE with MyEclipse 6.5, I installed Tomcat 6.0. For the environment, here's what I have: J2SDK + 1.4 JRE6 + JDK 1.6. The problem is that I can't start Tomcat by typing in my browser http://localhost:8080, knowing that this is indeed the port I allocated to Tomcat and that I've already checked its availability. When I start MyEclipse Tomcat, it launches "INFO: Server startup in 169 ms"
What should I do??
Configuration: Windows Vista Internet Explorer 7.0

17 answers

  1. BareK
     
    Hello everyone,

    I am currently doing a Java and JEE development internship as part of my BTS, and just this morning my employer gave me a little briefing on this topic.

    Apparently, when you launch a Tomcat instance under Eclipse, Eclipse creates a directory somewhere in the workspace where it puts the necessary Tomcat directories to run the web app you send it (conf, lib, and bin directories). Everything else is not included, so the interface part with the manager/html that lists the web apps is also not there (under Eclipse). This allows, for example, to run multiple Tomcat instances at the same time.

    So, aurora266, if you want to access your web app under Tomcat, you need to send the correct URL directly (for example http://localhost:8080/MyWebApp/). If you want to access the homepage of your Tomcat server, you need to launch it outside of Eclipse, but be careful, if you have already launched it under Eclipse and they are both using port 8080, you will get an error (which you have already encountered I believe): "an instance of tomcat6 application is already running".

    Personally, I can access the Tomcat homepage by launching it under Eclipse, but to that my employer replied that he was surprised and that it must be due to a special configuration of Tomcat under Eclipse.

    Hoping to have helped you :)
    2
  2. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    I added tomcat6 on eclipse through run/stop .. myeclipse servers then preferences, I provided the path of the JDK, now when I start from myeclipse tomcat starts but there are exceptions:

    ...
    LifecycleException: No user database component found for the key UserDatabase
    ...INFO: Server startup in 78 ms

    and when I try with http://localhost:8080/ the browser goes into an endless search.
    1
  3. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    nothing nada! does no one have an idea??
    I get a 404 error when I try to access Tomcat.
    0
    1. topcoder Posted messages 82 Registration date   Status Member Last intervention   10
       
      Good evening,
      Surely the service hasn't started or there's already an application like Oracle, for example, using port 8080. So you need to check.
      How?!!! :
      => 1. Control Panel\System and Security\Administrative Tools
      => 2. Check if the service is started and if there's another server that is already running. If so, you need to stop it ;)
      0
  4. sandul Posted messages 4013 Status Member 723
     
    Hello,

    We're going to try in graphical mode at first.

    After installing Tomcat, you should normally see an Apache Tomcat menu under Windows; from this menu, choose "Monitor Tomcat" => an icon will appear in the taskbar (Apache Tomcat). If you already have the icon, you will get an error (like the thing is already running) when you go to Start/Apache Tomcat/Monitor Tomcat.

    Now: right-click on the icon in the taskbar / Start service. What does it say?

    ++
    0
  5. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    non ça ne fonctionne pas, j'ai une erreur système d'application : Accès refusé "impossible d'ouvrir le service Tomcat6"
    0
  6. sandul Posted messages 4013 Status Member 723
     
    OK. Uninstall Tomcat & reinstall it this time with a right-click/run as administrator.
    Keep me posted,
    ++
    0
  7. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    yes that's what I'm doing
    0
  8. sandul Posted messages 4013 Status Member 723
     
    OK...

    If it still doesn't work, do this:

    1. Install Tomcat with the run as a service option

    or keep the usual manual startup option but do this:

    2.
    - Start > right-click on Command Prompt / Run as admin
    - Navigate to the tomcat install folder, like
    cd "C:\Program Files\Apache Software Foundation\Tomcat 6.0"
    - Type
    bin\startup.bat

    ++
    0
  9. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    Now I have "an instance of tomcat6 application is already running", so that's the error message you mentioned earlier. With a right click on the icon in the taskbar, "start service" is grayed out since Apache is already running...
    0
  10. sandul Posted messages 4013 Status Member 723
     
    Well, it should be okay now, right? With your Tomcat running, test it...
    0
  11. sandul Posted messages 4013 Status Member 723
     
    Application errors (your application!) that are no longer related to the Tomcat installation...
    0
    1. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
       
      ok, but why doesn't it start at all; excluding myeclipse for now, I still can't start my tomcat
      0
  12. sandul Posted messages 4013 Status Member 723
     
    I don't understand: you said earlier
    ...INFO: Server startup in 78 ms
    ==> Tomcat has indeed started. The issues you're encountering after integrating with MyEclipse may be due to incorrect configuration.

    Check out this tutorial to configure it correctly: https://www.genuitec.com/products/myeclipse/learning-center/

    ++
    0
  13. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    Despite the internal exceptions, I can visualize my project; that is on MyEclipse, I don’t understand why I can't access the Tomcat home page via http://localhost:8080 or 127.0.0.1:8080. Everything is fine and the server is started! What’s wrong?!!!
    0
  14. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    Hello,

    Thank you for your response Barek, I already tried all of that, I clearly specify the name of my webapp in the URL, but the browser goes into an infinite search. Regarding Tomcat, I launch it independently of Eclipse, but I can't access its homepage. I asked my teacher and he told me that it's due to Vista constraints for accessing Tomcat's startup files. He suggested I work with a virtual machine, which I hate. One of my contacts works with Vista and Tomcat without any issues, I will ask him for the details about the versions, etc., to resolve this. What operating system do you have Barek and what version of Tomcat Eclipse are you using??
    0
  15. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    I solved the problem; I had to check "Run as administrator" on the .exe application in the Tomcat folder.
    0
    1. BareK
       
      Hello aurora266,

      Glad you were able to solve your problem.
      To still answer the question you asked me, here is my setup:

      Eclipse v3.4.2
      Tomcat Plugin Eclipse v3.2.1
      Apache Tomcat v6.0.20
      Windows Vista Home Basic Edition

      P.S: For me, it's when I run Tomcat independently of Eclipse that I can't access my webapps, but everything works fine under Eclipse, webapps and manager.
      0
    2. amoura
       
      Hello


      please could you help me I have the same problem as you Tomcat is started but when I type this URL http://localhost:8080/ it doesn't work knowing that I checked run as administrator but nothing changes.
      thank you in advance
      0
      1. BareK > amoura
         
        Hi Amoura,

        Right now, I would have a hard time helping you because it's been about 6 or 7 months since I last worked on it.
        However, if no one can help you, I'll try to dive back into it a bit to assist you.
        One of the first things you could do is to detail your problem a little:

        Are you using Tomcat itself or an instance of it via an IDE (and if so, which one)?
        What version of Tomcat are you using?
        What OS are you using?
        What steps do you take when you want to start/access Tomcat?

        And with all that, I’ll see what I can do :-)
        0
  16. samo73
     
    Hi auroras266, I have exactly the same problem as you, please tell me how you solved it. Thanks in advance.
    0
    1. SBK
       
      Hello
      I think you need to change the Tomcat port number 8080 which is being used by another application. Look for an available port and change 8080 to the new one in Tomcat. You will need to reflect this change in the server.xml file.
      0
  17. aurora266 Posted messages 49 Registration date   Status Member Last intervention   2
     
    no, on the configuration side there’s no problem, everything is fine. yes, Tomcat starts but I can't access it via localhost:8080?? I should be able to do it independently of the Java project.
    -1