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).


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…


1. Define a child project which only contains only your fact model, and make sure you do not import any dependencies!
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.

2. Use the Maven Jar plugin to generate a Jar, which only contains your facts:
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.
Example: https://gist.github.com/3609258

3. Use the Maven Shade plugin to generate a Jar containing your facts and absolutely every dependency it has:
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.
Example: https://gist.github.com/3609269


Steve


On 3 Sep 2012, at 13:08, "devan.vanreenen@gmail.com" <devan.vanreenen@gmail.com> wrote:

There are dependencies on external classes, but the model is quite large so
not quite sure which dependencies to check, we make extensive use of
hibernate, so imported the necesssary hibernate jar to Guvnor with no luck
as well.

I will try the executing using DRL outside of Guvnor and feedback.



--
View this message in context: http://drools.46999.n3.nabble.com/ClassNotFoundException-tp4019536p4019545.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users