11 Replies Latest reply on Sep 4, 2014 5:30 PM by Stan Brown

    DeployException: IJ020060: Unable to inject

    Stan Brown Newbie

      I'm receiving a DeployException when I trying to deploy an EJB that uses a ConnectionFactoryDefinition annotation to specify a resource adapter configuration. 

       

      The ConnectionFactoryDefinition annotation is declared as follows:

       

      <code>

      @Stateless(name = "jbossEjb")

      @ConnectionFactoryDefinition(

          name = "java:app/eis/jboss-rar/jboss-rar",

          interfaceName = "javax.resource.cci.ConnectionFactory",

          resourceAdapter = "#generic-rar",

          minPoolSize = 2,

          maxPoolSize = 3,

          transactionSupport = TransactionSupportLevel.NoTransaction,

          properties = {

              "serverName = ECCSG",

              "portNumber = 7952",

              "windowName = TC_ALPHANUM_1",

              "userName = DRUMMER",

              "authenticationType = AutoLogon",

              "traceLevel = Debug"

          }

      )

      public class jbossEjbBean implements jbossEjb {

          @Resource(lookup = "java:app/eis/jboss-rar/jboss-rar")

          private ConnectionFactory connectionFactory;

      </code>

       

      The log shows the following:

       

      <code>

      2014-08-13 13:04:41,445 INFO  [org.jboss.as.repository] (management-handler-thread - 1) JBAS014900: Content added at location C:\wildfly-8.1.0.Final\standalone\data\content\65\727f14d9719438384b68a91e0ebb8121f0f419\content

      2014-08-13 13:04:41,486 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "jbossEjb.ear" (runtime-name: "jbossEjb.ear")

      2014-08-13 13:04:41,660 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015973: Starting subdeployment (runtime-name: "jbossEjb-ejb.jar")

      2014-08-13 13:04:41,660 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015973: Starting subdeployment (runtime-name: "generic-rar.rar")

      2014-08-13 13:04:42,762 INFO  [org.jboss.weld.deployer] (MSC service thread 1-8) JBAS016002: Processing weld deployment jbossEjb.ear

      2014-08-13 13:04:43,362 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 5.1.0.Final

      2014-08-13 13:04:43,722 INFO  [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016002: Processing weld deployment generic-rar.rar

      2014-08-13 13:04:43,860 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016002: Processing weld deployment jbossEjb-ejb.jar

      2014-08-13 13:04:43,998 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-5) JNDI bindings for session bean named jbossEjb in deployment unit subdeployment "jbossEjb-ejb.jar" of deployment "jbossEjb.ear" are as follows:

       

       

        java:global/jbossEjb/jbossEjb-ejb/jbossEjb!p1.p2.p3.jbossEjb

        java:app/jbossEjb-ejb/jbossEjb!p1.p2.p3.jbossEjb

        java:module/jbossEjb!p1.p2.p3.jbossEjb

        java:jboss/exported/jbossEjb/jbossEjb-ejb/jbossEjb!p1.p2.p3.jbossEjb

        java:global/jbossEjb/jbossEjb-ejb/jbossEjb

        java:app/jbossEjb-ejb/jbossEjb

        java:module/jbossEjb

       

       

      2014-08-13 13:04:44,118 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016005: Starting Services for CDI deployment: jbossEjb.ear

      2014-08-13 13:04:44,368 INFO  [org.jboss.weld.Version] (MSC service thread 1-4) WELD-000900: 2.1.2 (Final)

      2014-08-13 13:04:44,542 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment jbossEjb.ear

      2014-08-13 13:04:45,041 WARN  [org.jboss.as.connector.subsystems.resourceadapters] (MSC service thread 1-3) JBAS010426: No ironjacamar.security defined for java:app/eis/jboss-rar/jboss-rar

      2014-08-13 13:04:45,128 ERROR [org.jboss.msc.service.fail] (ResourceAdapterDeploymentService Thread Pool -- 1) MSC000001: Failed to start service jboss.raactivator.java_app_eis_jboss-rar_jboss-rar: org.jboss.msc.service.StartException in service jboss.raactivator.java_app_eis_jboss-rar_jboss-rar: JBAS010446: Failed to start RA deployment [java_app_eis_jboss-rar_jboss-rar]

        at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$1.run(AbstractResourceAdapterDeploymentService.java:303) [wildfly-connector-8.1.0.Final.jar:8.1.0.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]

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

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]

      Caused by: org.jboss.jca.deployers.common.DeployException: IJ020060: Unable to inject: com.unisys.coms.connector.COMSManagedConnectionFactory property: windowName  value:  TC_ALPHANUM_1

        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2038) [ironjacamar-deployers-common-1.1.5.Final.jar:1.1.5.Final]

        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1173) [ironjacamar-deployers-common-1.1.5.Final.jar:1.1.5.Final]

        at org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator.doDeploy(ResourceAdapterActivatorService.java:174) [wildfly-connector-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService.start(ResourceAdapterActivatorService.java:117) [wildfly-connector-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]

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

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]

       

       

      2014-08-13 13:04:45,515 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) JBAS014613: Operation ("deploy") failed - address: ({"deployment" => "jbossEjb.ear"}) - failure description: {

          "JBAS014671: Failed services" => {"jboss.raactivator.java_app_eis_jboss-rar_jboss-rar" => "org.jboss.msc.service.StartException in service jboss.raactivator.java_app_eis_jboss-rar_jboss-rar: JBAS010446: Failed to start RA deployment [java_app_eis_jboss-rar_jboss-rar]

          Caused by: org.jboss.jca.deployers.common.DeployException: IJ020060: Unable to inject: com.unisys.coms.connector.COMSManagedConnectionFactory property: windowName  value:  TC_ALPHANUM_1"},

          "JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.app.jbossEjb.eis.jboss-rar.jboss-rar is missing [jboss.connection-factory.reference-factory.jboss.naming.context.java.app.jbossEjb.eis.jboss-rar.jboss-rar]"]

      }

      2014-08-13 13:04:45,547 ERROR [org.jboss.as.server] (management-handler-thread - 1) JBAS015870: Deploy of deployment "jbossEjb.ear" was rolled back with the following failure message:

      {

          "JBAS014671: Failed services" => {"jboss.raactivator.java_app_eis_jboss-rar_jboss-rar" => "org.jboss.msc.service.StartException in service jboss.raactivator.java_app_eis_jboss-rar_jboss-rar: JBAS010446: Failed to start RA deployment [java_app_eis_jboss-rar_jboss-rar]

          Caused by: org.jboss.jca.deployers.common.DeployException: IJ020060: Unable to inject: com.unisys.coms.connector.COMSManagedConnectionFactory property: windowName  value:  TC_ALPHANUM_1"},

          "JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.app.jbossEjb.eis.jboss-rar.jboss-rar is missing [jboss.connection-factory.reference-factory.jboss.naming.context.java.app.jbossEjb.eis.jboss-rar.jboss-rar]"]

      }

      2014-08-13 13:04:45,555 INFO  [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016009: Stopping weld service for deployment jbossEjb.ear

      2014-08-13 13:04:45,675 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: jbossEjb-ejb.jar) in 126ms

      2014-08-13 13:04:45,679 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015974: Stopped subdeployment (runtime-name: generic-rar.rar) in 130ms

      2014-08-13 13:04:45,685 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment jbossEjb.ear (runtime-name: jbossEjb.ear) in 137ms

      2014-08-13 13:04:45,688 INFO  [org.jboss.as.controller] (management-handler-thread - 1) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.connection-factory.reference-factory.jboss.naming.context.java.app.jbossEjb.eis.jboss-rar.jboss-rar (missing) dependents: [service jboss.naming.context.java.app.jbossEjb.eis.jboss-rar.jboss-rar]

            service jboss.deployment.subunit."jbossEjb.ear"."generic-rar.rar".deploymentCompleteService (missing) dependents: [service jboss.deployment.unit."jbossEjb.ear".deploymentCompleteService]

            service jboss.deployment.subunit."jbossEjb.ear"."generic-rar.rar".jndiDependencyService (missing) dependents: [service jboss.deployment.unit."jbossEjb.ear".WeldStartService]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.CREATE (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.JndiBindingsService (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".jndiDependencyService]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".moduleDeploymentRuntimeInformationStart, service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".deploymentCompleteService]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.VIEW."p1.p2.p3.jbossEjb".REMOTE (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.WeldInterceptorBindingsService (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.WeldInstantiator]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.ejb.non-functional-timerservice (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".deploymentCompleteService (missing) dependents: [service jboss.deployment.unit."jbossEjb.ear".deploymentCompleteService]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".jndiDependencyService (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START, service jboss.deployment.unit."jbossEjb.ear".WeldStartService]

            service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".moduleDeploymentRuntimeInformation (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START, service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".moduleDeploymentRuntimeInformationStart]

            service jboss.deployment.unit."jbossEjb.ear".WeldBootstrapService (missing) dependents: [service jboss.deployment.unit."jbossEjb.ear".WeldStartService]

            service jboss.deployment.unit."jbossEjb.ear".jndiDependencyService (missing) dependents: [service jboss.deployment.unit."jbossEjb.ear".WeldStartService]

            service jboss.naming.context.java.comp.jbossEjb.jbossEjb-ejb.jbossEjb (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START, service jboss.naming.context.java.comp.jbossEjb.jbossEjb-ejb.jbossEjb.env."p1.p2.p3.jbossEjbBean".connectionFactory]

            service jboss.naming.context.java.comp.jbossEjb.jbossEjb-ejb.jbossEjb.BeanManager (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".jndiDependencyService]

            service jboss.naming.context.java.comp.jbossEjb.jbossEjb-ejb.jbossEjb.TransactionSynchronizationRegistry (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".jndiDependencyService]

            service jboss.naming.context.java.comp.jbossEjb.jbossEjb-ejb.jbossEjb.UserTransaction (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".jndiDependencyService]

            service jboss.naming.context.java.comp.jbossEjb.jbossEjb-ejb.jbossEjb.env."p1.p2.p3.jbossEjbBean".connectionFactory (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.START, service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".component.jbossEjb.JndiBindingsService]

            service jboss.naming.context.java.module.jbossEjb.jbossEjb-ejb.BeanManager (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".jndiDependencyService]

            service jboss.naming.context.java.module.jbossEjb.jbossEjb-ejb.env (missing) dependents: [service jboss.deployment.subunit."jbossEjb.ear"."jbossEjb-ejb.jar".jndiDependencyService]

      JBAS014777:   Services which failed to start:      service jboss.raactivator.java_app_eis_jboss-rar_jboss-rar

       

      </code>

       

      The resource adapter archive doesn't contain a ra.xml or ironjacamar.xml deployment descriptor. Is there some other configuration I should try?

        • 1. Re: DeployException: IJ020060: Unable to inject
          Jesper Pedersen Master

          You can try http://www.ironjacamar.org/doc/userguide/1.2/en-US/html/ch10.html#tools_rarinfo to get an idea of the configuration properties supported.

           

          However, the JCA deployment annotations should not be used for any real configuration of the resource adapter - use the sample deployment descriptor generated by the RAR info tool instead as a starting point.

          • 2. Re: DeployException: IJ020060: Unable to inject
            Stan Brown Newbie

            A NPE is thrown running your rar-info tool.

             

            C:\ironjacamar-1.1.6.Final\doc\as>java -classpath ironjacamar-as.jar;..\..\lib\ironjacamar-common-spi.jar;..\..\lib\jboss-logging.jar;..\..\lib\jboss-common-core.jar;..\..\lib\ironjacamar-spec-api.jar;..\..\lib\jandex.jar;..\..\lib\ironjacamar-common-impl.jar;..\..\lib\ironjacamar-common-api.jar;..\..\lib\ironjacamar-core-impl.jar;..\..\lib\ironjacamar-core-api.jar;..\..\lib\ironjacamar-validator.jar;..\..\lib\jandex.jar;..\..\lib\validation-api.jar;..\..\lib\hibernate-validator.jar org.jboss.jca.as.rarinfo.Main C:\drummer\jrac\lib\generic-rar.rar

            Error: null

            java.lang.NullPointerException

                    at org.jboss.jca.common.annotations.Annotations.processConfigProperty(Annotations.java:765)

                    at org.jboss.jca.common.annotations.Annotations.process(Annotations.java:179)

                    at org.jboss.jca.common.annotations.Annotations.merge(Annotations.java:136)

             

            The rar doesn’t have any resource adapter deployment descriptors defined.  I'm testing what's new in the JCA 1.7 specification.  The idea is to use @ConnectionFactoryDefinition to define the resource adapter’s configuration regardless of the fact that it shouldn't be used for any real resource adapter configuration.

             

            It works on GlassFish. I'll do further research.

            • 3. Re: DeployException: IJ020060: Unable to inject
              Jesper Pedersen Master

              Could you attach the resource adapter w/ source ?

               

              Otherwise, you need to go through the @ConfigProperty definition, as one of them turns out to be null. TRACE of org.jboss.jca could provide clues too.

              • 4. Re: DeployException: IJ020060: Unable to inject
                Stan Brown Newbie

                @ConfigProperty is not used in our MCF implementation; so a query for a ConfigProperty annotation will return null for each

                property defined in the @ConnectionFactoryDefinition’s properties element.  Besides @ConfigProperty is optional – the BeanInfo implementation is always available, but are you saying that the use of @ConnectionFactoryDefinition requires the MCF properties to be annotated with @ConfigProperty?         

                 

                Thanks again.

                • 5. Re: DeployException: IJ020060: Unable to inject
                  Jesper Pedersen Master

                  You need to specify your configuration properties either in META-INF/ra.xml (remember to set the metadata-complete attribute) or through @ConfigProperty

                  • 6. Re: DeployException: IJ020060: Unable to inject
                    Stan Brown Newbie

                    I finally had time to revisit this issue.  It turns out that the application server doesn't like spaces around the "=" sign – at least for contents of the properties element.  That is, the following doesn't work:

                     

                    @ConnectionFactoryDefinition(

                        name = "java:app/eis/jbossEjb-rar/jbossEjb-rar",

                        interfaceName = "javax.resource.cci.ConnectionFactory",

                        resourceAdapter = "#generic-rar",

                        minPoolSize = 0,

                        maxPoolSize = 1,

                        transactionSupport = TransactionSupportLevel.NoTransaction,

                        properties = {

                            "serverName = ECCSF",

                            "portNumber = 7952",

                            "windowName = TC_ALPHANUM_1",

                            "traceLevel = Debug"

                        }

                    )

                     

                     

                    But the following does work:

                     

                    @ConnectionFactoryDefinition(

                        name = "java:app/eis/jbossEjb-rar/jbossEjb-rar",

                        interfaceName = "javax.resource.cci.ConnectionFactory",

                        resourceAdapter = "#generic-rar",

                        minPoolSize = 0,

                        maxPoolSize = 1,

                        transactionSupport = TransactionSupportLevel.NoTransaction,

                        properties = {

                            "serverName=ECCSF",

                            "portNumber=7952",

                            "windowName=TC_ALPHANUM_1",

                            "traceLevel=Debug"

                        }

                    )

                     

                    Seems like a bug - albeit not major, but I'm not sure.

                     

                    This is how the application server sees the ConnectionFactoryDefinition statement when spaces are used around the "=" sign. 

                     

                    <connection-definition

                        class-name="com.unisys.coms.connector.COMSManagedConnectionFactory"

                        jndi-name="java:app/eis/jbossEjb-rar/jbossEjb-rar"

                        enabled="true"

                        use-java-context="true"

                        pool-name="ConnectionFactory"

                        use-ccm="true"

                        sharable="true"

                        enlistment="true">

                      <config-property name="windowName "> TC_ALPHANUM_1</config-property>

                      <config-property name="traceLevel "> Debug</config-property>

                      <config-property name="portNumber "> 7952</config-property>

                      <config-property name="authenticationType "> Challenge</config-property>

                      <config-property name="userName "> drummer</config-property>

                      <config-property name="serverName "> ECCSF</config-property>

                      <pool>

                        <min-pool-size>0</min-pool-size>

                        <max-pool-size>1</max-pool-size>

                        <prefill>false</prefill>

                        <use-strict-min>false</use-strict-min>

                        <flush-strategy>FailingConnectionOnly</flush-strategy>

                        </pool>

                    </connection-definition>

                     

                    For the config-property, a space is included after the value of the name attribute and before the value of the element.

                    • 7. Re: DeployException: IJ020060: Unable to inject
                      Stan Brown Newbie

                      I was also wondering if you can tell me the meaning of JBAS010427?

                      I saw it display in the following message:

                       

                      JBAS010427: @ConnectionFactoryDefinition will have limited management: java:app/eis/jbossEjb-rar/jbossEjb-rar

                       

                      Thanks.

                      • 8. Re: DeployException: IJ020060: Unable to inject
                        Jesper Pedersen Master

                        Because @ConnectionFactoryDefinition is a broken concept, and is only meant for development. All the settings for the JCA container isn't/can't be exposed, and hence it is limited in the management view too (use :resource-adapters: instead).

                         

                        Do NOT use @ConnectionFactoryDefinition for production environments ! You have been warned

                        • 9. Re: DeployException: IJ020060: Unable to inject
                          Stan Brown Newbie

                          There’s no intent on using this production; I’m simply testing the new features of the connector architecture.  Besides it works well for testing, and it can beneficial to those that are new Java EE.

                           

                          About the spaces around the equal signs, is this something that can be fixed?

                           

                          About the limited manageability, is it possible to create a dynamic entry for the resource adapter that can be modified through the console?

                          • 10. Re: DeployException: IJ020060: Unable to inject
                            Jesper Pedersen Master

                            You likely need to create a test case for Jandex, which is used for annotation scanning.

                             

                            Re: management - knock yourself out It isn't a priority, since it is a broken concept in the first place. But, feel free to ask questions on how to proceed with the implementation.

                            • 11. Re: DeployException: IJ020060: Unable to inject
                              Stan Brown Newbie

                              Sorry for the misunderstanding, but is this something that I can submit as a bug – something that someone who works on the application server can fix?