1 Reply Latest reply: Jul 5, 2012 8:58 AM by Joshua Davis RSS

Jboss AS7 create logger error

naza naza Newbie

I have rest bean:

 

import org.jboss.logging.Logger;


@Stateful
@Path("/task/formdocument")
@RequestScoped
public class TaskFormDocument {
    
    @Inject
    private Logger logger;

 

in ear pom i have dependency:

 

        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>3.0.1.GA</version>
        </dependency>

 

When i deploy app i have error:

 

Unsatisfied dependencies for type [Logger] with qualifiers [@Default] at injection point [[field] @Inject TaskFormDocument.logger]
        at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Logger] with qualifiers [@Default] at injection point [[field] @Inject TaskFormDocument.logger]
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
        at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
        at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
        at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
        at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
        at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
        at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
        at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
        ... 5 more

 

What i am doing wrong?