3 Replies Latest reply on Jul 12, 2011 6:39 AM by jaikiran

    Datasource missing dependancy from ear

    kristjan273

      Hi,

       

      I have defined the managed datasource as described in manuals and it is shown ok at jboss startup:

      02:21:29,132 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:pusherDs]

       

      But when I am trying to access it through application (originally written on jboss 4.3) inside some stateless bean as:

       

      // @Resource (mappedName="java:pusherDs")

      @Inject

      DataSource pusherDs;

       

      Regardless which annotation I use, same error is produced

       

      Deployment of "someApp.ear" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"someApp.ear\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"someApp.ear\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [DataSource] with qualifiers [@Default] at injection point [[field] @Inject app.someBean.pusherDs]"},"Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"someApp.ear\".\"someAppapp.jar\".component.someOtherBean.START missing [ jboss.naming.context.java.comp.someApp.someAppapp.someOtherBean.\"env/app.someOtherBean/pusherDs\" ]","jboss.naming.context.java.comp.someApp.someAppapp.someOtherBean.\"env/app.someOtherBean/pusherDs\".jboss.deployment.subunit.\"someApp.ear\".\"someAppapp.jar\".component.someOtherBean.8 missing [ jboss.naming.context.java.java:pusherDs ]","jboss.deployment.subunit.\"someApp.ear\".\"someAppapp.jar\".jndiDependencyService missing [ jboss.naming.context.java.comp.someApp.someAppapp.someOtherBean.\"env/app.someOtherBean/pusherDs\" ]"]}

       

       

      I would like to ask for some hint where to put a dependecy information for the datasource.