NoClassDefFoundError Issues Using Apache Commons Validator

Getting error while using Apache Commons Validator:

java.lang.NoClassDefFoundError: org / apache / oro / text / perl / Perl5Util

Even if the Apache Commons Validator / dependations states that ORO.jar is optional.

+4
source share
6 answers

Place the jar with the class "org / apache / oro / text / perl / Perl5Util" on the server and change the path to the server class to include the jar file.

+1
source

I had this problem in version 1.3.1 of Apache Validator. I rolled back to 1.3.0 and it included the oro dependency just fine.

If you don’t rely on something from a point release, this might work for you too.

+3
source

Apparently you are using what this class requires.

The compiler wins over the documentation.

0
source

You need to get Apache oro. I have version 2.0.8, although Maven has Perl5Util:

mpandit-mbp:2.0.8 mpandit$ jar tvf oro-2.0.8.jar | grep 'Perl5Util' 7818 Sun Dec 28 23:00:18 PST 2003 org/apache/oro/text/perl/Perl5Util.class 
0
source

The newer version (1.4.0) of the public user has no dependency on oro. Using Maven:

 <dependency> <groupId>commons-validator</groupId> <artifactId>commons-validator</artifactId> <version>1.4.0</version> </dependency> 
0
source

You can download this dependency to get Perl5Util.

 <dependency> <groupId>oro</groupId> <artifactId>oro</artifactId> <version>2.0.8</version> </dependency> 
0
source

All Articles