We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Exception Digester!!

geek4u
geek4u asked
on
Medium Priority
395 Views
Last Modified: 2013-11-24
Hi,

I am getting the following exception when i start tomcat.

2006-04-04 11:45:10 StandardContext[/balancer]Exception starting filter BalancerFilter
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
        at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65)


How can i solve it?? Does this have an effect on reading the web.xml file? Bcos i have few roles there and before this error started coming i can add new users and assign these roles and it worked? But now, when i have a new role say <role-name>test</role-name> in web.xml, and i assign it to new user say testing and when i log in as testing it throws "Error Access to this resource denied (HTTP 403)"??

I am desparate. Please help asap.

Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016

Commented:
>>Does this have an effect on reading the web.xml file?

It might do. Have you messed up your library files?

Commented:
have a look if commons-digester.jar is in application class path. If not, add it.

Author

Commented:
Actually, i didnt. The company from which we had bought the initial software had recently downloaded a patch on the development server. From then i am getting this problem

Author

Commented:
these are the lib files in tomcat/common/lib

ant.jar                      commons-el.jar        jsp-api.jar                          naming-java.jar
ant-launcher.jar             commons-pool-1.2.jar  mysql-connector-java-3.1.12-bin.jar  naming-resources.jar
commons-collections-3.1.jar  jasper-compiler.jar   naming-common.jar                    servlet-api.jar
commons-dbcp-1.2.1.jar       jasper-runtime.jar    naming-factory.jar

Does this give any idea??
CERTIFIED EXPERT
Top Expert 2016

Commented:
You'd better get and put the digester jar in there too
CERTIFIED EXPERT
Top Expert 2016

Commented:
You need to make sure you have its dependencies too

http://jakarta.apache.org/commons/digester/

Commented:
download page http://jakarta.apache.org/site/downloads/downloads_commons-digester.cgi
just fetch the latest one. It has dependency with commons-collections. But u already have collections 3.x so the latest will be compatible.
CERTIFIED EXPERT
Top Expert 2016

Commented:
>>It has dependency with commons-collections

+ bean-utils + logging

Commented:
CEHJ u are correct...bean-utils + logging.
Siva Prasanna KumarPrincipal Solutions Architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
i think just your need to put those required jars(commons-digester.jar etc) in build path, build & run the project that will do.

Make sure all your java file entries are there in classpath too.

Author

Commented:
I downloaded the jars and placed it in the tomcat /common. The error is gone but if i try to logon as the new user with new userrole it gives me HTTP 403 error???

What to do??

I have restarted the system many times also!!
CERTIFIED EXPERT
Top Expert 2016

Commented:
What kind of realms are you now using?

Author

Commented:
JDBC realm

Author

Commented:
I have a new userrole "test" in web.xml, and have a user with this user role in both users and user_roles tables, but the server does not allow me to get into the application

where as all the old userroles, i.e., created by me long back are working fine.
CERTIFIED EXPERT
Top Expert 2016

Commented:
>>and have a user with this user role in both users and user_roles tables,

Sure? Can you post the tables?

Author

Commented:
ok.

Here are the tables:

mysql> select * from user_roles;
+------------+------------+
| user_name  | role_name  |
+------------+------------+
| admin      | osfadmin   |
| hello      | test       |
| IPTVadmin  | IPTVadmin  |
| noor       | osfadmin   |
| osfadmin   | osfadmin   |
| osfsupport | osfsupport |
| phil       | phil       |
| tier2      | tier2      |
+------------+------------+

mysql> select * from users;
+------------+-----------+
| user_name  | user_pass |
+------------+-----------+
| osfadmin   | xxxxxxxxx |
| IPTVadmin  |xxxxxxxxx    |
| osfsupport | xxxxxxx     |
| phil       | xxxxxxxx|
| tier2      | xxxxxxxxxx   |
| noor       | xxxxxxxx |
| admin      | xxxxxxxxx |
| hello      | hello     |
+------------+-----------+



Here is how it looks in web.xml

       <!-- Security roles referenced by this web application -->
        <security-role>
                <description>
      The role that is required to log in to OSF Admin Console
    </description>
                        <role-name>osfadmin</role-name>
                        <role-name>osfsupport</role-name>
                        <role-name>phil</role-name>
                        <role-name>tier2</role-name>
                        <role-name>IPTVadmin</role-name>
                        <role-name>test</role-name>
        </security-role>
        <security-role>
                <description>
      The role that is required to log in to OSF Admin Console
    </description>
                <role-name>osf</role-name>
        </security-role>
CERTIFIED EXPERT
Top Expert 2016

Commented:
You missed one:

mysql> select * from roles;

Author

Commented:
mysql> select * from roles;
+------------+
| role_name  |
+------------+
| IPTVadmin  |
| osfadmin   |
| osfsupport |
| phil       |
| test       |
| tier2      |
+------------+
6 rows in set (0.00 sec)
CERTIFIED EXPERT
Top Expert 2016

Commented:
How are you logging in?

Author

Commented:
using username and password thru login.jsp

Form based authentication.
CERTIFIED EXPERT
Top Expert 2016

Commented:
No, i mean *as* what - i.e. what username and password

Author

Commented:
username : hello
userpass: hello
CERTIFIED EXPERT
Top Expert 2016
Commented:
Hmm. I wonder if there's any whitespace in there in any of those table values?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Lots of thanks to u CEHJ. I was able to figure out the problem. Actually after they delivered the patch the web.xml file was messed up and there was some characters which were making it unreadable and hence the problem. I fixed it and its working perfect.

Even the multiple roles thing is working.

Thanks again
CERTIFIED EXPERT
Top Expert 2016

Commented:
OK :-)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.