JAVA.LANG.NOSUCHFIELDERROR:VERSION_2_3_0 Error Resolution

Source: Internet
Author: User

Java.lang.NoSuchFieldError:VERSION_2_3_0 at Org.apache.struts2.views.freemarker.FreemarkerManager.createConfiguration (Freemarkermanager.java:331) at Org.apache.struts2.views.freemarker.FreemarkerManager.init (Freemarkermanager.java:282) at Org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration (Freemarkermanager.java:269) at Org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler.init (Defaultdispatchererrorhandler.java: 47) at Org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:488) at Org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher (Initoperations.java:74) at Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( Strutsprepareandexecutefilter.java:57) at Org.apache.catalina.core.ApplicationFilterConfig.initFilter (Applicationfilterconfig.java:281) at Org.apache.catalina.core.ApplicationFilterConfig.getFilter (Applicationfilterconfig.java:262) at Org.apache.catalina.core.ApplicationFilterConfig.<init> (applicationfilterconfig.java:107) at Org.apache.catalina.core.StandardContext.filterStart (Standardcontext.java:4746) at Org.apache.catalina.core.StandardContext.startInternal (Standardcontext.java:5399) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java:150) at Org.apache.catalina.core.ContainerBase.addChildInternal (Containerbase.java:901) at Org.apache.catalina.core.ContainerBase.addChild (Containerbase.java:877) at Org.apache.catalina.core.StandardHost.addChild (Standardhost.java:633) at Org.apache.catalina.startup.HostConfig.deployDirectory (Hostconfig.java:1114) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (Hostconfig.java:1672) at Java.util.concurrent.executors$runnableadapter.call (Executors.java:441) at Java.util.concurrent.futuretask$sync.innerrun (Futuretask.java:303) at Java.util.concurrent.FutureTask.run (Futuretask.java:138) at Java.util.concurrent.threadpoolexecutor$worker.runtask (Threadpoolexecutor.java:886) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:908) at Java.lang.Thread.run (Thread.java:619)
Well, today the head of the company saw a news story saying that in addition to struts 2.3.20.2,2.3.24.2,2.3.28.1 several versions of the other versions are unsafe, so the old version of the upgrade, this project is not a MAVEN project, to replace the jar package one, But not simply change the jar package on the line, some of the older features of the new version is not necessarily supported, the new version of the old system compatible with the other jar does not necessarily support, so the upgrade is also a technical life ah ... Simple to solve a Baidu seems to have no one to discuss a version of the problem, this version of the solution is to replace the Freemarker package to Freemarker-2.3.23.jar, which is the highest version, but also remind yourself to encounter problems must not panic, To be resolved in steps according to the error prompt. Technical problems are solved, to think about the solution quietly.

STRUTS2 update release actions about notes

STRUTS2 Update version operation related notes,

Update main jar package: Struts2-convention-plugin-version,struts2-core-version, Struts2-spring-plugin-version

Dependent jar Package: xwork-core-version

Error should update about JAR package: freemarker-verson,log4j-version

Mevan instances:

<!--struts2 all jar packages -        <Dependency>            <groupId>Org.apache.struts</groupId>            <Artifactid>Struts2-core</Artifactid>            <!--<version>2.2.1</version> -            <version>2.3.24.1</version>            <Exclusions>                <exclusion>                    <groupId>Com.sun</groupId>                    <Artifactid>Tools</Artifactid>                </exclusion>            </Exclusions>        </Dependency>        <Dependency>            <groupId>Org.apache.struts</groupId>            <Artifactid>Struts2-spring-plugin</Artifactid>            <!--<version>2.2.1</version> -            <version>2.3.24.1</version>        </Dependency>        <Dependency>            <groupId>Org.apache.struts</groupId>            <Artifactid>Struts2-convention-plugin</Artifactid>            <!--<version>2.2.1</version> -            <version>2.3.24.1</version>        </Dependency>        <Dependency>            <groupId>Org.freemarker</groupId>            <Artifactid>Freemarker</Artifactid>            <version>2.3.23</version>        </Dependency>        <Dependency>            <groupId>Log4j</groupId>            <Artifactid>Log4j</Artifactid>            <version>1.2.17</version>          </Dependency>

Xwork-core-version This package does not update involves an error:

  <Filter>       <Filter-name>Strutspreparefilter</Filter-name>       <Filter-class>Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</Filter-class>    </Filter>    <Filter>       <Filter-name>Strutsexecutefilter</Filter-name>       <Filter-class>Org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</Filter-class>    </Filter>

This profile class is missing an error

Freemarker-verson,log4j-version package does not update involves an error:

Java.lang.NoSuchFieldError:VERSION_2_3_0 at Org.apache.struts2.views.freemarker.FreemarkerManager.createConfiguration (Freemarkermanager.java:331) at Org.apache.struts2.views.freemarker.FreemarkerManager.init (Freemarkermanager.java:282) at Org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration (Freemarkermanager.java:269) at Org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler.init (Defaultdispatchererrorhandler.java: 47) at Org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:488) at Org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher (Initoperations.java:74) at Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( Strutsprepareandexecutefilter.java:57) at Org.apache.catalina.core.ApplicationFilterConfig.initFilter (Applicationfilterconfig.java:281) at Org.apache.catalina.core.ApplicationFilterConfig.getFilter (Applicationfilterconfig.java:262) at Org.apache.catalina.core.ApplicationFilterConfig.<init> (applicationfilterconfig.java:107) at Org.apache.catalina.core.StandardContext.filterStart (Standardcontext.java:4746) at Org.apache.catalina.core.StandardContext.startInternal (Standardcontext.java:5399) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java:150) at Org.apache.catalina.core.ContainerBase.addChildInternal (Containerbase.java:901) at Org.apache.catalina.core.ContainerBase.addChild (Containerbase.java:877) at Org.apache.catalina.core.StandardHost.addChild (Standardhost.java:633) at Org.apache.catalina.startup.HostConfig.deployDirectory (Hostconfig.java:1114) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (Hostconfig.java:1672) at Java.util.concurrent.executors$runnableadapter.call (Executors.java:441) at Java.util.concurrent.futuretask$sync.innerrun (Futuretask.java:303) at Java.util.concurrent.FutureTask.run (Futuretask.java:138) at Java.util.concurrent.threadpoolexecutor$worker.runtask (Threadpoolexecutor.java:886) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:908) at Java.lang.Thread.run (Thread.java:619)

JAVA.LANG.NOSUCHFIELDERROR:VERSION_2_3_0 Error Resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.