Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7289

cannot run testng tests from JBDS for an imported project generated by seam-gen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.2 ER2
    • EAP_EWP 5.1.2 ER1
    • Seam2
    • None
    • EWP 5.1.2 ER1, JBDS 4.1.1.M1

    • Hide

      1. use seam-gen to generate an EAR project
      2. use seam-gen to generate at least one action (seam new-action) so we have at least one test
      3. import the generated project into JBDS
      4. follow instructions in src/test/readme.txt
      5. notice the error

      Show
      1. use seam-gen to generate an EAR project 2. use seam-gen to generate at least one action (seam new-action) so we have at least one test 3. import the generated project into JBDS 4. follow instructions in src/test/readme.txt 5. notice the error
    • Hide

      add lib/ecj.jar to the project build path manually in JBDS after importing the project

      Show
      add lib/ecj.jar to the project build path manually in JBDS after importing the project
    • Hide
      TestNG threw a RuntimeException with the message "The Eclipse JDT Core jar is not in the classpath" if the user imported a seam-gen project into JDBS and run the TestNG test. With this update the Eclipse JDT Core jar has been added to the classpath and the TestNG test runs on such projects as expected.
      Show
      TestNG threw a RuntimeException with the message "The Eclipse JDT Core jar is not in the classpath" if the user imported a seam-gen project into JDBS and run the TestNG test. With this update the Eclipse JDT Core jar has been added to the classpath and the TestNG test runs on such projects as expected.
    • Not Required
    • NEW

    Description

      After importing a seam-gen generated EAR project and following instructions in src/test/readme.txt, the testng test fails with the following exception.

      Problem seems to be that lib/ecj.jar is missing in seam/seam-gen/ide-project-files/eclipse/.classpath as adding lib/ecj.jar to the project classpath seems to fix the problem.

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.security.ruleBasedPermissionResolver
      at org.jboss.seam.Component.newInstance(Component.java:2170)
      at org.jboss.seam.contexts.Contexts.startup(Contexts.java:305)
      at org.jboss.seam.contexts.Contexts.startup(Contexts.java:279)
      at org.jboss.seam.contexts.Lifecycle.beginSession(Lifecycle.java:233)
      at org.jboss.seam.contexts.ServletLifecycle.beginSession(ServletLifecycle.java:181)
      at org.jboss.seam.mock.AbstractSeamTest.begin(AbstractSeamTest.java:898)
      at org.jboss.seam.mock.SeamTest.begin(SeamTest.java:31)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:613)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.runWorkers(TestRunner.java:1125)
      at org.testng.TestRunner.privateRun(TestRunner.java:749)
      at org.testng.TestRunner.run(TestRunner.java:600)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
      at org.testng.SuiteRunner.run(SuiteRunner.java:223)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:995)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:920)
      at org.testng.TestNG.run(TestNG.java:856)
      at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:110)
      at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)
      Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: securityRules
      at org.jboss.seam.Component.newInstance(Component.java:2170)
      at org.jboss.seam.Component.getInstance(Component.java:2024)
      at org.jboss.seam.Component.getInstance(Component.java:1986)
      at org.jboss.seam.Component.getInstance(Component.java:1980)
      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:148)
      at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51)
      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
      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:157)
      at org.jboss.seam.Component$ELInitialValue.getValue(Component.java:2557)
      at org.jboss.seam.Component.initialize(Component.java:1530)
      at org.jboss.seam.Component.postConstructJavaBean(Component.java:1456)
      at org.jboss.seam.Component.postConstruct(Component.java:1379)
      at org.jboss.seam.Component.newInstance(Component.java:2155)
      ... 33 more
      Caused by: org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
      at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:283)
      at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:268)
      at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:181)
      at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:159)
      at org.jboss.seam.drools.RuleBase.compileRuleBase(RuleBase.java:46)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
      at org.jboss.seam.Component.callComponentMethod(Component.java:2275)
      at org.jboss.seam.Component.callCreateMethod(Component.java:2198)
      at org.jboss.seam.Component.newInstance(Component.java:2158)
      ... 49 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:94)
      at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:55)
      at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:279)
      ... 62 more

      Attachments

        Activity

          People

            mnovotny@redhat.com Marek Novotny
            maschmid@redhat.com Marek Schmidt
            Eva Kopalova Eva Kopalova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: