Hi,

I am using Cayenne 4.0 for the first time with a Web app and I'm having trouble configuring it to create the ObjectContext I can access within my app. When I attempt to start Tomcat and load my app I'm getting the following error:

SEVERE: Servlet.service() for servlet [CSCTCBridgeWeb] in context with path [/CSCTCBridgeWeb] threw exception org.apache.cayenne.di.DIRuntimeException: Error instantiating class 'org.apache.cayenne.velocity.VelocitySQLTemplateProcessor'

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:189) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261) at org.apache.cayenne.velocity.VelocitySQLTemplateProcessor.<init>(VelocitySQLTemplateProcessor.java:117)

And yet I have the proper library files in the Java path - or at least I believe I do...

My web.xml looks like this...

    <context-param>
<param-name>cayenne.configuration.path</param-name>
        <param-value>/WEB-INF/DBConfig</param-value>
    </context-param>
    <context-param>
        <param-name>configuration-location</param-name>
        <param-value>/WEB-INF/DBConfig</param-value>
    </context-param>

    <filter>
<filter-name>cayenne-CSCTCBridgeWeb</filter-name>
<filter-class>org.apache.cayenne.configuration.web.CayenneFilter</filter-class>
    </filter>

     <filter-mapping>
<filter-name>cayenne-CSCTCBridgeWeb</filter-name>
        <url-pattern>/*</url-pattern>
     </filter-mapping>

with the appropriate cayenne-CSCTCBridgeWeb.xml file in the /WEB-INF/DBConfig directory.

Any guidance on what I might be doing incorrectly would be appreciated.

Thanks,

Andrew



Reply via email to