• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Not able to start Java servlet via Tomcat

 
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I dont know whether it's a problem with tomcat or with the Java-Servlet.
Anyway, if i try to start my deployed servlet via tomcat, i get the following error-message:  

"FAIL - Application at context path [/Kap01] could not be started"

I guessed it's because of my web.xml-file, but this file seems ok.



And my java-code seems ok too.




And i think my tocats parameter-file seems ok too.



I hope you can help me !
My OS is Linux-Kubuntu

greetz
 
Marshal
Posts: 67420
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any further info available in the logs (usually catalina.out)?
 
Ralf Coby
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, there are many statements in the catalina.out-file

I think it's because of my war-file.
But thats impossible...

Thank you for help


 
Saloon Keeper
Posts: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the error:


web.xml; lineNumber: 2; columnNumber: 7; Verarbeitungsanweisungsziel, das "[xX][mM][lL]" entspricht, ist nicht zulässig


If your representation of web.xml is accurate, then the probable fault is that you have a space in column 1 of the <?xml PI directive and you have a blank first line in the file.

In XML, the "<? xml" PI directive must be on the FIRST line of the file and it must begin in column 1. No spaces are permitted before it.
 
Ralf Coby
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:This is the error:


web.xml; lineNumber: 2; columnNumber: 7; Verarbeitungsanweisungsziel, das "[xX][mM][lL]" entspricht, ist nicht zulässig


If your representation of web.xml is accurate, then the probable fault is that you have a space in column 1 of the <?xml PI directive and you have a blank first line in the file.

In XML, the "<? xml" PI directive must be on the FIRST line of the file and it must begin in column 1. No spaces are permitted before it.




Yeah, I noticed the whitespace and i deleted it.
The error-message is now something different to the first but the error-log says actually that the xml-file is not correct.
i tried some xml-sample head-files, which i have found via google, but the error-messages didnt go away.

It is very curious.
If i try to change the head-file at "encoding" to UTF-8, then the error-log says to me, thats not correct.

I think i will give Windows a try for Servlets-Programming if the problem won't go away.
 
Ralf Coby
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By The Way, there is the new error-log.

And I am not able to adjust the "encoding".
Every encoding is wrong.

[code=java] 04-Jan-2018 22:14:00.112 INFORMATION [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.reload Reloading context [/Kap01]
04-Jan-2018 22:14:00.125 SCHWERWIEGEND [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml Parse error in application web.xml file at [file:/var/lib/tomcat8/webapps/Kap01/WEB-INF/web.xml]
java.io.UnsupportedEncodingException: ISO-8851-1
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:71)
at java.io.InputStreamReader.<init>(InputStreamReader.java:100)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.createReader(XMLEntityScanner.java:2054)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.setEncoding(XMLEntityScanner.java:467)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanXMLDeclOrTextDecl(XMLDocumentFragmentScannerImpl.java:979)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$XMLDeclDriver.next(XMLDocumentScannerImpl.java:770)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:443)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1504)
at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(WebXmlParser.java:119)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1114)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1423)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1387)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1623)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1164)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1388)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1392)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)

04-Jan-2018 22:14:00.130 SCHWERWIEGEND [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.ContextConfig.configureStart Marking this application unavailable due to previous error(s)
04-Jan-2018 22:14:00.130 SCHWERWIEGEND [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.startInternal One or more components marked the context as not correctly configured
04-Jan-2018 22:14:00.131 SCHWERWIEGEND [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.startInternal Context [/Kap01] startup failed due to previous errors
04-Jan-2018 22:14:03.415 INFORMATION [Thread-4] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
04-Jan-2018 22:14:03.473 INFORMATION [Thread-4] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
04-Jan-2018 22:14:03.531 INFORMATION [Thread-4] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
04-Jan-2018 22:14:03.537 INFORMATION [Thread-4] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
04-Jan-2018 22:14:04.236 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.240 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.240 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.240 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.244 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.244 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.245 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.245 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.247 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.247 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.248 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:04.248 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
04-Jan-2018 22:14:05.048 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.21 (Ubuntu)
04-Jan-2018 22:14:05.055 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Oct 13 2017 11:06:51 UTC
04-Jan-2018 22:14:05.055 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.21.0
04-Jan-2018 22:14:05.055 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
04-Jan-2018 22:14:05.055 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.13.0-21-generic
04-Jan-2018 22:14:05.056 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
04-Jan-2018 22:14:05.056 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
04-Jan-2018 22:14:05.056 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_151-8u151-b12-0ubuntu0.17.10.2-b12
04-Jan-2018 22:14:05.056 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
04-Jan-2018 22:14:05.056 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /var/lib/tomcat8
04-Jan-2018 22:14:05.057 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/share/tomcat8
04-Jan-2018 22:14:05.057 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
04-Jan-2018 22:14:05.058 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
04-Jan-2018 22:14:05.058 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
04-Jan-2018 22:14:05.058 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
04-Jan-2018 22:14:05.058 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512m
04-Jan-2018 22:14:05.059 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=256m
04-Jan-2018 22:14:05.059 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseConcMarkSweepGC
04-Jan-2018 22:14:05.059 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xdebug
04-Jan-2018 22:14:05.059 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
04-Jan-2018 22:14:05.059 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
04-Jan-2018 22:14:05.060 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
04-Jan-2018 22:14:05.060 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/var/lib/tomcat8
04-Jan-2018 22:14:05.060 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat8
04-Jan-2018 22:14:05.060 INFORMATION [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp
04-Jan-2018 22:14:05.060 INFORMATION [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
04-Jan-2018 22:14:05.224 INFORMATION [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
04-Jan-2018 22:14:05.272 INFORMATION [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
04-Jan-2018 22:14:05.281 INFORMATION [main] org.apache.catalina.startup.Catalina.load Initialization processed in 976 ms
04-Jan-2018 22:14:05.357 INFORMATION [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
04-Jan-2018 22:14:05.357 INFORMATION [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.21 (Ubuntu)
04-Jan-2018 22:14:05.386 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor [/etc/tomcat8/Catalina/localhost/examples.xml]
04-Jan-2018 22:14:07.093 INFORMATION [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.
04-Jan-2018 22:14:07.282 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor [/etc/tomcat8/Catalina/localhost/examples.xml] has finished in [1,895] ms
04-Jan-2018 22:14:07.282 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor [/etc/tomcat8/Catalina/localhost/host-manager.xml]
04-Jan-2018 22:14:07.943 INFORMATION [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.
04-Jan-2018 22:14:07.952 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor [/etc/tomcat8/Catalina/localhost/host-manager.xml] has finished in [669] ms
04-Jan-2018 22:14:07.952 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor [/etc/tomcat8/Catalina/localhost/manager.xml]
04-Jan-2018 22:14:08.638 INFORMATION [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.
04-Jan-2018 22:14:08.782 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor [/etc/tomcat8/Catalina/localhost/manager.xml] has finished in [830] ms
04-Jan-2018 22:14:08.782 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor [/etc/tomcat8/Catalina/localhost/docs.xml]
04-Jan-2018 22:14:09.390 INFORMATION [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.
04-Jan-2018 22:14:09.395 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor [/etc/tomcat8/Catalina/localhost/docs.xml] has finished in [613] ms
04-Jan-2018 22:14:09.402 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat8/webapps/ROOT]
04-Jan-2018 22:14:09.923 INFORMATION [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.
04-Jan-2018 22:14:09.933 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat8/webapps/ROOT] has finished in [531] ms
04-Jan-2018 22:14:09.934 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat8/webapps/Kap01]
04-Jan-2018 22:14:09.945 SCHWERWIEGEND [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml Parse error in application web.xml file at [file:/var/lib/tomcat8/webapps/Kap01/WEB-INF/web.xml]
java.io.UnsupportedEncodingException: ISO-8851-1
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:71)
at java.io.InputStreamReader.<init>(InputStreamReader.java:100)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.createReader(XMLEntityScanner.java:2054)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.setEncoding(XMLEntityScanner.java:467)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanXMLDeclOrTextDecl(XMLDocumentFragmentScannerImpl.java:979)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$XMLDeclDriver.next(XMLDocumentScannerImpl.java:770)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:443)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1504)
at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(WebXmlParser.java:119)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1114)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1144)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1878)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

04-Jan-2018 22:14:09.957 SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.configureStart Marking this application unavailable due to previous error(s)
04-Jan-2018 22:14:09.959 SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more components marked the context as not correctly configured
04-Jan-2018 22:14:09.961 SCHWERWIEGEND [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/Kap01] startup failed due to previous errors
04-Jan-2018 22:14:09.970 INFORMATION [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat8/webapps/Kap01] has finished in [35] ms
04-Jan-2018 22:14:09.981 INFORMATION [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
04-Jan-2018 22:14:10.005 INFORMATION [main] org.apache.catalina.startup.Catalina.start Server startup in 4723 ms
04-Jan-2018 22:14:15.487 SCHWERWIEGEND [http-nio-8080-exec-1] org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml Parse error in application web.xml file at [file:/var/lib/tomcat8/webapps/Kap01/WEB-INF/web.xml]
java.io.UnsupportedEncodingException: ISO-8851-1
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:71)
at java.io.InputStreamReader.<init>(InputStreamReader.java:100)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.createReader(XMLEntityScanner.java:2054)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.setEncoding(XMLEntityScanner.java:467)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanXMLDeclOrTextDecl(XMLDocumentFragmentScannerImpl.java:979)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$XMLDeclDriver.next(XMLDocumentScannerImpl.java:770)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:443)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1504)
at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(WebXmlParser.java:119)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1114)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1309)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:665)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

04-Jan-2018 22:14:15.496 SCHWERWIEGEND [http-nio-8080-exec-1] org.apache.catalina.startup.ContextConfig.configureStart Marking this application unavailable due to previous error(s)
04-Jan-2018 22:14:15.507 SCHWERWIEGEND [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.startInternal One or more components marked the context as not correctly configured
04-Jan-2018 22:14:15.509 SCHWERWIEGEND [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.startInternal Context [/Kap01] startup failed due to previous errors
04-Jan-2018 22:14:18.308 SCHWERWIEGEND [http-nio-8080-exec-8] org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml Parse error in application web.xml file at [file:/var/lib/tomcat8/webapps/Kap01/WEB-INF/web.xml]
java.io.UnsupportedEncodingException: ISO-8851-1
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:71)
at java.io.InputStreamReader.<init>(InputStreamReader.java:100)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.createReader(XMLEntityScanner.java:2054)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.setEncoding(XMLEntityScanner.java:467)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanXMLDeclOrTextDecl(XMLDocumentFragmentScannerImpl.java:979)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$XMLDeclDriver.next(XMLDocumentScannerImpl.java:770)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:443)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1504)
at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(WebXmlParser.java:119)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1114)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1309)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:665)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

04-Jan-2018 22:14:18.317 SCHWERWIEGEND [http-nio-8080-exec-8] org.apache.catalina.startup.ContextConfig.configureStart Marking this application unavailable due to previous error(s)
04-Jan-2018 22:14:18.319 SCHWERWIEGEND [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.startInternal One or more components marked the context as not correctly configured
04-Jan-2018 22:14:18.322 SCHWERWIEGEND [http-nio-8080-exec-8] org.apache.catalina.core.StandardContext.startInternal Context [/Kap01] startup failed due to previous errors
 [code]
 
Tim Holloway
Saloon Keeper
Posts: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a working web.xml prolog:



I think an encoding of UTF-8 is supposed to work, but I don't use it. The encoding defined in an "?xml" Processing Instruction indicates what character set is allowed within that XML file and is not related to what possible encodings the application (and its web pages) may be using.
 
Ralf Coby
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
and thank you for your help.
I tested this xml-version and the error-log didnt say anything about the encouding.

It's very curious. I dont have the folders listed below ...

For example: 04-Jan-2018 22:47:23.771 WARNUNG [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common/classes], exists: [false]

I only have the following folders in /var/lib/tomcat8 : conf, lib, logs, policy, webapps, work

What do you think?


 
Tim Holloway
Saloon Keeper
Posts: 22273
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name [Kapitel 1 Servlet]



Your web.xml servlet mapping maps URL path /Serv1 to logical name "Kapitel 1 Servlet". There should be a corresponding element like this one:


You associated a servlet name of "Kapitel 1" where you should have given the name "Kapitel 1 Servlet".

Also, your servlet is in the default package and that's not recommended. You should assign an explicit package name (even if it's just something like "my.project.kapital1") to the Servlet class (and place it in a correspondingly-named source directory). The usual convention for package naming is to use the organization, company or school name as high-level qualification - like "com.coderanch", "org.apache", "edu.de.technischehochschule". And use the fully-qualified classname in your servlet-class element ("my.project.kapital1.Kap01Servlet").

What really confuses me is all the references to /var/lib/tomcat8/common and /var/lib/tomcat8/shared directories. Such things existed in Tomcat version 4, but not in Tomcat version 5 or any later version of Tomcat. It looks like you've got some sort of contamination in either your copy of Tomcat or in your webapp.
 
Ralf Coby
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi and thank you very much for your help.

I just programmed the Servlet with the help of my book (Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam --> German Version).

Unfortunately, the Java-Code and the first xml-code are examples of the book.


And I installed tomcat8 via the repositories. I dont know why there are the error-messages.
When I created the folders manually, then there were no more "folder-errors" according to the catalina.out-file.


Thank you for your help, you helped me a lot.
 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
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