1 Reply Latest reply on Oct 23, 2008 12:40 AM by Michel Jazz

    Test failled

    Michel Jazz Newbie

      Hi,
      I have a seam tools project (with wicket as frontend) and i just tried to test my EJB into the JBoss Embedded :



      public class UserActionTest extends SeamTest {
           @In UserAction userAction;
           
           @Test
           public void testUserActionCreate() throws Exception {
                User user = new User();
                user.setAdmin(true);
                user.setEnabled(true);
                user.setFirstname("Oncle");
                user.setLastname("Zebulon");
                user.setPasswordHash("password");
                user.setUsername("onclezeb");
                user = userAction.create(user);
                System.out.println(user.getUserId());
           }
      }
      


      Here what i get :




      FAILED CONFIGURATION: @BeforeSuite startSeam
      java.lang.ClassFormatError: Illegal class modifiers in class org/jboss/seam/wicket/package-info: 0x1600



      at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
           at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
           at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
           at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
           at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at org.jboss.seam.deployment.NamespaceDeploymentHandler.getPackage(NamespaceDeploymentHandler.java:69)
           at org.jboss.seam.deployment.NamespaceDeploymentHandler.handle(NamespaceDeploymentHandler.java:44)
           at org.jboss.seam.deployment.DeploymentStrategy.handle(DeploymentStrategy.java:105)
           at org.jboss.seam.deployment.AbstractScanner.handleItem(AbstractScanner.java:30)
           at org.jboss.seam.deployment.URLScanner.handleArchiveByFile(URLScanner.java:123)
           at org.jboss.seam.deployment.URLScanner.handle(URLScanner.java:101)
           at org.jboss.seam.deployment.URLScanner.scanResources(URLScanner.java:84)
           at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:105)
           at org.jboss.seam.init.Initialization.create(Initialization.java:122)
           at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:920)
           at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
      ... Removed 15 stack frames

      I used JDK 1.5.
      Any ideas ?

        • 1. Re: Test failled
          Michel Jazz Newbie

          It's ok now  i update the seam project and rebuild it. Need to add the dependency :


          <dependency>
              <groupId>javax.activation</groupId>
              <artifactId>activation</artifactId>
              <version>1.1</version>
              <scope>provided</scope>
           </dependency>
          


          in the build/mail.pom.xml
          Then i copy the generated lib in my project, and my test start without error...
          Except that my userAction is null. Even if i set create to true
          ...
          When i start the jboss AS, it's ok, the injection works well. But in the embedded...
          Any ideas ??
          Thx