java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine when 
loading filter org.apache.struts2.dispatcher.FilterDispatcher
-----------------------------------------------------------------------------------------------------------------------------------------

                 Key: WW-2228
                 URL: https://issues.apache.org/struts/browse/WW-2228
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.8
         Environment: Suse Enterprise Linux 10, WebLogic Server 9.2 MP2 with 
BEA JRockit(R) Version R27.3.0-106-83792-1.5.0_11-20070607-1612-linux-x86_64 
from BEA Systems, Inc.
            Reporter: Derek
            Priority: Minor


Below is a clip from the logfile showing this error.

2007-10-03 08:07:21,466  INFO - Parsing configuration file [struts-default.xml]
2007-10-03 08:07:21,629  INFO - Parsing configuration file [struts-plugin.xml]
2007-10-03 08:07:21,641  INFO - Parsing configuration file [struts.xml]
2007-10-03 08:07:21,650  WARN - Settings: Could not parse struts.locale 
setting, substituting default VM locale
2007-10-03 08:07:21,658  INFO - Loading global messages from 
ApplicationResources
2007-10-03 08:07:21,869  INFO - Initializing Struts-Spring integration...
2007-10-03 08:07:21,870  INFO - Setting autowire strategy to name
2007-10-03 08:07:21,870  INFO - ... initialized Struts-Spring integration 
successfully
<Oct 3, 2007 8:07:21 AM EDT> <Error> <HTTP> <BEA-101165> <Could not load user 
defined filter in web.xml: org.apache.struts2.dispatcher.FilterDispatcher.
java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2259)
at java.lang.Class.getDeclaredFields(Class.java:1715)
at 
com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:102)
at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:84)
at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:82)
at 
com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at 
com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:81)
at 
com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:121)
at 
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:329)
at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:299)
at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:298)
at 
com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at 
com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:81)
at 
com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:121)
at 
com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:562)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:460)
at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:501)
at 
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:549)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:499)
at 
com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
at 
com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:134)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:49)
at 
com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:431)
at 
com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:446)
at 
com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:48)
at 
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:288)
at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:117)
>


We have been able to get around this error by adding the following dependencies 
to our project:

                <dependency>
                        <groupId>velocity</groupId>
                        <artifactId>velocity</artifactId>
                        <version>1.4</version>
                </dependency>
                <dependency>
                        <groupId>velocity-tools</groupId>
                        <artifactId>velocity-tools-view</artifactId>
                        <version>1.2</version>
                </dependency>


Please note that we do not encounter this issue when running on WebLogic Server 
9.2 MP2 on Solaris 8/9 using the Sun Hotspot JRE, only on this configuration of 
Linux/Jrockit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to