• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Tomcat Error Launching a Webservice

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am trying to launch a webservice in a Windows platform (Windows 7) and I get the following error:
HTTP Status 404 - //SynthKeywordSpotting
The command I launch is the following:
http://localhost:8080//SynthKeywordSpotting

When I restart Tomcat, i get the script below.
Any idea what's wrong?
Thanks
Mino

mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.59
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jan 28 2015 15:51:10 UTC
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.59.0
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 7
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.1
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: c:\Program Files\Java\jre1.8.0_71
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_71-b15
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: c:/apache-tomcat-7.0.59
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: c:/apache-tomcat-7.0.59
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=c:/apache-tomcat-7.0.59/conf/logging.properties
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=c:/apache-tomcat-7.0.59/endorsed
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=c:/apache-tomcat-7.0.59
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=c:/apache-tomcat-7.0.59
mar 22, 2016 11:47:36 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=c:/apache-tomcat-7.0.59/temp
mar 22, 2016 11:47:36 AM 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: c:\Program Files\Java\jre1.8.0_71\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;c:\Users\synthema\bin;.;C:\Program Files (x86)\Git\local\bin;C:\Program Files (x86)\Git\mingw\bin;C:\Program Files (x86)\Git\bin;c:\ProgramData\Oracle\Java\javapath;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\apache-maven-3.2.3\binC;C:\Program Files (x86)\Git\Program Files (x86)\Git\cmd;c:\Program Files (x86)\OpenSSH\bin;c:\Windows\System32;c:\Program Files\Java\jre1.8.0_60\bin;c:\Program Files\apache-maven-3.2.3\bin;c:\Program Files\axis2\bin;c:\Program Files\apache-ant-1.9.4\bin;c:\apache-tomcat-6.0.43\lib;c:\apache-tomcat-7.0.59\bin;c:\Users\siip\apache-maven-3.3.3\bin;.
mar 22, 2016 11:47:37 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
mar 22, 2016 11:47:37 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
mar 22, 2016 11:47:37 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1028 ms
mar 22, 2016 11:47:37 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
mar 22, 2016 11:47:37 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.59
mar 22, 2016 11:47:37 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat-7.0.59\webapps\SynthKeywordsSpotting.war
mar 22, 2016 11:47:37 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
mar 22, 2016 11:47:37 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/SynthKeywordsSpotting] startup failed due to previous errors
mar 22, 2016 11:47:37 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive C:\apache-tomcat-7.0.59\webapps\SynthKeywordsSpotting.war has finished in 749 ms
mar 22, 2016 11:47:37 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat-7.0.59\webapps\SynthKeywordsSpottingNew.war
mar 22, 2016 11:47:38 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
mar 22, 2016 11:47:38 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/SynthKeywordsSpottingNew] startup failed due to previous errors
mar 22, 2016 11:47:38 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive C:\apache-tomcat-7.0.59\webapps\SynthKeywordsSpottingNew.war has finished in 218 ms
mar 22, 2016 11:47:38 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59\webapps\docs
mar 22, 2016 11:47:38 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59\webapps\docs has finished in 125 ms
mar 22, 2016 11:47:38 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59\webapps\examples
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59\webapps\examples has finished in 2,138 ms
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59\webapps\host-manager
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59\webapps\host-manager has finished in 218 ms
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59\webapps\manager
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59\webapps\manager has finished in 94 ms
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59\webapps\ROOT
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59\webapps\ROOT has finished in 62 ms
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59\webapps\tmp
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59\webapps\tmp has finished in 47 ms
mar 22, 2016 11:47:40 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
mar 22, 2016 11:47:40 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
mar 22, 2016 11:47:40 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3846 ms

 
Saloon Keeper
Posts: 6597
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not a script, it's logging output. Note that the context SynthKeywordsSpotting is not started because an error occurs. You should find more detail about that in one of the other log files.
 
Saloon Keeper
Posts: 22503
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the localhost log files. Usually that's where stuff shows up if it isn't in catalina.out.
 
Mino Napoletano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the localhost file I found the following:

mar 22, 2016 11:47:37 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4932)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown 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)

mar 22, 2016 11:47:37 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
mar 22, 2016 11:47:38 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4932)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown 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)

mar 22, 2016 11:47:38 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
mar 22, 2016 11:47:40 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
mar 22, 2016 11:47:40 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
mar 22, 2016 11:47:40 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@5e06209d')
 
Tim Moores
Saloon Keeper
Posts: 6597
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So where is the jar file that contains the ContextLoaderListener class? It seems to be missing, or is corrupted.
 
Mino Napoletano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure about the name of the jar I should look for, can I get the name of the jar by the error in the Tomcat log?
 
Tim Moores
Saloon Keeper
Posts: 6597
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. If Tomcat knew which jar file it was in, it could probably load it, assuming it wasn't corrupted. But since it's missing, it would make more sense to ensure that all required Spring jar files are present (whichever those may be - Spring likely has an example web app that shows you all the necessary files).
 
Tim Holloway
Saloon Keeper
Posts: 22503
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring does indeed have plenty of documentation for stuff like that.

A quick findjar search tells me that probably the jar you need is the spring-web.jar (it depends on which version of Spring). But if you're missing one so basic as that, you're probably also missing some others, so rather than dig them up class by class, I recommend reading the docs for the version of Spring that you are using.
 
Mino Napoletano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should all of these files be included in a directory called WEB-INf/lib? I tried to look for it on my machine but I was not able to find it, so may the problem depend on that directory which is missing?
 
Tim Holloway
Saloon Keeper
Posts: 22503
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you do not know what J2EE web applications are or how they are structured.

No, you don't just dump files in a directory and it magically works, you have to build a WAR and deploy it.
 
Mino Napoletano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, I don't, that's why I was writing in this forum, to get some help, but if you don't want to give it to stupid people like me, don't worry, thanks anyway
 
Tim Holloway
Saloon Keeper
Posts: 22503
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, we specialize in helping "stupid people". But J2EE web applications are fairly complex things - more complex than we can cover in an online help forum. Your best bet is to get a good book on J2EE and read it. Then we'll be in a better position to help you.

From what I can deduce, you're possibly trying to bring up a "ready-made" application and whoever made it didn't do the job right, because there are parts missing from it. That would be challenging enough for anyone.
 
Mino Napoletano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am afraid you got it just right, people who did that left the company and now I am facing what they were supposed to do at the time, I hope it's not, but unfortunately it may be... thanks
 
Tim Holloway
Saloon Keeper
Posts: 22503
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And the boss said: "No problem, All You Have To Do Is..." Right?

 
Mino Napoletano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not talked to him yet, but I know he will say "...and have you not been able to solve it?"
 
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic