Pergunta

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?

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top