3 Replies Latest reply on Apr 8, 2013 9:24 AM by Tommy T

    Beginner: WELD-001408 Unsatisfied dependencies for type [SecureRandom] with qualifiers [@Default] at injection point

    Tommy T Newbie

      Hi,

       

      I am trying to inject java.security.SecureRandom; into my class as below:

       

      @Stateless

      public final class TokenGenerator

      {

       

       

        @Inject

        SecureRandom random;

       

      ...

      How do I include this in Jboss so that the dependency is satisified?

       

      Thanks

      T

       

      JBoss version : JBoss AS 7.1.1.Final "Brontes"

       

      14:25:43,302 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."DemoApp.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."DemoApp.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SecureRandom] with qualifiers [@Default] at injection point [[field] @Inject com.radar.security.SessionTokenGenerator.random]

                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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SecureRandom] with qualifiers [@Default] at injection point [[field] @Inject com.radar.security.SessionTokenGenerator.random]