Results 1 to 2 of 2
  1. #1
    jiser911 is offline Member
    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Default Can't get Eclipse to work together with Apache Tomcat

    Hi,

    I'm already for hours busy trying to let Eclipse communicate with Tomcat but it just doesn't work. I've added the server and everything but when i create a new dynamic web project with a html file and click on "Run on server", a lot of red code appears and I get a 404. When I check the webapps folder nothing is there as well. It's driving me crazy. See underneath the red error messages below. Check underneath for the configuration:

    And also, can i just edit a project located in the webapps folder instead of loading it from the workspace environment? So that eclipse automatically loads the projects located in the webapps folder? I was hoping the switch location at the server's properties was able to make that possible.


    Can't get Eclipse to work together with Apache Tomcat-error.jpg


    Sep 05, 2012 8:44:01 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Win dows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Windows\System32\WindowsPowerShell\v 1.0\;C:\Program Files\Java\jdk1.7.0_07\bin;;D:\eclipse;;.
    Sep 05, 2012 8:44:01 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ASDDads' did not find a matching property.
    Sep 05, 2012 8:44:02 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    Sep 05, 2012 8:44:02 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    Sep 05, 2012 8:44:02 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1528 ms
    Sep 05, 2012 8:44:02 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Sep 05, 2012 8:44:02 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
    Sep 05, 2012 8:44:04 PM org.apache.catalina.core.StandardContext resourcesStart
    SEVERE: Error starting static Resources
    java.lang.IllegalArgumentException: Document base C:\Users\Michael\workspace\.metadata\.plugins\org. eclipse.wst.server.core\tmp0\wtpwebapps\ASDDads does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocB ase(FileDirContext.java:140)
    at org.apache.catalina.core.StandardContext.resources Start(StandardContext.java:4906)
    at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5086)
    at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Sep 05, 2012 8:44:04 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error in resourceStart()
    Sep 05, 2012 8:44:04 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error getConfigured
    Sep 05, 2012 8:44:04 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/ASDDads] startup failed due to previous errors
    Sep 05, 2012 8:44:04 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    Sep 05, 2012 8:44:04 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    Sep 05, 2012 8:44:04 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1864 ms
    Sep 05, 2012 8:44:04 PM org.apache.catalina.core.StandardServer await
    SEVERE: StandardServer.await: create[localhost:8005]:
    java.net.BindException: Address already in use: JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketBind(Unkno wn Source)
    at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at org.apache.catalina.core.StandardServer.await(Stan dardServer.java:427)
    at org.apache.catalina.startup.Catalina.await(Catalin a.java:757)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:703)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:451)

    Sep 05, 2012 8:44:04 PM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler ["http-bio-8080"]
    Sep 05, 2012 8:44:05 PM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
    Sep 05, 2012 8:44:06 PM org.apache.catalina.core.StandardService stopInternal
    INFO: Stopping service Catalina
    Sep 05, 2012 8:44:06 PM org.apache.coyote.AbstractProtocol stop
    INFO: Stopping ProtocolHandler ["http-bio-8080"]
    Sep 05, 2012 8:44:07 PM org.apache.coyote.AbstractProtocol stop
    INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
    Sep 05, 2012 8:44:08 PM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler ["http-bio-8080"]
    Sep 05, 2012 8:44:08 PM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
    Attached Thumbnails Attached Thumbnails Can't get Eclipse to work together with Apache Tomcat-error.jpg  

  2. #2
    jiser911 is offline Member
    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Default Re: Can't get Eclipse to work together with Apache Tomcat

    Finally it works! I followed the instructions over here:

    Tutorial: Configuring and Using Apache Tomcat 7 with Eclipse

    And added
    set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07

    in both startup.bat and shutdown.bat located in Apache's bin folder. Finally i'm able to work on my project.

    These crazy things really make me wanna shout: I love PHP!!!

Similar Threads

  1. Replies: 0
    Last Post: 07-06-2012, 01:22 PM
  2. Replies: 3
    Last Post: 01-29-2012, 10:44 AM
  3. How eclipse and Tomcat work together?
    By s3ib in forum Java Servlet
    Replies: 3
    Last Post: 04-27-2011, 03:45 AM
  4. Replies: 1
    Last Post: 02-19-2011, 10:34 PM
  5. apache tomcat 7 and eclipse
    By marie in forum Eclipse
    Replies: 1
    Last Post: 11-04-2010, 05:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •