Closing my own loop on this one in case anyone else runs into this issue.  As Michael mentioned this is definitely not a guvnor issue.  The issue is I am importing JPA libraries as part of my model as my classes are annotated for JPA.  Our JPA provider is Eclipselink and it seems the Eclipselink JPA spec jar is delivered as an OSGi enabled jar.  This causes the error when loading my jar into guvnor.  However after the error all of my assets are visible and things seem to work fine...so for anyone who sees this error by chance, you can ignore it it seems.<div>
<br></div><div>I did also try including the OSGi libraries into tomcats libs, this leads down a path of needing several other libs and really adds no value except to avoid the harmless stack trace.</div><div><br></div><div>
Mike Key<br><br><div class="gmail_quote">On Tue, Jan 10, 2012 at 9:40 AM, Mike Key <span dir="ltr">&lt;<a href="mailto:mikey@zenbitz.com">mikey@zenbitz.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the response Michael.  I did get past the error by adding an OSGi jar to tomcat&#39;s libs.  The curious thing is that I&#39;m loading a jar from a maven build (actually an assembly with all dependencies added to the jar).  The jar itself does not have this class, and if I do a mvn dependency:tree I never see OSGi mentioned in any dependencies or transitive dependencies of my entire source tree.<div>

<br></div><div>At this point it may not be a question for this list, but I did try the same thing using JBoss AS 7 and the issue does not exist there.  Does anyone happen to know if perhaps how guvnor is asking tomcat to load the classes may be what is requiring OSGi?  Not sure how the tomcat 7 class loader works.</div>

<div><br></div><div>Like I said I realize this is not really a Drools or Guvnor question at this point, but hopefully someone on the list may know?</div><div><br></div><div>Thanks again for the response.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div>
<div>Mike</div></font></span><div class="HOEnZb"><div class="h5"><div><br><div class="gmail_quote">2012/1/10 Michael Anstis <span dir="ltr">&lt;<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Guvnor doesn&#39;t use OSGi.<br><br>The stack trace suggests the JAR you are has a dependency on OSGi:-<br><br><div style="margin-left:40px">org.drools.guvnor.server.contenthandler.ModelContentHandler.getImportsFromJar.<br>


</div><br>The remainder of the stack trace relates to trying to load the imported class.<br><br><div class="gmail_quote">2012/1/9 Mike Key <span dir="ltr">&lt;<a href="mailto:mikey@zenbitz.com" target="_blank">mikey@zenbitz.com</a>&gt;</span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi all,<div><br></div><div>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:</div>



<div><br></div><div><div>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</div><div>java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator</div>



<div>&gt;...at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)</div><div>&gt;...at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)</div><div>&gt;...at java.lang.Class.forName0(Native Method)</div>



<div>&gt;...at java.lang.Class.forName(Class.java:247)</div><div>&gt;...at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:109)</div><div>&gt;...at java.lang.ClassLoader.loadClass(ClassLoader.java:247)</div>



<div>&gt;...at java.lang.ClassLoader.defineClass1(Native Method)</div><div>&gt;...at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)</div><div>&gt;...at java.lang.ClassLoader.defineClass(ClassLoader.java:615)</div>



<div>&gt;...at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:86)</div><div>&gt;...at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:104)</div><div>&gt;...at java.lang.ClassLoader.loadClass(ClassLoader.java:247)</div>



<div>&gt;...at org.drools.guvnor.server.contenthandler.ModelContentHandler.isClassVisible(ModelContentHandler.java:183)</div><div>&gt;...at org.drools.guvnor.server.contenthandler.ModelContentHandler.getImportsFromJar(ModelContentHandler.java:148)</div>



<div>&gt;...at org.drools.guvnor.server.contenthandler.ModelContentHandler.onAttachmentAdded(ModelContentHandler.java:66)</div><div>&gt;...at org.drools.guvnor.server.files.FileManagerUtils.attachFileToAsset(FileManagerUtils.java:115)</div>



<div>&gt;...at org.drools.guvnor.server.files.FileManagerUtils.attachFile(FileManagerUtils.java:87)</div><div>&gt;...at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>&gt;...at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</div>



<div>&gt;...at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</div><div>&gt;...at java.lang.reflect.Method.invoke(Method.java:597)</div><div>&gt;...at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)</div>



<div>&gt;...at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)</div><div>&gt;...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)</div><div>&gt;...at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)</div>



<div>&gt;...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)</div><div>&gt;...at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)</div><div>&gt;...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)</div>



<div>&gt;...at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)</div><div>&gt;...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)</div><div>



&gt;...at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)</div><div>&gt;...at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)</div><div>&gt;...at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)</div>



<div>&gt;...at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)</div><div>&gt;...at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)</div></div>



<div><br></div><div>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?</div>



<div><br></div><div>Any help on this is greatly appreciated.</div><div><br></div><div>Cheers.</div><span><font color="#888888"><div><br></div><div>Mike Key</div>
</font></span><br></div></div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>