Re: CDI @Requires issue with Tomee

2012-07-08 Thread David Blevins
On Jul 7, 2012, at 11:16 PM, zeeman wrote: I removed Drools jar and its dependencies (Drools API, compiler, and core). I get below stack trace: If I keep above, Tomee starts fine. You can reproduce the issue by using a maven project that has a Seam security dependency and deploy it without

Re: CDI @Requires issue with Tomee

2012-07-08 Thread zeeman
I have put a sample project https://github.com/z00/test in POM.xml if you comment out dependency on line 301, you'll get the below error. If you keep it enabled (default) Tomee will work fine. Here is the full Tomee log: Jul 8, 2012 12:56:24 PM org.apache.catalina.core.AprLifecycleListener

Re: CDI @Requires issue with Tomee

2012-07-08 Thread zeeman
There might be an issue with Seam security and how it depends on drools. Maybe it should be 2 different jars. But from Tomee perceptive; I'm guessing an app should deploy, if a method is called on a bean with a @requires that's not satisfied then the class not found exception would be displayed.

Re: CDI @Requires issue with Tomee

2012-07-08 Thread Romain Manni-Bucau
hmm @Requires is not in CDI but in seam so maybe there is an issue with it. - Romain 2012/7/8 zeeman hamz...@fastmail.us There might be an issue with Seam security and how it depends on drools. Maybe it should be 2 different jars. But from Tomee perceptive; I'm guessing an app should

Detected Reentrant Flush

2012-07-08 Thread David Nordahl
I'm attempting the code: Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, org.apache.openejb.client.LocalInitialContextFactory); InitialContext initialContext = new InitialContext(properties); Object object =

Re: Detected Reentrant Flush

2012-07-08 Thread Romain Manni-Bucau
Hi, any entity listener playing with id or special field on User entity? - Romain 2012/7/8 David Nordahl da...@thinkology.org I'm attempting the code: Properties properties = new Properties(); properties.setProperty(**Context.INITIAL_CONTEXT_**FACTORY,

Re: Detected Reentrant Flush

2012-07-08 Thread Romain Manni-Bucau
can you share a small sample to reproduce it, will be easier to help you? - Romain 2012/7/8 David Nordahl da...@thinkology.org Not that I've configured.. Unless one of the annotations creates one: @Entity @Table(name = user) @XmlRootElement @NamedQueries({ @NamedQuery(name =

Re: Detected Reentrant Flush

2012-07-08 Thread David Nordahl
Maybe the DB settings could have something to do with it? I'm using MySQL with it's default setup which uses InnoDB. I notice in the documentation that InnoDB, with innodb_flush_log_at_trx_commit set to 1, flushes the transaction log after each transaction, greatly improving reliability.

Re: Detected Reentrant Flush

2012-07-08 Thread Romain Manni-Bucau
i can't say no but i'm pretty sure it is something in the container rather in the DB. - Romain 2012/7/8 David Nordahl da...@thinkology.org Maybe the DB settings could have something to do with it? I'm using MySQL with it's default setup which uses InnoDB. I notice in the documentation that

Re: CDI @Requires issue with Tomee

2012-07-08 Thread zeeman
jBoss Solder is what processes annotated @Required classes. You're right it's not from CDI. The class that does annotation processing from Solder is CoreExtension. I tried to veto the org.drools.KnowledgeBased package in @Required on Seam security RuleBasedPermissionResolver but I was not able

Re: Detected Reentrant Flush

2012-07-08 Thread David Nordahl
Could it be the Tomcat JDBCRealm I have enforcing container managed security from user data in the same table? On 7/8/2012 4:14 PM, Romain Manni-Bucau wrote: i can't say no but i'm pretty sure it is something in the container rather in the DB. - Romain 2012/7/8 David

Re: CDI @Requires issue with Tomee

2012-07-08 Thread Romain Manni-Bucau
not sure (= didnt try) but maybe trying to play with alternative can do the trick the idea is to simply replace the class by another one. Do you have idea of the classes needed? if you only need some classes without their API maybe mocking them is the easier (i'd personally try it) - Romain

Re: Detected Reentrant Flush

2012-07-08 Thread Romain Manni-Bucau
i don't think so, can you try moving your code in a unit test to see if it still happen? - Romain 2012/7/8 David Nordahl da...@thinkology.org Could it be the Tomcat JDBCRealm I have enforcing container managed security from user data in the same table? On 7/8/2012 4:14 PM, Romain

Re: Detected Reentrant Flush

2012-07-08 Thread David Nordahl
Btw.. Is it normal to have these exceptions on startup? I saw another post saying they were, but I thought I might double check. I seem to be able to query through open EJB, but not update and add. I'm also wondering if there is anyway that the reentrant flush error is covering up another

Re: Detected Reentrant Flush

2012-07-08 Thread Romain Manni-Bucau
hmm you use tomee 1.0.0 can you give it a try to the snapshot please? we worked a bit on netbeans integration. - Romain 2012/7/8 David Nordahl da...@thinkology.org Btw.. Is it normal to have these exceptions on startup? I saw another post saying they were, but I thought I might double

Re: CDI @Requires issue with Tomee

2012-07-08 Thread zeeman
I tried using an alternative but I get the same validation stack trace. Any idea? I implemented the interface PermissionResolver, which the class with @Required implements. Added @Alternative to my class, and added Alternative element to beans.xml Anything else? -- View this message in

Re: CDI @Requires issue with Tomee

2012-07-08 Thread Romain Manni-Bucau
hmm are you sure the alternative was activated? did you use WEB-INF/beans.xml? well if it doesn't work the mock is the easier solution maybe get in touch with JBoss to see how (or if) @Requires should work in other containers... - Romain 2012/7/9 zeeman hamz...@fastmail.us I tried using an

Re: Detected Reentrant Flush

2012-07-08 Thread David Nordahl
Tried the snap shot.. I get an error in Netbeans saying that it can't deploy the app and to check the server log, yet the server log has no errors and shows the app deploying successfully yet I cannot open the web host in the browser. I give up... I could have written all the middle ware

Re: CDI @Requires issue with Tomee

2012-07-08 Thread zeeman
I mocked drools classes under their own package. I get below: It would have been nice to get the alternative to work, but it does not seem to get picked up. java.lang.VerifyError: (class: org/jboss/seam/security/permission/RuleBasedPermissionResolver, method: synchronizeContext signature: ()V)

Re: Detected Reentrant Flush

2012-07-08 Thread Martin Kjær Jørgensen
I've experienced the same in my application. My entities have generated id's as well, and i fixed it by removing optinal = false from the @Basic annotation of the @Id field, like so: public class User implements Serializable { private static final long serialVersionUID = 1L; @Id

Re: Detected Reentrant Flush

2012-07-08 Thread David Nordahl
It worked Awesome. Thank you On 7/8/2012 10:05 PM, Martin Kjær Jørgensen wrote: I've experienced the same in my application. My entities have generated id's as well, and i fixed it by removing optinal = false from the @Basic annotation of the @Id field, like so: public class User

Re: Detected Reentrant Flush

2012-07-08 Thread Romain Manni-Bucau
You should at least share your logs or (better) a sample otherwise helping you is hard. Generally it is faster than 'trying' things. - Romun Le 9 juil. 2012 03:20, David Nordahl da...@thinkology.org a écrit : Tried the snap shot.. I get an error in Netbeans saying that it can't deploy the app

Re: CDI @Requires issue with Tomee

2012-07-08 Thread Romain Manni-Bucau
Hmm, means you need to add used methods. Not sure why alternative doesnt work. Can you update your sample please (and remove skipcurrent project fron tomee plugin and remove the finalname)? Le 9 juil. 2012 04:00, zeeman hamz...@fastmail.us a écrit : I mocked drools classes under their own