문제

I have the following dependensies in my pom.xml :

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>commons-validator</groupId>
                <artifactId>commons-validator</artifactId>
                <version>1.1.3</version>
            </dependency>
            <dependency>
                <groupId>struts</groupId>
                <artifactId>struts</artifactId>
                <version>1.1</version>
            </dependency>
        </dependencies>
 </dependencyManagement>

My goal is to use more later version of commons-validator. Namely, I am going to use DomainValidator from 1.4.0 version.

I tried to change version, but struts throws exception like this:

java.lang.NoClassDefFoundError: org/apache/commons/validator/ValidatorResourcesInitializer

In the latest version of commons-validator class ValidatorResourcesInitializer is simply missing.

Will be good to know whether it possible to fix this one without changes of struts version. Could you suggest any alternative libraries for validation domain and IP addresses?

도움이 되었습니까?

해결책

I've found guava validator com.google.common.net.InternetDomainName based on much newer version of RFC-3490.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top