• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Can not run Tmacat on Win2k

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When i run tomcat on windows by command prompt the following eceptions occur.
I have set the JAVA_HOME and CATALINA_HOME paths correctly.
my jdk is jdk1.3. The tomcat 4.0.6 requires jdk1.2.x or above.

Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
PARSE error at line 1 column 1 of D:\Apache Tomcat 4.0\conf\tomcat-users.xml
org.xml.sax.SAXParseException: The root element is required in a well-formed doc
ument.
Catalina.start: LifecycleException: memoryRealm.readXml: org.xml.sax.SAXParseE
xception: The root element is required in a well-formed document.
LifecycleException: memoryRealm.readXml: org.xml.sax.SAXParseException: The ro
ot element is required in a well-formed document.
at org.apache.catalina.realm.MemoryRealm.start(MemoryRealm.java:335)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
)
at org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
----- Root Cause -----
org.xml.sax.SAXParseException: The root element is required in a well-formed doc
ument.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213
)
at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:570)
at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.endO
fInput(XMLDocumentScanner.java:790)
at org.apache.xerces.framework.XMLDocumentScanner.endOfInput(XMLDocument
Scanner.java:418)
at org.apache.xerces.validators.common.XMLValidator.sendEndOfInputNotifi
cations(XMLValidator.java:712)
at org.apache.xerces.readers.DefaultEntityHandler.changeReaders(DefaultE
ntityHandler.java:1031)
at org.apache.xerces.readers.XMLEntityReader.changeReaders(XMLEntityRead
er.java:168)
at org.apache.xerces.readers.UTF8Reader.changeReaders(UTF8Reader.java:18
2)
at org.apache.xerces.readers.UTF8Reader.lookingAtChar(UTF8Reader.java:19
7)
at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.disp
atch(XMLDocumentScanner.java:686)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:301)
at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
at org.apache.catalina.realm.MemoryRealm.start(MemoryRealm.java:333)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
)
at org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

Kindly tell me the solution.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like the xml document is not well-formed.
<element_name />
D:\Apache Tomcat 4.0\conf\tomcat-users.xml
Here is mine, which has been untouched.
<tomcat-users>
<user name="tomcat" password="tomcat" roles="tomcat" />
<user name="role1" password="tomcat" roles="role1" />
<user name="both" password="tomcat" roles="tomcat,role1" />
</tomcat-users>
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/
has a decent set of instructions for Tomcat.
 
Richa Goyal
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your suggestion. My tomcat_users.xml file was blank. I added your codes to it. BUt now i m getting another set of error about port 8080 already in use.
Catalina.start: LifecycleException: null.open: java.net.BindException: Address
in use: JVM_Bind:8080
LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bin
d:8080
at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
ctor.java:1130)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:553)
at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
----- Root Cause -----
java.net.BindException: Address in use: JVM_Bind:8080
at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.j
ava:950)
at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
ctor.java:1128)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:553)
at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

Then i changed the port to 1977 and now i am getting these errors
Catalina.start: LifecycleException: Error creating server socket (java.net.Bind
Exception): java.net.BindException: Address in use: JVM_Bind
LifecycleException: Error creating server socket (java.net.BindException): jav
a.net.BindException: Address in use: JVM_Bind
at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConne
ctor.java:491)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:553)
at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
----- Root Cause -----
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397)
at java.net.ServerSocket.<init>(ServerSocket.java:170)
at java.net.ServerSocket.<init>(ServerSocket.java:121)
at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(Defau
ltServerSocketFactory.java:118)
at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConne
ctor.java:485)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:553)
at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
What is the problem
Richa
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If those ports are already in use you probably have instances of Tomcat already running. Did you install as a service? What do you see when you look at the running processes?
Bill
 
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic