Server startup in 1680 ms:why I am getting this error - servlets

Whenever I am going to run my project I am getting this error frequently.please let me know what is the reason behind it.serverstartup in 1680.I googled a lot but not getting any solution of it.I created a new workspace also but getting this same problem.
Dec 22, 2012 11:35:31 AM 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:\Windows\system32;C:\Windows;C:/Program Files/Java
/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib
/i386;c:\program files\dell\dw wlan card;C:\Windows\system32;C:\Windows;C:\Windows
\system32\wbem;C:\Windows\system32\windowspowershell\v1.0\;c:\program files\java
\jdk1.6.0_25\bin;c:\program files\ibm\gsk8\lib;C:\Program Files\Microsoft SQL
Server\100\Tools\Binn\;C: \Program Files\Microsoft SQL Server\100\DTS\Binn
\;B:\eclipse;;.
Dec 22, 2012 11:35:31 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property
'source' to 'org.eclipse.jst.jee.server:RESTfulProject' did not find a matching property.
Dec 22, 2012 11:35:31 AM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 22, 2012 11:35:31 AM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 22, 2012 11:35:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 742 ms
Dec 22, 2012 11:35:31 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 22, 2012 11:35:31 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.8
Dec 22, 2012 11:35:31 AM com.sun.jersey.api.core.ClasspathResourceConfig init
INFO: Scanning for root resource and provider classes in the paths:
B:\XYRAD\XyRadwebservicesMoon\.metadata\.plugins\org.eclipse.wst.server.core
\tmp6\wtpwebapps\RESTfulProject\WEB-INF\lib
B:\XYRAD\XyRadwebservicesMoon\.metadata\.plugins\org.eclipse.wst.server.core
\tmp6\wtpwebapps\RESTfulProject\WEB-INF\classes
Dec 22, 2012 11:35:32 AM com.sun.jersey.api.core.ClasspathResourceConfig init
INFO: Root resource classes found:
class webService.FeedService
Dec 22, 2012 11:35:32 AM com.sun.jersey.api.core.ClasspathResourceConfig init
INFO: Provider classes found:
Dec 22, 2012 11:35:33 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 22, 2012 11:35:33 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 22, 2012 11:35:33 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1680 ms

Related

How to configure embedded tomcat to find #WebServlet in jar

I have a simple hello world application with embedded tomcat v.8.5.28
It works fine when I explicitly add servlet and mapping:
public static void main(String[] args) throws Exception {
Tomcat server = new Tomcat();
server.setPort(8080);
Context context = server.addContext("", Paths.get(".").toAbsolutePath().toString());
Tomcat.addServlet(context, "hello", new HelloServlet());
context.addServletMappingDecoded("/", "hello");
server.start();
server.getServer().await();
}
But if I delete addServlet and addServletMappingDecoded and annotate my servlet with #WebServlet(name = "HelloServlet", urlPatterns = "/hello") it doesn't work. http://localhost:8080/hello/ returns HTTP Status 404 – Not Found
I have this files hierarchy:
And this is file hierarchy in jar:
I have this output when trying to start my app
>java -jar servlet-app-1.0-SNAPSHOT-jar-with-dependencies.jar
Mar 09, 2018 3:57:36 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Mar 09, 2018 3:57:36 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 09, 2018 3:57:36 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Tomcat]
Mar 09, 2018 3:57:36 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.28
Mar 09, 2018 3:57:36 AM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
INFO: No global web.xml found
Mar 09, 2018 3:57:36 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.
Mar 09, 2018 3:57:36 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
What paths should I pass to addWebapp so tomcat can find my web.xml?

issue making Windows slave (Java 7) connect to Linux master (Java 8)

Facing issue making windows slave connect to Linux master. Linux master is on Java 8 and windows slave is on java 7. I tried connecting via launching slave agent on slave machine, it shows connected for a second but next second it says terminated.
On Connecting from console, below are the logs :
C:\Jenkins>java -jar slave.jar -jnlpUrl http://192.168.172.249:8080/jenkins/comp
uter/192.168.172.133ReconTomcatServer/slave-agent.jnlp
Jun 26, 2017 11:41:55 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: 192.168.172.133ReconTomcatServer
Jun 26, 2017 11:41:55 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Jun 26, 2017 11:41:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://192.168.172.249:8080/jenkins/]
Jun 26, 2017 11:41:55 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver
resolve
INFO: Remoting server accepts the following protocols: [JNLP-connect, CLI2-conne
ct, Ping, CLI-connect, JNLP4-connect, JNLP2-connect]
Jun 26, 2017 11:41:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
Agent address: 192.168.172.249
Agent port: 41231
Identity: 0a:71:17:09:ae:dc:64:9a:d4:55:ba:c7:c6:43:4a:2c
Jun 26, 2017 11:41:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Jun 26, 2017 11:41:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to 192.168.172.249:41231
Jun 26, 2017 11:41:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
Jun 26, 2017 11:42:01 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: 0a:71:17:09:ae:dc:64:9a:d4:55:ba:c7:c6:43:4a:2c
Jun 26, 2017 11:42:01 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
Jun 26, 2017 11:42:02 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
Is there any thing I can check.
Followed all steps given in below link:
Showing exception while connecting slave to master using headless jnlp
I believe this was happening due to java version difference.

Exception while starting tomcat 8.0

I am working on a dynamic web project and everything has been working fine until I added the email capability. Since I added spring: 2.5.6 to my dependency list, tomcat won't start. Here's my POM file:
Here's the stack trace:
May 28, 2015 7:44:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testApp' did not find a matching property.
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.0.15
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Nov 2 2014 19:25:20 UTC
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.0.15.0
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Mac OS X
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.10.2
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: x86_64
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_25-b17
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: /Users/Puru/GitRepos/Private/testApp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: /usr/local/apache-tomcat-8.0.15
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/Users/Puru/GitRepos/Private/testApp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/usr/local/apache-tomcat-8.0.15
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=/Users/Puru/GitRepos/Private/testApp/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=/usr/local/apache-tomcat-8.0.15/endorsed
May 28, 2015 7:44:24 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=UTF-8
May 28, 2015 7:44:24 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/Puru/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
May 28, 2015 7:44:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
May 28, 2015 7:44:24 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
May 28, 2015 7:44:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8443"]
May 28, 2015 7:44:24 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
May 28, 2015 7:44:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
May 28, 2015 7:44:24 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
May 28, 2015 7:44:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 922 ms
May 28, 2015 7:44:24 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 28, 2015 7:44:24 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.15
May 28, 2015 7:44:26 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/testApp]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:868)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/testApp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationAwareOrderComparator.sort(Ljava/util/List;)V
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5185)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
May 28, 2015 7:44:26 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:760)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:925)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:868)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
May 28, 2015 7:44:26 PM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:760)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:925)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8443"]
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-nio-8009"]
May 28, 2015 7:44:26 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol destroy
SEVERE: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:795)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:850)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8443"]
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol destroy
SEVERE: Failed to destroy end point associated with ProtocolHandler ["http-nio-8443"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:795)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:850)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
May 28, 2015 7:44:26 PM org.apache.coyote.AbstractProtocol destroy
SEVERE: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:795)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:531)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:850)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
I have looked up other threads which say that there might be a version conflict and the solution would be to remove on or the other. But I don't understand what if I want to use both.
Thanks in advance.
I finally figured out that indeed removing spring 2.5.6 was the solution. The package that I was trying to use from spring2.5.6 was also present in spring.context.support framework.
Removing the spring2.5.6. resolved the conflict and adding spring.context.support resolved build errors.

Error when I try to run Tomcat 7

I have a simple J2ee application with Spring mvc.
So when I try to run the server Tomcat 7.0 I have this error, but the application works.
The error is:
Grave: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Users\michele.castriotta\Dropbox\workspace_j2ee\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\SpringMVC does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4906)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5086)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.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.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)
feb 18, 2015 9:31:36 AM org.apache.catalina.core.StandardContext startInternal
Grave: Error in resourceStart()
feb 18, 2015 9:31:36 AM org.apache.catalina.core.StandardContext startInternal
Grave: Error getConfigured
feb 18, 2015 9:31:36 AM org.apache.catalina.core.StandardContext startInternal
Grave: Context [/SpringMVC] startup failed due to previous errors
feb 18, 2015 9:31:36 AM org.apache.coyote.AbstractProtocol start
Informazioni: Starting ProtocolHandler ["http-bio-8080"]
feb 18, 2015 9:31:36 AM org.apache.coyote.AbstractProtocol start
Informazioni: Starting ProtocolHandler ["ajp-bio-8009"]
feb 18, 2015 9:31:36 AM org.apache.catalina.startup.Catalina start
Informazioni: Server startup in 4181 ms
What file I can posted?? For find this error?

spring-mvc-project hello-world

I use SpringSource Tool Suite sts to start a hello world example about MVC.
File -> New -> Spring Template Project -> then choose Spring MVC Project
I add Project Name: helloworld
and specify the top-level package as com.helloworld.myapp
then finish.
now I try to run the application and choose Run on Server
and it always shows me the everlasting screen that says: The requested resource (/helloworld/) is not available.
server shows the following:
Nov 30, 2011 4:06:53 PM com.springsource.tcserver.security.PropertyDecoder <init> INFO: tc
Runtime property decoder using memory-based key Nov 30, 2011 4:06:53
PM com.springsource.tcserver.security.PropertyDecoder INFO:
tcServer Runtime property decoder has been initialized in 183 ms Nov
30, 2011 4:06:53 PM org.apache.coyote.AbstractProtocol init INFO:
Initializing ProtocolHandler ["http-bio-8080"] Nov 30, 2011 4:06:53 PM
com.springsource.tcserver.serviceability.rmi.JmxSocketListener init
INFO: Started up JMX registry on 127.0.0.1:6969 in 63 ms Nov 30, 2011
4:06:53 PM org.apache.catalina.startup.Catalina load INFO:
Initialization processed in 693 ms Nov 30, 2011 4:06:53 PM
org.apache.catalina.core.StandardService startInternal INFO: Starting
service Catalina Nov 30, 2011 4:06:53 PM
org.apache.catalina.core.StandardEngine startInternal INFO: Starting
Servlet Engine: VMware vFabric tc Runtime
2.6.1.RELEASE/7.0.20.B.RELEASE Nov 30, 2011 4:06:53 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO:
Deploying configuration descriptor insight.xml from
D:\springsource\vfabric-tc-server-developer-2.6.1.RELEASE\spring-insight-instance\conf\Catalina\localhost
Nov 30, 2011 4:06:53 PM
com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader
start INFO: Context [localhost|insight] will not be woven Nov 30, 2011
4:06:54 PM org.apache.catalina.core.ApplicationContext log INFO:
Initializing Spring root WebApplicationContext Nov 30, 2011 4:07:04 PM
org.apache.catalina.core.ApplicationContext log INFO: Initializing
Spring FrameworkServlet 'Spring MVC Dispatcher Servlet' Nov 30, 2011
4:07:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager Nov 30, 2011 4:07:06
PM
com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader
start INFO: Context [localhost|manager] will not be woven Nov 30, 2011
4:07:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT Nov 30, 2011 4:07:06 PM
com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader
start INFO: Context [localhost|ROOT] will not be woven Nov 30, 2011
4:07:06 PM org.apache.coyote.AbstractProtocol start INFO: Starting
ProtocolHandler ["http-bio-8080"] Nov 30, 2011 4:07:06 PM
org.apache.catalina.startup.Catalina start INFO: Server startup in
12820 ms Nov 30, 2011 4:07:56 PM
org.apache.catalina.startup.HostConfig deployDescriptor INFO:
Deploying configuration descriptor EchoSpringMVC.xml from
D:\springsource\vfabric-tc-server-developer-2.6.1.RELEASE\spring-insight-instance\conf\Catalina\localhost
Nov 30, 2011 4:07:56 PM
org.apache.catalina.startup.SetContextPropertiesRule begin WARNING:
[SetContextPropertiesRule]{Context} Setting property 'source' to
'org.eclipse.jst.jee.server:EchoSpringMVC' did not find a matching
property. Nov 30, 2011 4:07:56 PM
com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader
start INFO: Context [localhost|EchoSpringMVC] will not be woven Nov
30, 2011 4:07:56 PM org.apache.catalina.core.StandardContext
listenerStart SEVERE: Exception sending context initialized event to
listener instance of class
org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/apache/log4j/Level at
org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230) at
org.slf4j.LoggerFactory.bind(LoggerFactory.java:121) at
org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248) at
org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at
org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:191)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722) Caused by:
java.lang.ClassNotFoundException: org.apache.log4j.Level at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
... 18 more
Nov 30, 2011 4:07:56 PM org.apache.catalina.core.StandardContext
startInternal SEVERE: Error listenerStart Nov 30, 2011 4:07:56 PM
org.apache.catalina.core.StandardContext startInternal SEVERE: Context
[/EchoSpringMVC] startup failed due to previous errors Nov 30, 2011
4:07:56 PM org.apache.catalina.core.ApplicationContext log INFO:
Closing Spring root WebApplicationContext Nov 30, 2011 4:07:56 PM
org.apache.catalina.core.StandardContext listenerStop SEVERE:
Exception sending context destroyed event to listener instance of
class org.springframework.web.context.ContextLoaderListener
java.lang.ExceptionInInitializerError at
org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:80)
at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4763)
at
org.apache.catalina.core.StandardContext$4.run(StandardContext.java:5473)
at java.lang.Thread.run(Thread.java:722) Caused by:
java.lang.IllegalStateException: org.slf4j.LoggerFactory could not be
successfully initialized. See also
http://www.slf4j.org/codes.html#unsuccessfulInit at
org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:282) at
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248) at
org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at
org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
at
org.springframework.web.context.ContextCleanupListener.(ContextCleanupListener.java:43)
... 4 more
Where do I go wrong?
Please help.
I've solved changing log4j 1.2.15 with 1.2.16 in pom.xml
New dependency look like this
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
</dependency>
That's all
It looks like you are having this exception:
https://issuetracker.springsource.com/browse/STS-2128
Your code will run fine. This is a caching problem with WTP (Web Tools Project). A clean build should remove the error.

Resources