Quantcast

[rules-users] drools-spring drools-grid-impl dependency

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[rules-users] drools-spring drools-grid-impl dependency

Tommy Odom
Hi,

I was attempting to try an upgrade from drools 5.1.1 today to 5.2.0.M2 but I ran into a problem with using the drools-spring artifact.  Since drools-spring needs access to the GridNode it has a dependency on drools-grid-impl which in turn has dependencies on hibernate & JPA 1.0 and includes a persistence.xml file.  I was able to work around the hibernate and JPA 1.0 dependencies using maven exclusion rules but it appears that the included persistence.xml is causing problems with my own configuration locating its persistence unit.

Would it be possible to extract the grid classes that drools-spring is dependent on out into a drools-grid artifact that instead of depending on the full impl?  Either that or does anyone have any suggestions for making sure my persistence.xml in my WAR takes precedence over the one in the JAR?

Thanks!
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [rules-users] drools-spring drools-grid-impl dependency

harjotnarula09
Hi

Did you try putting your persistence.xml (with same persistence unit name) in META-INF folder in your classpath? That should override the persistence.xml packaged with the jar.

Regards
Harjot Narula

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Tommy Odom
Sent: Tuesday, May 17, 2011 2:29 PM
To: [hidden email]
Subject: [rules-users] drools-spring drools-grid-impl dependency

Hi,

I was attempting to try an upgrade from drools 5.1.1 today to 5.2.0.M2 but I ran into a problem with using the drools-spring artifact.  Since drools-spring needs access to the GridNode it has a dependency on drools-grid-impl which in turn has dependencies on hibernate & JPA 1.0 and includes a persistence.xml file.  I was able to work around the hibernate and JPA 1.0 dependencies using maven exclusion rules but it appears that the included persistence.xml is causing problems with my own configuration locating its persistence unit.

Would it be possible to extract the grid classes that drools-spring is dependent on out into a drools-grid artifact that instead of depending on the full impl?  Either that or does anyone have any suggestions for making sure my persistence.xml in my WAR takes precedence over the one in the JAR?

Thanks!
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [rules-users] drools-spring drools-grid-impl dependency

Tommy Odom
I tried modifying the drools-grid-impl JAR file to remove the persistence.xml file, that is apparently not the problem because I still get the same persistence unit error.  I'm not sure what the problem is but I can switch between my two branches and the only difference between the two is one has maven dependencies set to drools 5.2.0.M2 instead of 5.1.1 (and a few process listener & planner class updates to fix compilation errors).

I'll have to do some more debugging later when I have some more time.

In my WAR file I have my persistence.xml under WEB-INF/classes/META-INF/.

On May 17, 2011, at 5:36 PM, Harjot Singh wrote:

> Hi
>
> Did you try putting your persistence.xml (with same persistence unit name) in META-INF folder in your classpath? That should override the persistence.xml packaged with the jar.
>
> Regards
> Harjot Narula
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Tommy Odom
> Sent: Tuesday, May 17, 2011 2:29 PM
> To: [hidden email]
> Subject: [rules-users] drools-spring drools-grid-impl dependency
>
> Hi,
>
> I was attempting to try an upgrade from drools 5.1.1 today to 5.2.0.M2 but I ran into a problem with using the drools-spring artifact.  Since drools-spring needs access to the GridNode it has a dependency on drools-grid-impl which in turn has dependencies on hibernate & JPA 1.0 and includes a persistence.xml file.  I was able to work around the hibernate and JPA 1.0 dependencies using maven exclusion rules but it appears that the included persistence.xml is causing problems with my own configuration locating its persistence unit.
>
> Would it be possible to extract the grid classes that drools-spring is dependent on out into a drools-grid artifact that instead of depending on the full impl?  Either that or does anyone have any suggestions for making sure my persistence.xml in my WAR takes precedence over the one in the JAR?
>
> Thanks!
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users

Tommy Odom
FineLine Prototyping, Inc.
c: 919-675-2801
p: 919-781-7702 x201





_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [rules-users] drools-spring drools-grid-impl dependency

Tommy Odom
In reply to this post by harjotnarula09
I was able to get drools 5.2 to deploy after removing the persistence.xml from the drools-grid-impl jar file.

The problem is that one of my classes expects a single persistence unit to exist in the WAR because it is used across multiple WARs that use different persistence unit names.  It appears that Glassfish is seeing both persistence.xmls and setting up multiple PUs.  

I can figure out a way to rework the design so that it still works but it still seems like a reasonable request that drools-spring not depend on the full grid implementation and all of its dependencies.

On May 17, 2011, at 5:36 PM, Harjot Singh wrote:

> Hi
>
> Did you try putting your persistence.xml (with same persistence unit name) in META-INF folder in your classpath? That should override the persistence.xml packaged with the jar.
>
> Regards
> Harjot Narula
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Tommy Odom
> Sent: Tuesday, May 17, 2011 2:29 PM
> To: [hidden email]
> Subject: [rules-users] drools-spring drools-grid-impl dependency
>
> Hi,
>
> I was attempting to try an upgrade from drools 5.1.1 today to 5.2.0.M2 but I ran into a problem with using the drools-spring artifact.  Since drools-spring needs access to the GridNode it has a dependency on drools-grid-impl which in turn has dependencies on hibernate & JPA 1.0 and includes a persistence.xml file.  I was able to work around the hibernate and JPA 1.0 dependencies using maven exclusion rules but it appears that the included persistence.xml is causing problems with my own configuration locating its persistence unit.
>
> Would it be possible to extract the grid classes that drools-spring is dependent on out into a drools-grid artifact that instead of depending on the full impl?  Either that or does anyone have any suggestions for making sure my persistence.xml in my WAR takes precedence over the one in the JAR?
>
> Thanks!
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users

Tommy Odom
FineLine Prototyping, Inc.
c: 919-675-2801
p: 919-781-7702 x201





_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [rules-users] drools-spring drools-grid-impl dependency

salaboy
Hi Tommy,
We are still refactoring grid, and we will probably include just drools-grid-api as direct dependency of drools-spring.
From my perspective it makes perfectly sense to be able to configure where the session will be executed inside the spring configuration.
We will try to remove all the unnecessary dependencies but  we need some time to refactor how grid looks like right now.
If the problem is the persistence.xml file we can take a look to find a workaround or  fix it directly.
Greetings.

On Wed, May 18, 2011 at 9:26 AM, Tommy Odom <[hidden email]> wrote:
I was able to get drools 5.2 to deploy after removing the persistence.xml from the drools-grid-impl jar file.

The problem is that one of my classes expects a single persistence unit to exist in the WAR because it is used across multiple WARs that use different persistence unit names.  It appears that Glassfish is seeing both persistence.xmls and setting up multiple PUs.

I can figure out a way to rework the design so that it still works but it still seems like a reasonable request that drools-spring not depend on the full grid implementation and all of its dependencies.

On May 17, 2011, at 5:36 PM, Harjot Singh wrote:

> Hi
>
> Did you try putting your persistence.xml (with same persistence unit name) in META-INF folder in your classpath? That should override the persistence.xml packaged with the jar.
>
> Regards
> Harjot Narula
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Tommy Odom
> Sent: Tuesday, May 17, 2011 2:29 PM
> To: [hidden email]
> Subject: [rules-users] drools-spring drools-grid-impl dependency
>
> Hi,
>
> I was attempting to try an upgrade from drools 5.1.1 today to 5.2.0.M2 but I ran into a problem with using the drools-spring artifact.  Since drools-spring needs access to the GridNode it has a dependency on drools-grid-impl which in turn has dependencies on hibernate & JPA 1.0 and includes a persistence.xml file.  I was able to work around the hibernate and JPA 1.0 dependencies using maven exclusion rules but it appears that the included persistence.xml is causing problems with my own configuration locating its persistence unit.
>
> Would it be possible to extract the grid classes that drools-spring is dependent on out into a drools-grid artifact that instead of depending on the full impl?  Either that or does anyone have any suggestions for making sure my persistence.xml in my WAR takes precedence over the one in the JAR?
>
> Thanks!
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users

Tommy Odom
FineLine Prototyping, Inc.
c: 919-675-2801
p: 919-781-7702 x201





_______________________________________________



--
 - CTO @ http://www.plugtree.com 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -

_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Loading...