tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Please help
Date Fri, 17 Jul 2015 03:25:02 GMT
> From: uzair rashid [mailto:uzairrashid80@gmail.com] 
> Subject: Please help

"Please help" as a subject line is not terribly useful, is it?

> I am using Apache Tomcat 7.0.57..

Good to know; many people forget to mention the version they're using.

> I have configured my server.xml as follows:

>         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase"/>
>
>       </Realm>

> SEVERE: Parse Fatal Error at line 36 column 4: XML document structures must
> start and end within the same entity.

You have both an end tag and an empty element - pick one or the other.  Any decent XML editor
will highlight the syntax error.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


-----Original Message-----
From: uzair rashid [mailto:uzairrashid80@gmail.com] 
Sent: 2015 July 16, Thursday 19:33
To: users@tomcat.apache.org
Subject: Please help

Hello:



I am using Apache Tomcat 7.0.57..



I have configured my server.xml as follows:

<?xml version="1.0" encoding="UTF-8"?><!--

  Licensed to the Apache Software Foundation (ASF) under one or more

  contributor license agreements.  See the NOTICE file distributed with

  this work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License, Version 2.0

  (the "License"); you may not use this file except in compliance with

  the License.  You may obtain a copy of the License at



      http://www.apache.org/licenses/LICENSE-2.0



  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

--><!-- Note:  A "Server" is not itself a "Container", so you may not

     define subcomponents such as "Valves" at this level.

     Documentation at /docs/config/server.html

 --><Server port="8005" shutdown="SHUTDOWN">

  <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>

  <!-- Security listener. Documentation at /docs/config/listeners.html

  <Listener className="org.apache.catalina.security.SecurityListener" />

  -->

  <!--APR library loader. Documentation at /docs/apr.html -->

  <Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on"/>

  <!--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html -->

  <Listener className="org.apache.catalina.core.JasperListener"/>

  <!-- Prevent memory leaks due to use of particular java/javax APIs-->

  <Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>

  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>

  <Listener
className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>



  <!-- Global JNDI resources

       Documentation at /docs/jndi-resources-howto.html

  -->

  <GlobalNamingResources>

    <!-- Editable user database that can also be used by

         UserDatabaseRealm to authenticate users

    -->

    <Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase" description="User database that can
be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml"/>

  </GlobalNamingResources>



  <!-- A "Service" is a collection of one or more "Connectors" that share

       a single "Container" Note:  A "Service" is not itself a "Container",

       so you may not define subcomponents such as "Valves" at this level.

       Documentation at /docs/config/service.html

   -->

  <Service name="Catalina">



    <!--The connectors can use a shared executor, you can define one or
more named thread pools-->

    <!--

    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"

        maxThreads="150" minSpareThreads="4"/>

    -->





    <!-- A "Connector" represents an endpoint by which requests are received

         and responses are returned. Documentation at :

         Java HTTP Connector: /docs/config/http.html (blocking &
non-blocking)

         Java AJP  Connector: /docs/config/ajp.html

         APR (HTTP/AJP) Connector: /docs/apr.html

         Define a non-SSL HTTP/1.1 Connector on port 8080

    -->

    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" compression="on" URIEncoding="UTF-8"
compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,text/json,application/json"/>

    <!-- A "Connector" using the shared thread pool-->

    <!--

    <Connector executor="tomcatThreadPool"

               port="8080" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" />

    -->

    <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->

    <Connector port="8443" protocol="HTTP/1.1"

    maxThreads="150" SSLEnabled="true" minSpareThreads="25"
maxSpareThreads="75"

    enableLookups="false" disableUploadTimeout="true"

    acceptCount="100" debug="0" scheme="https" secure="true"

    clientAuth="false" sslProtocol="TLS"
SSLCipherSuite="ALL:!ADH:!SSLv2:!EXPORT40:!EXP:!LOW"

    keystorePass="FILLINHERE" keystoreFile="D:\SAP\.keystore"/>



    <!-- Define an AJP 1.3 Connector on port 8009 -->

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>





    <!-- An Engine represents the entry point (within Catalina) that
processes

         every request.  The Engine implementation for Tomcat stand alone

         analyzes the HTTP headers included with the request, and passes
them

         on to the appropriate Host (virtual host).

         Documentation at /docs/config/engine.html -->



    <!-- You should set jvmRoute to support load-balancing via AJP ie :

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">

    -->

    <Engine name="Catalina" defaultHost="localhost">



      <!--For clustering, please take a look at documentation at:

          /docs/cluster-howto.html  (simple how to)

          /docs/config/cluster.html (reference documentation) -->

      <!--

      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

      -->



      <!-- Use the LockOutRealm to prevent attempts to guess user passwords

           via a brute-force attack -->

      <Realm className="org.apache.catalina.realm.LockOutRealm">

        <!-- This Realm uses the UserDatabase configured in the global JNDI

             resources under the key "UserDatabase".  Any edits

             that are performed against this UserDatabase are immediately

             available for use by the Realm.  -->

        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>

      </Realm>



      <Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true">



        <!-- SingleSignOn valve, share authentication between web
applications

             Documentation at: /docs/config/valve.html -->

        <!--

        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />

        -->



        <!-- Access log processes all example.

             Documentation at: /docs/config/valve.html

             Note: The pattern used is equivalent to using pattern="common"
-->

        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h
%l %u %t &quot;%r&quot; %s %b"/>



      </Host>

    </Engine>

  </Service>

</Server>



And my stderr.log is as follows:



Jul 16, 2015 5:09:52 PM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["ajp-apr-8009"]

Jul 16, 2015 5:09:52 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 4289 ms

Jul 16, 2015 5:09:52 PM org.apache.tomcat.util.digester.Digester fatalError

SEVERE: Parse Fatal Error at line 36 column 4: XML document structures must
start and end within the same entity.

org.xml.sax.SAXParseException: XML document structures must start and end
within the same entity.

                at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

                at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)

                at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)

                at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1427)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(XMLDocumentFragmentScannerImpl.java:905)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:604)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1420)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1769)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(XMLEntityScanner.java:493)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2688)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)

                at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:817)

                at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

                at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

                at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

                at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

                at
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1580)

                at
org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:432)

                at
org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:102)

                at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)

                at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:842)

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:153)

                at
org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:117)

                at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)

                at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:138)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:110)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:82)

                at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

                at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

                at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)

                at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)

                at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)

                at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at
org.apache.catalina.startup.Catalina.start(Catalina.java:689)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)

                at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

Jul 16, 2015 5:09:52 PM org.apache.naming.NamingContext lookup

WARNING: Unexpected exception resolving reference

org.xml.sax.SAXParseException: XML document structures must start and end
within the same entity.

                at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)

                at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

                at
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1580)

                at
org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:432)

                at
org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:102)

                at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)

                at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:842)

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:153)

                at
org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:117)

                at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)

                at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:138)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:110)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:82)

                at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

                at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

                at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)

                at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)

                at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)

                at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at
org.apache.catalina.startup.Catalina.start(Catalina.java:689)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)

                at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

Jul 16, 2015 5:09:52 PM
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans

SEVERE: Exception processing Global JNDI Resources

javax.naming.NamingException: XML document structures must start and end
within the same entity.

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:859)

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:153)

                at
org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:117)

                at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)

                at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:138)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:110)

                at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:82)

                at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

                at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

                at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)

                at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)

                at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)

                at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at
org.apache.catalina.startup.Catalina.start(Catalina.java:689)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)

                at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

Jul 16, 2015 5:09:52 PM org.apache.catalina.core.StandardService
startInternal

INFO: Starting service Catalina

Jul 16, 2015 5:09:52 PM org.apache.catalina.core.StandardEngine
startInternal

INFO: Starting Servlet Engine: Apache Tomcat/7.0.57

Jul 16, 2015 5:09:52 PM org.apache.tomcat.util.digester.Digester fatalError

SEVERE: Parse Fatal Error at line 36 column 4: XML document structures must
start and end within the same entity.

org.xml.sax.SAXParseException: XML document structures must start and end
within the same entity.

                at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

                at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)

                at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)

                at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1427)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(XMLDocumentFragmentScannerImpl.java:905)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:604)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1420)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1769)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(XMLEntityScanner.java:493)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2688)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)

                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)

                at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:817)

                at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

                at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

                at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

                at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

                at
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1580)

                at
org.apache.catalina.users.MemoryUserDatabase.open(MemoryUserDatabase.java:432)

                at
org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:102)

                at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)

                at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:842)

                at
org.apache.naming.NamingContext.lookup(NamingContext.java:167)

                at
org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:253)

                at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at
org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:201)

                at
org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:120)

                at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1109)





Can you please guide me in the right direction



Regards



Uzair Rashid

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message