Jon Baso
Jon Baso

Reputation: 23

Groovy and JSF setup? Class Not Found: GroovyObject

Is there documentation somewhere as to how to setup Groovy with JSF? I installed the latest version of the groovy eclipse plugin, enabled the groovy nature, and started coding.

I added the following to my web.xml (per a jsf developer's blog posting here.

<filter>
<filter-name>GroovyFilter</filter-name>
<filter-class>com.sun.faces.scripting.GroovySupportFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GroovyFilter</filter-name>
<url-pattern>/\*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

then went to create a managed bean:

import javax.faces.bean.ManagedBean
import javax.faces.bean.SessionScoped

@ManagedBean(name = "detailBean")
@SessionScoped
public class OfferDetailDelegate {

String test1 = "hello!";
String test2 = "there!";

}

When I start up tomcat I get the following error. I see groovy in my class/build path.

com.sun.faces.config.AnnotationScanner processClassList
SEVERE: Unable to load annotated class:
com.xyz.offersworkbench.dao.delegate.OfferDetailDelegate, reason: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject

Any ideas?

Thanks in advance!

Upvotes: 2

Views: 687

Answers (1)

tim_yates
tim_yates

Reputation: 171114

Groovy is on the classpath of your tomcat instance?

sounds like you need to copy the jar file into lib do that tomcat can find it?

Upvotes: 1

Related Questions