[jboss-user] [JBoss Seam] - Re: SeamTest breaks on drools 4.0

dmitriy.lapko do-not-reply at jboss.com
Mon Jul 30 18:54:11 EDT 2007


I had the same problem and went by second way proposed ellenzhao (thank you :) )

Just add to /resources/META-INF file drools.default.packagebuilder.conf
with next contents:

drools.dialect.default = java
  | drools.dialect.java = org.drools.rule.builder.dialect.java.JavaDialectConfiguration
  | drools.dialect.java.compiler = JANINO
  | 
  | drools.dialect.mvel = org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration
  | drools.dialect.mvel.strict = true
  | 
  | drools.accumulate.function.average = org.drools.base.accumulators.AverageAccumulateFunction
  | drools.accumulate.function.max = org.drools.base.accumulators.MaxAccumulateFunction
  | drools.accumulate.function.min = org.drools.base.accumulators.MinAccumulateFunction
  | drools.accumulate.function.count = org.drools.base.accumulators.CountAccumulateFunction
  | drools.accumulate.function.sum = org.drools.base.accumulators.SumAccumulateFunction

and add janino-2.5.7.jar into classpath.

Next problem I experienced in tests was NoCacheProviderException, I fixed it by adding 

         <property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider"/>

into persistence.xml.

Also after some manipulation tests successfully worked (I have both component and integration tests).

Some experienced problems: 
1) I compiled seam under JDK 1.6 but tests failed to start in JRE 1.6 because jboss-embedded-all.jar is build under JDK 1.5 and can not be started in 1.6 (the problem with Class.forName and loadClass methods), so I rebuilt seam under JDK 1.5 and start it in JRE 1.5.
2) Output dir in Eclipse project should contain only one *-ds.xml, so just exclude other from class path to prevent error with already added datasource

And when I managed to start my tests, they work so slowly!!! I think, it is awful... How can I practice TDD with SEAM??? Everything is bound to its environment, and for tests I have to start so many stuff... I'm in despair... Someone, give me a hope!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068940#4068940

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068940



More information about the jboss-user mailing list