0 Replies Latest reply on Dec 5, 2006 8:55 AM by Thomas Kratz

    EJB3StandaloneBootstrap  - java.lang.IllegalArgumentExceptio

    Thomas Kratz Newbie

      I try to set up some Junit tests for our SEAM Project. I struggle now even with the CVS relase from 20061204 with the following exception :

      java.lang.RuntimeException: java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
      at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391)
      at org.jboss.seam.core.Ejb.startup(Ejb.java:41)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
      at org.jboss.seam.Component.callComponentMethod(Component.java:1759)
      at org.jboss.seam.Component.callCreateMethod(Component.java:1707)
      at org.jboss.seam.Component.newInstance(Component.java:1696)
      at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:153)
      at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:127)
      at org.jboss.seam.init.Initialization.init(Initialization.java:408)
      at com.hp.junit.SeamTestCase.setUpSeam(SeamTestCase.java:42)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
      at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
      at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
      at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
      at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
      at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
      at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
      at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
      at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
      at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
      at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:139)
      at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:81)
      at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:48)
      at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:122)
      at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:87)
      at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.createKernel(EJB3StandaloneBootstrap.java:422)
      at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:375)
      ... 34 more
      Caused by: java.lang.NullPointerException
      at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getTypeInfo(IntrospectionTypeInfoFactoryImpl.java:221)
      at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory.getTypeInfo(IntrospectionTypeInfoFactory.java:44)
      at org.jboss.classadapter.plugins.reflect.ReflectClassAdapterFactory.getClassAdapter(ReflectClassAdapterFactory.java:46)
      at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:57)
      at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:140)
      at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:108)
      at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:133)
      ... 40 more

      this is my code for the unit test environment (stolen from the TestNG SeamTest)

      @Before public void setUpSeam(){
       application = new MockApplication();
       application.setStateManager( new SeamStateManager( application.getStateManager() ) );
       application.setNavigationHandler( new SeamNavigationHandler( application.getNavigationHandler() ) );
       //don't need a SeamVariableResolver, because we don't test the view
       phases = createPhaseListener();
      
       servletContext = new MockServletContext();
       initServletContext( servletContext.getInitParameters() );
       new Initialization(servletContext).init();
       Lifecycle.setServletContext(servletContext);
      
       //conversationStates = new HashMap<String, ConversationState>();
      
       }
      


      can anyone point me a direction ? I have completely no idea !

      Thx