[ 
https://issues.apache.org/jira/browse/WW-5187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554024#comment-17554024
 ] 

Tobias Stadler commented on WW-5187:
------------------------------------

I don't think think the linked PR will fix the 
{{{}java.lang.NoClassDefFoundError{}}}.

As far as I understood {{ContainerImpl#injectStatics}} tries to load 
{{org.apache.struts2.sitemesh.VelocityPageFilter}} because it is listed in the 
{{struts.xml}} of the SiteMesh plugin. But it is not able to do so, because 
{{org.apache.struts2.sitemesh.VelocityPageFilter}} "uses" 
{{org.apache.struts2.views.velocity.VelocityManager}} which was not on the 
class path because we did not include the velocity plugin when upgrading Struts 
to 6.0.

Does the SiteMesh plugin require the Velocity plugin?

> java.lang.NoClassDefFoundError: 
> org/apache/struts2/views/velocity/VelocityManager
> ---------------------------------------------------------------------------------
>
>                 Key: WW-5187
>                 URL: https://issues.apache.org/jira/browse/WW-5187
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Plugin - SiteMesh
>    Affects Versions: 6.0.0
>            Reporter: Tobias Stadler
>            Priority: Critical
>             Fix For: 6.0.1
>
>
> We are getting a {{{}java.lang.NoClassDefFoundError{}}}, when using the 
> SiteMesh plugin. Adding the Velocity plugin to the class path fixes the 
> problem for us.
> Here is a stacktrace:
> {noformat}
> java.lang.NoClassDefFoundError: 
> org/apache/struts2/views/velocity/VelocityManager
>         at java.lang.Class.getDeclaredMethods0(Native Method)
>         at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
>         at java.lang.Class.getDeclaredMethods(Class.java:2003)
>         at 
> com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:97)
>         at 
> com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:632)
>         at 
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:209)
>         at 
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:65)
>         at 
> org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:1035)
>         at 
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:516)
>         at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:549)
>         at 
> org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:44)
>         at 
> org.apache.struts2.dispatcher.filter.StrutsPrepareFilter.init(StrutsPrepareFilter.java:53)
>         ...
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to