[jboss-user] [JBoss Tools (users)] - Runnigs test

hispeedsurfer do-not-reply at jboss.com
Sat Feb 23 10:52:40 EST 2008


Hi,

I have problem to runnig tests inside a Seam Web Project using the JBoss Tools IDE.

Environment: JBoss Tools 2.0.GA, Seam 2.0.1.GA

When I create a new Seam Web (ear)Project with a simple Seam Action and try to run TestNG test as discriped in 'Seam Dev Tools Reference Guide'  the first excetion is 
[Parser] Running:
  |   V:\workspaces\datenvisualisierung\testproject-test\test-src\org\domain\testproject\test\ActionTest.xml
  | 
  | WARN  [org.jboss.seam.init.Initialization] Did not install PojoCache due to NoClassDefFoundError: org/jgroups/MembershipListener
  | INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
  | INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
  | FAILED CONFIGURATION: @BeforeMethod begin
  | org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.security.identity
  | 	at org.jboss.seam.Component.newInstance(Component.java:1970)
  | 	at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
  | 	at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
  | 	at org.jboss.seam.contexts.Lifecycle.beginSession(Lifecycle.java:191)
  | 	at org.jboss.seam.contexts.ServletLifecycle.beginSession(ServletLifecycle.java:124)
  | 	at org.jboss.seam.mock.BaseSeamTest.begin(BaseSeamTest.java:912)
  | 	at org.jboss.seam.mock.SeamTest.begin(SeamTest.java:28)
  | Caused by: org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
  | 	at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:152)
  | 	at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:140)
  | 	at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:117)
  | 	at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:94)
  | 	at org.jboss.seam.drools.RuleBase.compileRuleBase(RuleBase.java:40)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  | 	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
  | 	at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
  | 	at org.jboss.seam.Component.callCreateMethod(Component.java:2005)
  | 	at org.jboss.seam.Component.newInstance(Component.java:1976)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1873)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1840)
  | 	at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
  | 	at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
  | 	at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
  | 	at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
  | 	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
  | 	at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
  | 	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
  | 	at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
  | 	at org.jboss.seam.Component$ELInitialValue.getValue(Component.java:2360)
  | 	at org.jboss.seam.Component.initialize(Component.java:1389)
  | 	at org.jboss.seam.Component.instantiateJavaBean(Component.java:1315)
  | 	at org.jboss.seam.Component.instantiate(Component.java:1268)
  | 	at org.jboss.seam.Component.newInstance(Component.java:1966)
  | 	... 30 more
  | Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath
  | 	at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:93)
  | 	at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:54)
  | 	at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:148)
  | 	... 58 more
  | ... Removed 28 stack frames
  | SKIPPED CONFIGURATION: @AfterMethod end
  | SKIPPED CONFIGURATION: @AfterClass cleanup
  | SKIPPED: test
  | 
  | ===============================================
  |     Action Test
  |     Tests run: 1, Failures: 0, Skips: 1
  |     Configuration Failures: 1, Skips: 2
  | ===============================================
  | 
  | 
  | ===============================================
  | Action Tests
  | Total tests run: 1, Failures: 0, Skips: 1
  | Configuration Failures: 1, Skips: 2
  | ===============================================
  | 
After this i putted org.eclipse.jdt.core_3.3.1.v_780_R33x.jar from Eclipse installation to classpath and the following error occurs:
[Parser] Running:
  |   V:\workspaces\datenvisualisierung\testproject-test\test-src\org\domain\testproject\test\ActionTest.xml
  | 
  | WARN  [org.jboss.seam.init.Initialization] Did not install PojoCache due to NoClassDefFoundError: org/jgroups/MembershipListener
  | INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
  | INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
  | INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
  | FAILED CONFIGURATION: @BeforeMethod begin
  | org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.security.identity
  | 	at org.jboss.seam.Component.newInstance(Component.java:1970)
  | 	at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
  | 	at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
  | 	at org.jboss.seam.contexts.Lifecycle.beginSession(Lifecycle.java:191)
  | 	at org.jboss.seam.contexts.ServletLifecycle.beginSession(ServletLifecycle.java:124)
  | 	at org.jboss.seam.mock.BaseSeamTest.begin(BaseSeamTest.java:912)
  | 	at org.jboss.seam.mock.SeamTest.begin(SeamTest.java:28)
  | Caused by: java.lang.IllegalStateException: could not locate rule file: /security.drl
  | 	at org.jboss.seam.drools.RuleBase.compileRuleBase(RuleBase.java:51)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  | 	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
  | 	at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
  | 	at org.jboss.seam.Component.callCreateMethod(Component.java:2005)
  | 	at org.jboss.seam.Component.newInstance(Component.java:1976)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1873)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1840)
  | 	at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
  | 	at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
  | 	at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
  | 	at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
  | 	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
  | 	at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
  | 	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
  | 	at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
  | 	at org.jboss.seam.Component$ELInitialValue.getValue(Component.java:2360)
  | 	at org.jboss.seam.Component.initialize(Component.java:1389)
  | 	at org.jboss.seam.Component.instantiateJavaBean(Component.java:1315)
  | 	at org.jboss.seam.Component.instantiate(Component.java:1268)
  | 	at org.jboss.seam.Component.newInstance(Component.java:1966)
  | 	... 30 more
  | ... Removed 28 stack frames
  | SKIPPED CONFIGURATION: @AfterMethod end
  | SKIPPED CONFIGURATION: @AfterClass cleanup
  | SKIPPED: test
  | 
  | ===============================================
  |     Action Test
  |     Tests run: 1, Failures: 0, Skips: 1
  |     Configuration Failures: 1, Skips: 2
  | ===============================================
  | 
  | 
  | ===============================================
  | Action Tests
  | Total tests run: 1, Failures: 0, Skips: 1
  | Configuration Failures: 1, Skips: 2
  | ===============================================

Than I removed securityRules from component.xml and all is ok
<!--drools:rule-base name="securityRules">
  |        <drools:rule-files>
  |            <value>/security.drl</value>
  |        </drools:rule-files>
  |    </drools:rule-base-->
  | 
  |    <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>

Is this a kown problem or what's wrong in my case?

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

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



More information about the jboss-user mailing list