<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Where Vincent mentions using XML config for adding persistence to simple POJO models, something I started experimenting with a while back, was to create very basic fact models in one project and have a separate project which added persistence and other features using AOP. I don't suppose anyone else has played with that idea and had much success? I was finding some 'aspects' of AOP somewhat messy (for one thing, my Eclipse IDE tended to fall over).</div><div><br></div><div><br></div><div>In case you're using Maven, here are a few things I have used on different occasions to help with the external dependencies issue. You may well be doing something like this anyway, but just in case…</div><div><br></div><div><br></div><div>1. Define a child project which only contains only your fact model, and make sure you do not import any dependencies!</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>A lot of boilerplate config, but you will end up with a Jar containing only those facts you define. If your project compiles, then you know for sure that you don't have any external dependencies.</div><div><br></div><div>2. Use the Maven Jar plugin to generate a Jar, which only contains your facts:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Neat if you already have a project with some model classes, and you want to ensure that the POJO you upload only contains facts required by Guvnor.</div><div>Example:&nbsp;<a href="https://gist.github.com/3609258">https://gist.github.com/3609258</a></div><div><br></div><div>3. Use the Maven Shade plugin to generate a Jar containing your facts and absolutely every dependency it has:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Using this bad boy will almost certainly give you a load of grief if you try using it as your POJO model Jar. But if you're whacking Jars in a Tomcat lib directory, then it can be a good way of keeping the number of Jars under control. i.e. You only need to release a single Jar file and it contains all the dependencies you need.</div><div>Example:&nbsp;<a href="https://gist.github.com/3609269">https://gist.github.com/3609269</a></div><div><br></div><div><br></div><div>Steve</div><div><br></div><br><div><div>On 3 Sep 2012, at 13:08, "<a href="mailto:devan.vanreenen@gmail.com">devan.vanreenen@gmail.com</a>" &lt;<a href="mailto:devan.vanreenen@gmail.com">devan.vanreenen@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">There are dependencies on external classes, but the model is quite large so<br>not quite sure which dependencies to check, we make extensive use of<br>hibernate, so imported the necesssary hibernate jar to Guvnor with no luck<br>as well.<br><br>I will try the executing using DRL outside of Guvnor and feedback.<br><br><br><br>--<br>View this message in context: <a href="http://drools.46999.n3.nabble.com/ClassNotFoundException-tp4019536p4019545.html">http://drools.46999.n3.nabble.com/ClassNotFoundException-tp4019536p4019545.html</a><br>Sent from the Drools: User forum mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></body></html>