I'm checking out the tutorial http://arquillian.org/guides/getting_started/. Everything runs fine. But if I try to add Logger from Log4J with a log4j.xml (placed in src/main/resources) only the embedded containers weld and glassfish runs fine with console log-appender. On the console I got my message:
2012-04-23T15:27:21,859 INFO call greet (de.sealsystems.ejbtest.Greeter)
The remote jboss fails.
My deployment:
@Deployment
public static JavaArchive createDeployment()
{
final JavaArchive deployment = ShrinkWrap.create(JavaArchive.class)
.addClasses(Greeter.class, PhraseBuilder.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml").addAsResource("log4j.xml");
return deployment;
}
The stacktrace-snippet:
15:33:11,375 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC0000
1: Failed to start service jboss.deployment.unit."a680b2b8-2dd6-4b0b-bc87-9082f2
4fc88d.jar".WeldService: org.jboss.msc.service.StartException in service jboss.d
eployment.unit."a680b2b8-2dd6-4b0b-bc87-9082f24fc88d.jar".WeldService: org.jboss
.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for t
ype [Greeter] with qualifiers [@Default] at injection point [[field]
I also tried with adding Logger.class to the JavaArchive, but that also fails with the following stacktrace-snippet:
15:36:50,031 WARN [org.jboss.modules] (MSC service thread 1-3) Failed to define
class org.apache.log4j.Logger in Module "deployment.eb8033fe-29d7-4fa5-986f-303
4a1949020.jar:main" from Service Module Loader: java.lang.LinkageError: Failed t
o link org/apache/log4j/Logger (Module "deployment.eb8033fe-29d7-4fa5-986f-3034a
1949020.jar:main" from Service Module Loader)
What is my mistake?
No comments:
Post a Comment