Guvnor doesn't use OSGi.

The stack trace suggests the JAR you are has a dependency on OSGi:-

org.drools.guvnor.server.contenthandler.ModelContentHandler.getImportsFromJar.

The remainder of the stack trace relates to trying to load the imported class.

2012/1/9 Mike Key <mikey@zenbitz.com>
Hi all,

I have installed Guvnor 5.3.0-Final on a fresh Tomcat 7.0.12.  I am able to import existing rules I have, however when I try to upload my fact model I get an error in the localhost log file:

SEVERE: Servlet.service() for servlet [AssetFileServlet] in context with path [/guvnor-5.3.0.Final-tomcat-6.0] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator
>...at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
>...at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
>...at java.lang.Class.forName0(Native Method)
>...at java.lang.Class.forName(Class.java:247)
>...at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:109)
>...at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>...at java.lang.ClassLoader.defineClass1(Native Method)
>...at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>...at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>...at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:86)
>...at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:104)
>...at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>...at org.drools.guvnor.server.contenthandler.ModelContentHandler.isClassVisible(ModelContentHandler.java:183)
>...at org.drools.guvnor.server.contenthandler.ModelContentHandler.getImportsFromJar(ModelContentHandler.java:148)
>...at org.drools.guvnor.server.contenthandler.ModelContentHandler.onAttachmentAdded(ModelContentHandler.java:66)
>...at org.drools.guvnor.server.files.FileManagerUtils.attachFileToAsset(FileManagerUtils.java:115)
>...at org.drools.guvnor.server.files.FileManagerUtils.attachFile(FileManagerUtils.java:87)
>...at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>...at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>...at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>...at java.lang.reflect.Method.invoke(Method.java:597)
>...at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
>...at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
>...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
>...at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
>...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
>...at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
>...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
>...at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
>...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
>...at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)
>...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
>...at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
>...at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
>...at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)

I am attempting to upload a jar with all dependencies it uses (which includes JPA annotations and JAXB annotations).  I have verified that the jar contains all its proper dependencies.  This message seems to indicate I am missing some OSGi jar or something that I would have expected to be delivered with Guvnor.  Do I need some sort of global libraries for OSGi to run Guvnor or to use my model when it has these external dependencies in the jar?

Any help on this is greatly appreciated.

Cheers.

Mike Key

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users