'Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei

I am trying to build struts 1 web project using maven in eclipse. I am getting the following error: enter image description here

My pom.xml is below:

 <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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.maven.practice</groupId>
  <artifactId>maven-practice</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>maven-practice Maven Webapp</name>
  <url>http://maven.apache.org</url>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts-core</artifactId>
      <version>1.3.10</version>
    </dependency>
     <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts-taglib</artifactId>
      <version>1.3.10</version>
    </dependency>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts-el</artifactId>
      <version>1.3.10</version>
    </dependency>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts-tiles</artifactId>
      <version>1.3.10</version>
    </dependency>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts-faces</artifactId>
      <version>1.3.10</version>
    </dependency>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts-scripting</artifactId>
      <version>1.3.10</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
    </dependency>
  </dependencies>
  <build>
    <finalName>maven-practice</finalName>
  </build>
</project>

struts-config.xml:

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://struts.apache.org/dtds/struts-config_1_2.dtd">


<struts-config>
    <form-beans>
          <form-bean name="HelloWorldForm" type="vanila.HelloWorldForm" />
          <form-bean name="SignUpForm" type="vanila.SignUpForm" />
    </form-beans>

    <global-exceptions>

    </global-exceptions>

    <global-forwards>
        <forward name="welcome" path="/Welcome.do" />
    </global-forwards>

    <action-mappings>

        <action name="HelloWorldForm" path="/HelloWorld" type="vanila.HelloWorldAction" validate="true" input="/home/index.jsp" scope="request">
            <forward name="success" path="/home/helloWorld.jsp" />
            <forward name="error"   path="/home/error.jsp" />
            <forward name="signup"   path="/home/signUp.jsp" />
        </action>

        <action name="SignUpForm" path="/SignUp" type="vanila.SignUpAction" validate="true" input="/home/signUp.jsp" scope="request">
            <forward name="success" path="/home/success.jsp" />
            <forward name="error"   path="/home/error.jsp" />
        </action>

    </action-mappings>

    <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" />

    <message-resources parameter="com/vaannila/ApplicationResource" />


    <plug-in className="org.apache.struts.tiles.TilesPlugin">
        <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
        <set-property property="moduleAware" value="true" />
    </plug-in>

    <!-- ========================= Validator plugin ================================= -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames"
            value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
    </plug-in>

</struts-config>

and finally the web.xml is below:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>   
<display-name>
    maven-struts-practice</display-name>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>livechat</param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
        <param-name>listings</param-name>
        <param-value>false</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
    <session-config>
    <session-timeout>60</session-timeout>
  </session-config>


    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>


  <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  </taglib>


</web-app>

To be more specific, this is my project structure:

enter image description here

Help me to fix this.



Solution 1:[1]

check the versions of tld file in your WEB-INF and corresponding jar file in library.

I had struts-tiles-1.3.10.jar in lib folder and older version struts-tiles.tld in WEB-INF. It throws me the same error. Once I replace the struts-tiles.tld file with the one I get inside the struts-tiles-1.3.10.jar (by extracting the jar file) in the WEB-INF folder, It worked fine.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Varma