-
1. Re: Exception running the tests in the bundled examples
dam Mar 11, 2008 11:20 AM (in response to dam)I was using JDK 6. Using JDK 5 I can now run the tests.
It is however stated in the documenation at
that I could use JDK6, which is very confusing.
Now I however have a new problem running tests on a new project created with the seam generator.
The exception is
test: [testng] [Parser] Running: [testng] C:\Aragost\Workspace\test\test-build\HelloTest.xml [testng] [testng] FAILED CONFIGURATION: @BeforeClass init [testng] java.lang.NoClassDefFoundError: org/jboss/beans/metadata/spi/BeanMetaData [testng] at java.lang.Class.forName0(Native Method) [testng] at java.lang.Class.forName(Unknown Source) [testng] at org.jboss.seam.mock.BaseSeamTest.embeddedJBossAvailable(BaseSeamTest.java:1051) [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1039) [testng] at org.jboss.seam.mock.BaseSeamTest.startSeam(BaseSeamTest.java:935) [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:923) [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42) [testng] Caused by: java.lang.ClassNotFoundException: org.jboss.beans.metadata.spi.BeanMetaData [testng] at java.net.URLClassLoader$1.run(Unknown Source) [testng] at java.security.AccessController.doPrivileged(Native Method) [testng] at java.net.URLClassLoader.findClass(Unknown Source) [testng] at java.lang.ClassLoader.loadClass(Unknown Source) [testng] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) [testng] at java.lang.ClassLoader.loadClass(Unknown Source) [testng] at java.lang.ClassLoader.loadClassInternal(Unknown Source) [testng] ... 29 more [testng] ... Removed 22 stack frames [testng] SKIPPED CONFIGURATION: @BeforeMethod begin [testng] SKIPPED CONFIGURATION: @AfterMethod end [testng] SKIPPED CONFIGURATION: @AfterClass cleanup [testng] SKIPPED: test [testng] [testng] =============================================== [testng] Hello Test [testng] Tests run: 1, Failures: 0, Skips: 1 [testng] Configuration Failures: 1, Skips: 3 [testng] =============================================== [testng] [testng] [testng] =============================================== [testng] Hello Tests [testng] Total tests run: 1, Failures: 0, Skips: 1 [testng] Configuration Failures: 1, Skips: 3 [testng] =============================================== [testng] BUILD SUCCESSFUL Total time: 0 seconds
What can I do so the class is found?
-
2. Re: Exception running the tests in the bundled examples
danielc.roth Mar 11, 2008 11:31 AM (in response to dam)I think Seam can run on jdk5, but embedded jboss must be running on jdk5.
http://docs.jboss.com/seam/latest/reference/en/html/configuration.html
25.5.1. Installing Embedded JBoss
Embedded JBoss must by installed into Tomcat for Seam applications to run correctly on it. Embedded JBoss only runs on JDK 1.5 (not JDK 1.6). Embedded JBoss can be downloaded here. The process for installing Embedded JBoss into Tomcat 6 is quite simple. First, you should copy the Embedded JBoss JARs and configuration files into Tomcat.The test suit might use embedded jboss?
-
3. Re: Exception running the tests in the bundled examples
danielc.roth Mar 11, 2008 11:33 AM (in response to dam)Edit:
I think Seam can run on jdk6, but embedded jboss must be running on jdk5.
-
4. Re: Exception running the tests in the bundled examples
dam Mar 11, 2008 12:08 PM (in response to dam)On JDK 6 I could run all the examples on the server. The only thing I couldn't was run the tests.
What I don't get is that after changing to JDK5, the tests in the bundled examples work, but when I create a new project with the seam generator and create a action with the generator and run the test it gives me the exception above.
-
5. Re: Exception running the tests in the bundled examples
dam Mar 14, 2008 9:37 AM (in response to dam)Jars from the lib/test was not included, by the build script generated by seam, when testing. So the information in the documentation
If you used seam-gen to create your project you are ready to start writing tests.or the seam gen needs to be altered.
Is no one using this script? Or just not testing? Or just not reading this post:) Since everybody would have changed this.
-
6. Re: Exception running the tests in the bundled examples
pmuir Mar 14, 2008 10:31 AM (in response to dam)They most certainly are in Seam 2.0.1.GA (which you say you are running).
-
7. Re: Exception running the tests in the bundled examples
dam Mar 14, 2008 10:48 AM (in response to dam)As mentioned before I get
java.lang.NoClassDefFoundError: org/jboss/beans/metadata/spi/BeanMetaData
when running ant test. Fixed it by including the jars in the build script when running the target.
-
8. Re: Exception running the tests in the bundled examples
bk8133.info.jua.si Mar 14, 2008 3:13 PM (in response to dam)Running
ant test
might fail with exceptions like 'class not found' if you are running an existing instance of jboss server in the background.. So you might want to check that out..
with best regards, -
9. Re: Exception running the tests in the bundled examples
jamesl Apr 25, 2008 4:30 AM (in response to dam)@Jakob,
Could you tell us the changes you made in the build script, so we can do the same to overcome the error?
-
10. Re: Exception running the tests in the bundled examples
jamesl Apr 25, 2008 4:57 AM (in response to dam)I added the following in the build.xml file after the path setup for build.classpath
<path id="test.classpath"> <fileset id="lib.test" dir="${lib.dir}/test"> <include name="*.jar" /> </fileset> </path>
At the 'test' target I added the following entry to the class path entries for testng:
<classpath refid="test.classpath" />
Running 'ant test' then has the following error:
test: [testng] [Parser] Running: [testng] <snip>\test_seam\test-build\ExampleTest.xml [testng] [testng] ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=JMXKernel state=Cre ate [testng] java.lang.NoSuchMethodError: org.jboss.system.ServiceController.setKernel(Lorg/jboss/kernel/Kernel;)V [testng] at org.jboss.embedded.adapters.JMXKernel.start(JMXKernel.java:164) [testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [testng] at java.lang.reflect.Method.invoke(Method.java:585) [testng] at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56) [testng] at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110) [testng] at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [testng] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControll erContextAction.java:214) [testng] at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45) <snipped>
Do I need to regenerate the project since changing back to JDK 1.5 ?
Has anyone else been able to test a seam-gen generated project?
-
11. Re: Exception running the tests in the bundled examples
jamesl Apr 25, 2008 5:45 AM (in response to dam)All is working now
Installed jboss-seam-2.0.2.CR1, created a project, created and action and ran 'ant test'.
I am also running jdk1.5.0-15
No modifications to build.xml required.