On 3/25/2014 7:03 AM, Berg, James wrote:


-----Original Message----- From: Mark Eggers
[mailto:its_toas...@yahoo.com] Sent: Monday, March 24, 2014 4:34 PM
To: Tomcat Users List Subject: Re: tomcat 7 Manager access

Please don't top-post.

On 3/24/2014 1:19 PM, Berg, James wrote:
I posted my entire tomcat-users.xml.  I took out all of the
comments to try to avoid the error. :-) Jim

Did you edit your server.xml file? However I imagine this error in
server.xml would trigger other issues . . .

Start with a fresh copy of Tomcat 7.0.52, and insert your users. Make
no other changes. Run Tomcat. Post the log (catalina.out) in the body
of your message if you have an error.

/mde/


-----Original Message----- From: Mark Eggers
[mailto:its_toas...@yahoo.com] Sent: Monday, March 24, 2014 4:17
PM To: Tomcat Users List Subject: Re: tomcat 7 Manager access

On 3/24/2014 12:30 PM, Berg, James wrote:

When I try to navigate to the any of the Manager links from the
first page, I get a login popup. I have tried all of the
usernames in the tomcat-users.xml and all I get back is a fresh
login popup. It looks like there is a bug in the
org.apache.tomcat.util.digester.Digester for 7.0.52 which is
stopping the Memory User Database Realm from loading.  Before I
unjar the tomcat-util.jar file.  Is there something that I am
doing wrong? Thanks in advance, Jim

Tomcat 7.0.52  port 8181.

Java 7 u51

Tomcat-users.xml

<?xml version='1.0' encoding='utf-16'?> <tomcat-users> <role
rolename="tomcat"/> <role rolename="manager-gui"/> <role
rolename="manager-script"/> <role rolename="manager-status"/>
<role rolename="manager-jmx"/> <user username="tcmanagerg"
password="tomcat" roles="tomcat,manager-gui"/> <user
username="tcmanagersc" password="tomcat"
roles="tomcat,manager-script"/> <user username="tcmanagerst"
password="tomcat" roles="tomcat,manager-status"/> <user
username="tcmanagerj" password="tomcat"
roles="tomcat,manager-jmx"/> <user username="tomcat"
password="tomcat" roles="tomcat"/> </tomcat-users>

Catalina log messages about errors:

Multiple instances of this:

Mar 24, 2014 1:35:21 PM org.apache.tomcat.util.digester.Digester
fatalError SEVERE: Parse Fatal Error at line 28 column 3: The
string "--" is not permitted within comments.
org.xml.sax.SAXParseException; lineNumber: 28; columnNumber: 3;
The string "--" is not permitted within comments.

Finally get this:

SEVERE: Failed to start
"org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
org.apache.catalina.LifecycleException: Failed to start
component [Realm[UserDatabaseRealm]]


Well since your posted file is not 28 lines long, then I'm
guessing that this is not your entire tomcat-users.xml file.

What is on line 28 of the file?

The message seems to be pretty clear. You have a '--' string in
your XML comments that the parser is objecting to.

I have no such issues with Tomcat 7.0.52 / JRE 1.7.0_52 / Fedora
20.

. . . just my two cents. /mde/

Sorry about the top post :-(


NP - this is one of the few lists I'm on that is pretty much a stickler
for that. It does make sense though . . .

There were no comments in the tomcat-users.xml file.  I had posted
the entire file. I took your suggestion and also made the user names
a little shorter and the manager app is working now. I must have had
a bad comment in the server.xml file. Thanks for your help. Jim

Probably my bad in interpreting the error message. I thought that the error about a UserDatabaseRealm would reference tomcat-users.xml instead of server.xml.

An XML-aware editor is probably a good thing to have in your bag of tools. There are lots of freely available ones. Some make catching errors easier than others. Just find one that you like. I tend to use jEdit, since it's free and cross-platform.

You're welcome - glad you found the problem. Also, thanks for posting that your problems has been resolved. Lots of people don't do this, which makes reading the archives for solutions more difficult than it should be.

. . . . coffee before responding
/mde/

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

Reply via email to