Tomcat started in Eclipse. But application is not started

This is a strange problem after I migrated from old version of STS to STS4.


Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/9.0.13
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Nov 2 2018 14:27:55 UTC
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 9.0.13.0
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jdk1.8.0_181\jre
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_181-b13
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: D:\Pandian\Documents\workspace_crm\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: H:\Dev\apache-tomcat-9.0.13
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=D:\Pandian\Documents\workspace_crm\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=H:\Dev\apache-tomcat-9.0.13
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=D:\Pandian\Documents\workspace_crm\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=H:\Dev\apache-tomcat-9.0.13\endorsed
Sep 19, 2019 5:20:19 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Sep 19, 2019 5:20:19 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: Loaded APR based Apache Tomcat Native library [1.2.18] using APR version [1.6.5].
Sep 19, 2019 5:20:19 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Sep 19, 2019 5:20:19 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
Sep 19, 2019 5:20:19 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized [OpenSSL 1.1.1 11 Sep 2018]
Sep 19, 2019 5:20:19 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Sep 19, 2019 5:20:21 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 19, 2019 5:20:21 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Sep 19, 2019 5:20:21 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 19, 2019 5:20:21 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2281 ms
Sep 19, 2019 5:20:21 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Sep 19, 2019 5:20:21 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/9.0.13
Sep 19, 2019 5:20:22 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Sep 19, 2019 5:20:22 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Sep 19, 2019 5:20:22 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Sep 19, 2019 5:20:22 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1107 ms

  • Removed the server tomcat and added again
  • Removed few .props files from workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings.
  • changed the server locations in Server overview screen

Nothing helped except Maven Build.. Still Open. I’ll update if I have a solution later.

I captured this Green corridor at Royal Botanical Gardens, Peradeniya

I captured this Green corridor at Royal Botanical Gardens, Peradeniya

Advertisements

Eclipse tomcat does not start – May be locked by another process.

Happy Western New Year 2019!

I had a single spring web project. It became too big over the day. I had to split it up into multiple reusable projects so that I can build APIs. After I split it, Tomcat refused to start with the following error.


Publishing failed with multiple errors
Could not delete D:/Pandian/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/crm-upload/WEB-INF/lib. May be locked by another process.
Could not delete D:/Pandian/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/crm-upload/WEB-INF. May be locked by another process.

I tried to clean work folder, It doesn’t work. I did the following sequence to resolve this.

  1. Remove the tomcat server from eclipse server tab
  2. Restart Eclipse
  3. Add a new tomcat server
  4. Start the project

 

java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log

Lets build a new spring 3 app from maven.

See the maven version is 3.x

set path=c:\mavan\bin
mvn --version

See what are the archetypes are available

E:\workspace>mvn archetype:generate

Now, let’s generate the project

E:\workspace>mvn archetype:generate -DarchetypeGroupId=org.fluttercode.knappsack -DarchetypeArtifactId=spring-mvc-jpa-demo-archetype -DarchetypeVersion=1.1 -DgroupId=com.mycoompany.springapp -DartifactId=my-spring-app -Dversion=1.0-SNAPSHOT -DinteractiveMode=false

Now you can see a new folder my-spring-app is created

E:\workspace>cd my-spring-app

Convert the project as a Eclipse project and take a coffee break

E:\workspace\my-spring-app>mvn eclipse:eclipse

To instruct Eclipse about mvn, do the following. e:\workspace is my Eclipse workspace

E:\workspace\my-spring-app>mvn -Declipse.workspace=e:\workspace eclipse:add-maven-repo

Import my-spring-app to eclipse and publish to Weblogic.

weblogic-spring-eclipse-error

eclipse.buildId=4.3.0.I20130605-2000
java.version=1.7.0_15
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

Error
Sat Nov 29 15:17:14 SGT 2014
weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)

Solve this by replacing the sl4j version to the one compatible with weblogic. For me it is 1.6.1

java.lang.NoSuchMethodError while starting tomcat 7 from Eclipse

My tomcat 7 server is starting and working fine by itself. When I stop it and try to start from Eclipse, it gives a NoSuchMethodError which aborts the server starting.

java.lang.NoSuchMethodError: org.eclipse.wst.server.core.model.ServerBehaviourDelegate.getTempDirectory(Z)Lorg/eclipse/core/runtime/IPath;

somebody is getting same error, but still not resolved. http://www.eclipse.org/forums/index.php?t=msg&goto=557431&S=432a9edd157438a3661ca16edfe4a4ab

I have raised a bug report to eclipse. Lets see.

>>>

I just got an update from Eclipse Bugzilla

Your Build Identifier indicates you are using Eclipse 3.5, which only works
with WTP 3.1.x.  WTP 3.2.x, which includes the new Tomcat 7.0 support, requires
Eclipse 3.6.x.  Running WTP 3.2.x with Eclipse 3.5.x is not supported.  You
will have to install Eclipse 3.6 since upgrading 3.5.x to 3.6 is not supported.
Once you have Eclipse 3.6 with WTP 3.2.x installed (using the Java EE package
is the easiest) you can create a new workspace and import your existing
projects, or you can simply open old workspace.  If you open the old workspace
with Eclipse 3.6 and WTP 3.2.x, using that workspace with Eclipse 3.5 and WTP
3.1.x is not supported.

Since Eclipse 3.5.x and WTP 3.2.x is not a supported combination, I’m marking
this bug as invalid.

Upgrade karega!

Target runtime Apache Tomcat v6.0 is not defined

I was upgrading the tomcat in my eclipse from version 6 to 7. Servers were added, old servers were removed. Tomcat 6 installed. But the server is not starting because of the following error.

Target runtime Apache Tomcat v6.0 is not defined.    <project name>        Unknown    Faceted Project Problem

It keeps my old server entry for the project.

We need to right click on the project, properties and Targeted Runtimes. Uncheck the old entry and enable the new entry. This should solve this error.

Targeted Runtimes

Targeted Runtimes

Still server is facing some other issue. Need to check up.