Unable to run TestNG tests within JBDS due to missing dependency - slf4j-api
-----------------------------------------------------------------------------
Key: JBSEAM-4308
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4308
Project: Seam
Issue Type: Bug
Components: Build
Affects Versions: 2.2.0.GA
Reporter: Karel Piwko
When running TestNG test suite within JBDS on project generated by seam-gen, there is
sl4j-api library missing and tests could not be run.
When the same project is run within seam-gen, classpaths are set correctly.
Current list of files which must be included in JDBS/Eclipse+TestNG to run tests:
/lib/test/jboss-embedded-all.jar
/lib/test/hibernate-all.jar
/lib/test/thirdparty-all.jar
/lib/jboss-embedded-api.jar
/lib/jboss-deployers-client-spi.jar
/lib/jboss-deployers-core-spi.jar
So slf4j-api.jar should go to thirdparty.jar
Stacktrace:
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to
Parse: name=vfsfile:/home/kapy/devel/seam-gen/seamEarTest/test-build/ state=Not Installed
mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error during deploy:
vfsfile:/home/kapy/devel/seam-gen/seamEarTest/test-build/
at
org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:175)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:127)
at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
at
org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
at
org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
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:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:278)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:823)
at org.testng.TestNG.runSuitesLocally(TestNG.java:790)
at org.testng.TestNG.run(TestNG.java:708)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.util.DTDEntityResolver.<clinit>(DTDEntityResolver.java:57)
at
org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer.parse(PersistenceUnitParsingDeployer.java:113)
at
org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer.parse(PersistenceUnitParsingDeployer.java:89)
at
org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer.parse(PersistenceUnitParsingDeployer.java:51)
at
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:223)
at
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:199)
at
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:162)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
... 32 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 40 more
FAILED CONFIGURATION: @BeforeSuite startSeam
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira