Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
That error doesn't make a lot of sense... Check a few of the following - Which version of Glassfish are you using (2.x, 3) Restart glassfish Make sure that you don't have servlet.jar or jsp-api.jar in your /WEB-INF/lib Deploy the app to another container (jetty or tomcat) to make sure that your app isn't the problem As you can see, I'm grasping straws... -Wes 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: Hi, I found where to change the filter settings. I get the exact same errors with the different filters: java.lang.ClassCastException: org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter cannot be cast to javax.servlet.Filter For all 3 filters you suggested. Kveðja / Regards, Hallgrímur -Original Message- From: Hallgrímur Th. Björnsson [mailto:hallgrimur.bjorns...@skyrr.is] Sent: 23. mars 2010 11:54 To: Struts Users Mailing List; lukasz.len...@gmail.com Subject: RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter Hi, Thanks for the reply. Where is this typically changed? In an XML file or in the code? Kveðja / Regards, Hallgrímur -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 23. mars 2010 11:49 To: Struts Users Mailing List Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
The chief Struts build and release engineer from ohio put that into the latest 2.1.8 distro.. import javax.servlet.Filter public class FilterDispatcher implements StrutsStatics, Filter { d/l the struts-2.1.8 distro if you need that functionality my danish is rusty but here goes *Tak a Miget* Martin Gainty __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Wed, 24 Mar 2010 10:12:45 -0400 Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter From: w...@wantii.com To: user@struts.apache.org That error doesn't make a lot of sense... Check a few of the following - Which version of Glassfish are you using (2.x, 3) Restart glassfish Make sure that you don't have servlet.jar or jsp-api.jar in your /WEB-INF/lib Deploy the app to another container (jetty or tomcat) to make sure that your app isn't the problem As you can see, I'm grasping straws... -Wes 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: Hi, I found where to change the filter settings. I get the exact same errors with the different filters: java.lang.ClassCastException: org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter cannot be cast to javax.servlet.Filter For all 3 filters you suggested. Kveðja / Regards, Hallgrímur -Original Message- From: Hallgrímur Th. Björnsson [mailto:hallgrimur.bjorns...@skyrr.is] Sent: 23. mars 2010 11:54 To: Struts Users Mailing List; lukasz.len...@gmail.com Subject: RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter Hi, Thanks for the reply. Where is this typically changed? In an XML file or in the code? Kveðja / Regards, Hallgrímur -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 23. mars 2010 11:49 To: Struts Users Mailing List Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org _ Hotmail: Trusted email with powerful SPAM protection. http://clk.atdmt.com/GBL/go/210850553/direct/01/
org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
Hi, I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. If I put struts2-core-2.1.8.jar in the classpath, loading the application triggers the error message: WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception java.lang.ClassCastException: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter at com.sun.enterprise.web.WebContainer.createFilterInstance(WebContainer.java:715) at com.sun.enterprise.web.WebModule.createFilterInstance(WebModule.java:1948) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:248) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:619) When I remove the jar, I can load the application until I hit the error: java.lang.ClassNotFoundException: org.apache.struts2.interceptor.ServletRequestAware at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) ... 115 more Which indicates that Struts isn't in the classpath. Does anyone have any idea what is wrong? Thanks.
Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
Hi, Thanks for the reply. Where is this typically changed? In an XML file or in the code? Kveðja / Regards, Hallgrímur -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 23. mars 2010 11:49 To: Struts Users Mailing List Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter
Hi, I found where to change the filter settings. I get the exact same errors with the different filters: java.lang.ClassCastException: org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter cannot be cast to javax.servlet.Filter For all 3 filters you suggested. Kveðja / Regards, Hallgrímur -Original Message- From: Hallgrímur Th. Björnsson [mailto:hallgrimur.bjorns...@skyrr.is] Sent: 23. mars 2010 11:54 To: Struts Users Mailing List; lukasz.len...@gmail.com Subject: RE: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter Hi, Thanks for the reply. Where is this typically changed? In an XML file or in the code? Kveðja / Regards, Hallgrímur -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 23. mars 2010 11:49 To: Struts Users Mailing List Subject: Re: org.apache.struts2.dispatcher.FilterDispatcher cannot be cast to javax.servlet.Filter 2010/3/23 Hallgrímur Th. Björnsson hallgrimur.bjorns...@skyrr.is: I am fairly new to Struts. I'm trying to get an application which uses Struts to work on Glassfish v3. I have made it work on JBoss and Tomcat. Try to use one of these org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter or (when you are using Sutemesh) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org