3 Replies Latest reply on Apr 7, 2015 9:04 AM by Michal Petrov

    JSF1005: Cannot instantiate validator of type javax.faces.Bean

    LIM BY Newbie

      Hi,

       

      I am facing this issue when I have rich:graphValidator in the code.

      I had review few forum and follow their solution but I still encounter this issue. Anybody able to advise me what should I verify this issue and how to solve it?

       

      Below is my pom.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      
          <modelVersion>4.0.0</modelVersion>
      
          <groupId>testing</groupId>
          <artifactId>testing</artifactId>
          <name>testing</name>
          <version>0.0.1-SNAPSHOT</version>
          <packaging>war</packaging>
      
          <url>http://jboss.org/richfaces</url>
      
          <repositories>
              
              <repository>
                  <id>jboss-public-repository-group</id>
                  <name>JBoss Public Maven Repository Group</name>
                  <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
                  <layout>default</layout>
                  <releases>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                  </releases>
                  <snapshots>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                  </snapshots>
              </repository>
          </repositories>
          <pluginRepositories>
              <pluginRepository>
                  <id>jboss-public-repository-group</id>
                  <name>JBoss Public Maven Repository Group</name>
                  <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
                  <layout>default</layout>
                  <releases>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                  </releases>
                  <snapshots>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                  </snapshots>
              </pluginRepository>
          </pluginRepositories>
      
          <properties>
              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
              <maven.compiler.source>1.6</maven.compiler.source>
              <maven.compiler.target>1.6</maven.compiler.target>
              <!-- Setting this property using archetype-metadata.xml requiredPorperty 
                  so that generated project uses correct version of richfaces. -->
              <org.richfaces.version>4.5.2.Final</org.richfaces.version>
              <version.jsp-api>2.1</version.jsp-api>
              <version.jstl-api>1.2</version.jstl-api>
              <version.servlet-api>3.0.1</version.servlet-api>
              <version.el-api>2.2</version.el-api>
          </properties>
      
          <build>
              <finalName>GoBooking</finalName>
              <resources>
                  <resource>
                      <directory>src/main/java</directory>
                      <excludes>
                          <exclude>**/*.java</exclude>
                      </excludes>
                  </resource>
                  <resource>
                      <directory>src/main/resources</directory>
                  </resource>
              </resources>
              <plugins>
                  <plugin>
                      <artifactId>maven-compiler-plugin</artifactId>
                      <version>2.3.2</version>
                  </plugin>
                  <plugin>
                      <artifactId>maven-war-plugin</artifactId>
                      <version>2.1.1</version>
                  </plugin>
              </plugins>
          </build>
      
          <dependencyManagement>
              <dependencies>
                  <dependency>
                      <groupId>org.richfaces</groupId>
                      <artifactId>richfaces-cache-bom</artifactId>
                      <type>pom</type>
                      <version>${org.richfaces.version}</version>
                      <scope>import</scope>
                  </dependency>
                  <dependency>
                      <groupId>org.richfaces</groupId>
                      <artifactId>richfaces-build</artifactId>
                      <type>pom</type>
                      <version>${org.richfaces.version}</version>
                      <scope>import</scope>
                  </dependency>
              </dependencies>
          </dependencyManagement>
      
          <dependencies>
              <dependency>
                  <groupId>org.richfaces</groupId>
                  <artifactId>richfaces</artifactId>
              </dependency>
              <dependency>
                  <groupId>org.richfaces</groupId>
                  <artifactId>richfaces-page-fragments</artifactId>
                  <scope>compile</scope>
                  <version>4.5.2.Final</version>
              </dependency>
      
              <!-- JSF -->
              <dependency>
                  <groupId>com.sun.faces</groupId>
                  <artifactId>jsf-api</artifactId>
                  <version>2.2.9</version>
              </dependency>
              <dependency>
                  <groupId>com.sun.faces</groupId>
                  <artifactId>jsf-impl</artifactId>
                  <version>2.2.9</version>
              </dependency>
      
              <!-- MyFaces -->
              <dependency>
                  <groupId>org.apache.myfaces.core</groupId>
                  <artifactId>myfaces-api</artifactId>
                  <scope>compile</scope>
              </dependency>
              <dependency>
                  <groupId>org.apache.myfaces.core</groupId>
                  <artifactId>myfaces-impl</artifactId>
                  <scope>compile</scope>
              </dependency>
      
              <dependency>
                  <groupId>javax.faces</groupId>
                  <artifactId>javax.faces-api</artifactId>
                  <scope>compile</scope>
              </dependency>
              <dependency>
                  <groupId>org.glassfish</groupId>
                  <artifactId>javax.faces</artifactId>
                  <scope>compile</scope>
              </dependency>
              <dependency>
                  <groupId>javax.servlet</groupId>
                  <artifactId>javax.servlet-api</artifactId>
                  <version>${version.servlet-api}</version>
              </dependency>
              <dependency>
                  <groupId>javax.servlet.jsp</groupId>
                  <artifactId>jsp-api</artifactId>
                  <version>${version.jsp-api}</version>
              </dependency>
              <dependency>
                  <groupId>javax.el</groupId>
                  <artifactId>el-api</artifactId>
                  <version>${version.el-api}</version>
              </dependency>
              <dependency>
                  <groupId>javax.servlet.jsp.jstl</groupId>
                  <artifactId>jstl-api</artifactId>
              </dependency>
              <dependency>
                  <groupId>javax.validation</groupId>
                  <artifactId>validation-api </artifactId>
                  <version>1.1.0.Final</version>
              </dependency>
              
              <!-- standard.jar -->
              <dependency>
                  <groupId>taglibs</groupId>
                  <artifactId>standard</artifactId>
                  <version>1.1.2</version>
              </dependency>
      
              <!-- Dependencies for Tomcat -->
              <dependency>
                  <groupId>org.jboss</groupId>
                  <artifactId>jandex</artifactId>
              </dependency>
              <dependency>
                  <groupId>javax.enterprise</groupId>
                  <artifactId>cdi-api</artifactId>
              </dependency>
      
              <dependency>
                  <groupId>net.sf.ehcache</groupId>
                  <artifactId>ehcache</artifactId>
              </dependency>
      
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-core</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
      
              <!-- for JPA, use hibernate-entitymanager instead of hibernate-core -->
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-entitymanager</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
      
              <!-- Password -->
              <dependency>
                  <groupId>org.mindrot</groupId>
                  <artifactId>jbcrypt</artifactId>
                  <version>0.3m</version>
              </dependency>
      
              <!-- optional -->
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-osgi</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-envers</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-c3p0</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-proxool</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-infinispan</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-ehcache</artifactId>
                  <version>4.3.8.Final</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-validator</artifactId>
              </dependency>
      
              <!-- Slf4j -->
              <dependency>
                  <groupId>org.slf4j</groupId>
                  <artifactId>slf4j-api</artifactId>
                  <version>1.7.10</version>
              </dependency>
      
              <!-- slf4j testing -->
              <dependency>
                  <groupId>org.slf4j</groupId>
                  <artifactId>slf4j-log4j12</artifactId>
                  <version>1.7.10</version>
                  <scope>test</scope>
              </dependency>
      
              <dependency>
                  <groupId>org.slf4j</groupId>
                  <artifactId>jcl-over-slf4j</artifactId>
                  <version>1.7.10</version>
              </dependency>
      
              <!-- dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> 
                  <version>5.1.9</version> </dependency -->
              <dependency>
                  <groupId>org.eclipse.persistence</groupId>
                  <artifactId>eclipselink</artifactId>
                  <version>2.5.0-SNAPSHOT</version>
              </dependency>
              <dependency>
                  <groupId>org.eclipse.persistence</groupId>
                  <artifactId>javax.persistence</artifactId>
                  <version>2.1.0-SNAPSHOT</version>
              </dependency>
              <dependency>
                  <groupId>org.eclipse.persistence</groupId>
                  <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
                  <version>2.5.0-SNAPSHOT</version>
                  <scope>provided</scope>
              </dependency>
      
              <dependency>
                  <groupId>jaxen</groupId>
                  <artifactId>jaxen</artifactId>
                  <version>1.1.4</version>
              </dependency>
      
              <dependency>
                  <groupId>org.atmosphere</groupId>
                  <artifactId>atmosphere-runtime</artifactId>
                  <version>2.3.0-RC3</version>
              </dependency>
      
              <dependency>
                  <groupId>commons-beanutils</groupId>
                  <artifactId>commons-beanutils</artifactId>
                  <version>1.8.3</version>
              </dependency>
      
              <dependency>
                  <groupId>commons-digester</groupId>
                  <artifactId>commons-digester</artifactId>
                  <version>1.8.1</version>
              </dependency>
      
              <dependency>
                  <groupId>commons-lang</groupId>
                  <artifactId>commons-lang</artifactId>
                  <version>2.6</version>
              </dependency>
      
              <!-- Dependencies for Push -->
              <dependency>
                  <groupId>org.richfaces</groupId>
                  <artifactId>richfaces-push-depchain</artifactId>
                  <type>pom</type>
                  <version>${org.richfaces.version}</version>
              </dependency>
      
              <!-- Dependencies for CDI -->
              <!-- <dependency> <groupId>org.jboss.weld.servlet</groupId> <artifactId>weld-servlet</artifactId> 
                  <scope>${dependency.scope}</scope> <exclusions> <exclusion> <groupId>org.jboss.weld</groupId> 
                  <artifactId>weld-build-config</artifactId> </exclusion> </exclusions> </dependency> -->
              <!-- The rewrite library allows us to do url rewriting - used here for 
                  rewriting mobile devices to mobile specific views -->
              <dependency>
                  <groupId>org.ocpsoft.rewrite</groupId>
                  <artifactId>rewrite-servlet</artifactId>
              </dependency>
      
              <!-- Jsoup used for validation of safe html input -->
              <dependency>
                  <groupId>org.jsoup</groupId>
                  <artifactId>jsoup</artifactId>
              </dependency>
      
              <!-- Validation -->
              <!-- dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> 
                  <version>1.0.0.GA</version> </dependency -->
      
      
              <!-- Test dependencies -->
              <dependency>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
                  <scope>test</scope>
              </dependency>
              <dependency>
                  <groupId>org.jboss.arquillian.junit</groupId>
                  <artifactId>arquillian-junit-container</artifactId>
                  <scope>test</scope>
              </dependency>
          </dependencies>
      
          <profiles>
              <profile>
                  <id>jee6</id>
                  <build>
                      <plugins>
                          <plugin>
                              <artifactId>maven-war-plugin</artifactId>
                              <configuration>
                                  <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
                                  <classifier>jee6</classifier>
                              </configuration>
                          </plugin>
                      </plugins>
                  </build>
      
                  <dependencies>
                      <dependency>
                          <groupId>javax.faces</groupId>
                          <artifactId>javax.faces-api</artifactId>
                          <scope>provided</scope>
                      </dependency>
                      <dependency>
                          <groupId>org.glassfish</groupId>
                          <artifactId>javax.faces</artifactId>
                          <scope>provided</scope>
                      </dependency>
                      <dependency>
                          <groupId>javax.transaction</groupId>
                          <artifactId>jta</artifactId>
                          <version>1.1</version>
                          <scope>provided</scope>
                      </dependency>
                  </dependencies>
              </profile>
              <profile>
                  <id>release</id>
                  <build>
                      <plugins>
                          <plugin>
                              <artifactId>maven-war-plugin</artifactId>
                              <executions>
                                  <execution>
                                      <id>jee6</id>
                                      <phase>package</phase>
                                      <goals>
                                          <goal>war</goal>
                                      </goals>
                                      <configuration>
                                          <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
                                          <classifier>jee6</classifier>
                                          <packagingExcludes>WEB-INF/lib/javax.faces*</packagingExcludes>
                                          <warSourceExcludes>WEB-INF/lib/javax.faces*</warSourceExcludes>
                                      </configuration>
                                  </execution>
                              </executions>
                          </plugin>
                      </plugins>
                  </build>
              </profile>
          </profiles>
      </project>
      
      

      Appreciate if somebody able to give me some advice.