I am in the process of migrating the Structs 1 & EJB 2.0 , JDK 1.6 websphere application to Open JDK 1.8, Structs 2.5 and TomEE application server.
1st step in migration, I had mimicked only one use case of the project pointed to Open JDK 1.8 and now in the process of upgrading from Struts 1.1 to Struts 2.5 by adding the dependent jars one by one.
Here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
проект проект org. apache .struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter eRFQ / * индекс. html index.htm индекс. jsp по умолчанию. html default.htm по умолчанию. jsp 401 / jsp / AuthorizationError. jsp
У меня простой дом. jsp только с заголовком
вот мои стойки. xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
<struts>
<constant name="struts.devMode" value="true" />
<constant name="struts.ui.theme" value="simple" />
<constant name="struts.custom.i18n.resources"
value="com.toyota.owkmessaging.resources.ApplicationResources" />
<package name="home" namespace="/home" extends="struts-default">
<action name="homeForm" class="com.company.production.project.action.HomeAction" method="execute">
<result name = "success">/Home.jsp</result>
</action>
</package>
</struts>
Я развертываю вышеуказанный набор вверх TomEE Plume 9.0. Я столкнулся с проблемой, когда фильтры Structs Filters загружаются из Интернета. xml, который косвенно ссылается на servlet-api (из каталога tomcat lib) tomEE-версию servlet-api (с классом Filter, упакованным в jakarta.servlet.Filter) с пакетом ссылку в соответствии с приведенным ниже снимком.
Ошибка:
SEVERE: Exception starting filter [project]
java.lang.ClassCastException: org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter cannot be cast to jakarta.servlet.Filter
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4536)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
Aug 06, 2020 7:14:59 AM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: One or more Filters failed to start. Full details will be found in the appropriate container log file
Aug 06, 2020 7:14:59 AM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: Context [/eRFQ] startup failed due to previous errors
Aug 06, 2020 7:14:59 AM com.sun.faces.config.ConfigureListener contextDestroyed
WARNING: Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
Есть ли какие-либо решения вышеуказанной проблемы?