It can't find the class groovy.lang.GroovyObject, looks like you need to deploy the
groovy jars
into guvnor/tomcat so that they are available.
Thomas
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-
bounces(a)lists.jboss.org] On Behalf Of kavita
Sent: 18 January 2012 18:55
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Groovy classes as fact classes in drool
Hi,
Can anybody tell me how to use groovy classes as fact classes in drools.
When i try to upload the jar file generated from the groovy class am getting
the following error:
SEVERE: Servlet.service() for servlet AssetFileServlet threw exception
java.lang.ClassNotFoundException: groovy.lang.GroovyObject
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad
er.java:1680)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad
er.java:1526)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.jav
a:109)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at
org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader
.java:86)
at
org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.jav
a:104)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.drools.guvnor.server.contenthandler.ModelContentHandler.isClassVisibl
e(ModelContentHandler.java:183)
at
org.drools.guvnor.server.contenthandler.ModelContentHandler.getImports
FromJar(ModelContentHandler.java:148)
at
org.drools.guvnor.server.contenthandler.ModelContentHandler.onAttachm
entAdded(ModelContentHandler.java:66)
at
org.drools.guvnor.server.files.FileManagerUtils.attachFileToAsset(FileManag
erUtils.java:115)
at
org.drools.guvnor.server.files.FileManagerUtils.attachFile(FileManagerUtils.j
ava:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationCo
ntext.java:32)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationC
ontext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterc
eptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationC
ontext.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor
.java:77)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationC
ontext.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodCon
textInterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationC
ontext.java:68)
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityIntercept
or.java:163)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationC
ontext.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBean
Interceptor.java:185)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.j
ava:103)
at
org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_seam_10.attac
hFile(FileManagerUtils_$$_javassist_seam_10.java)
at
org.drools.guvnor.server.files.AssetFileServlet.processAttachFileToAsset(Ass
etFileServlet.java:97)
at
org.drools.guvnor.server.files.AssetFileServlet.doPost(AssetFileServlet.java:
49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
lterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
n.java:206)
at
org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpSe
rvletRequest.java:65)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
lterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
n.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
02)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
93)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
9)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
s(Http11Protocol.java:602)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Please help.
Thanks,
Kavitha.
--
View this message in context:
http://drools.46999.n3.nabble.com/Groovy-
classes-as-fact-classes-in-drool-tp3670101p3670101.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received
this message in error, please immediately notify the postmaster(a)nds.com and delete it from
your system as well as any copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the environment please
do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United
Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603
8808 40-00
**************************************************************************************