14 Replies Latest reply on Apr 20, 2015 10:09 AM by sanjeev.gour

    JBAS010446: Failed to start RA deployment

    rakeshsagar

      Hi,

       

      I have defined a file data source in standalone-teiid.xml file and using this in my VDB.

      Sometimes I get the following exception. All the properties are defined properly.

      If I restart JBoss, I do not face this problem. But randomly when I restart JBoss I get this exception.

      We are using Teiid 8.7.

       

      Do we know the cause of this error and a possible fix?

       

       

      15 May 2014 10:05:59,617 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11)  MSC000001: Failed to start service jboss.ra.deployment.file_test_1: org.jboss.msc.service.StartException in service jboss.ra.deployment.file_test_1: org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [file_test]

          at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:131)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

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

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

      Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [file_test]

          at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:115)

          ... 5 more

      Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/E:/RTC/Chorus40/parent/server/chorus-server-run/target/chorus/jboss/modules/system/layers/base/org/jboss/teiid/resource-adapter/file/main/./

          at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2456)

          at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:183)

          at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:108)

          ... 5 more

      Caused by: javax.resource.spi.InvalidPropertyException: ParentDirectory is not set

          at org.teiid.resource.adapter.file.FileManagedConnectionFactory.createConnectionFactory(FileManagedConnectionFactory.java:47)

          at org.teiid.resource.spi.BasicManagedConnectionFactory.createConnectionFactory(BasicManagedConnectionFactory.java:56)

          at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2191)

          ... 7 more

        • 1. Re: JBAS010446: Failed to start RA deployment
          shawkins

          We've never seen this behavior as far as I know.  If the property is really defined, then it seems like this is an issue to raise against the AS or the JCA layer.

          • 2. Re: JBAS010446: Failed to start RA deployment
            rakeshsagar

            Thanks. I will post this in JBoss forum.

            • 3. Re: JBAS010446: Failed to start RA deployment
              rakeshsagar

              Can anyone please take a look at this problem and help us in resolving this ?

              • 4. Re: JBAS010446: Failed to start RA deployment
                jaikiran

                I've no clue how you define those properties. Can you add a bit more details about how you do that?

                • 5. Re: JBAS010446: Failed to start RA deployment
                  rakeshsagar

                  The following is the way we define those properties. These are defined in the stadnalone.xml file.

                   

                            <resource-adapter id="file">

                               <module slot="main" id="org.jboss.teiid.resource-adapter.file"/>

                                <transaction-support>NoTransaction</transaction-support>

                                      <connection-definitions>

                                       <connection-definition class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory" jndi-name="java:/FILE-DS" enabled="true" use-java-context="true" pool-name="FILE-DS">

                                              <config-property name="ParentDirectory">

                                                  ${jboss.home.dir}/myFiles

                                              </config-property>

                                              <config-property name="AllowParentPaths">

                                                  true

                                              </config-property>

                                          </connection-definition>

                                      </connection-definitions>

                                  </resource-adapter>

                   

                  Thanks

                  Rakesh.

                  • 6. Re: JBAS010446: Failed to start RA deployment
                    van.halbert

                    If you're looking for examples, most, if not all, data sources and RA's have an example in the Teiid jboss distribution kit.  They can be found under docs/teiid/datasources.

                    • 7. Re: JBAS010446: Failed to start RA deployment
                      rakeshsagar

                      Hi all,

                       

                      Can anyone of you please take a look at this problem and help us in resolving this issue.

                      Even though the required properties are configured in the data sources along with the values, looks like JBoss is not injecting the required properties to the Connection Factory and because of the check in the Connection Factory we are throwing an InvalidPropertyException.

                       

                      Thanks

                      Rakesh

                      • 8. Re: JBAS010446: Failed to start RA deployment
                        rakeshsagar

                        Can anyone please take a look at this issue and help me in resolving this problem?

                        • 9. Re: JBAS010446: Failed to start RA deployment
                          rakeshsagar

                          Can someone help us in resolving this issue?

                          • 10. Re: JBAS010446: Failed to start RA deployment
                            van.halbert

                            I know the quick start works:  teiid-quickstarts/dynamicvdb-datafederation at master · teiid/teiid-quickstarts · GitHub

                             

                            Would it be possible for you to install a new server instance and try the quick start, following the instructions in the README file?

                            • 11. Re: JBAS010446: Failed to start RA deployment
                              rakeshsagar

                              Yes, the quick start works fine. This problem doesn't happen every time.

                              This problem happens randomly and the only option is to restart the JBoss Server as the file resource adapter is not deployed.

                              We have around 15 file resource adapters and randomly one or two of them fail to deploy and as a result the VDB also fails to deploy.

                               

                              There is a JIRA issue already logged for this problem but looks like not much progress has been made on that. [TEIIDDES-2249] Creation of datasource from Designer fails - JBoss Issue Tracker

                               

                              Is there a solution to this problem?

                               

                              Thanks

                              Rakesh

                              • 12. Re: Re: JBAS010446: Failed to start RA deployment
                                jaikiran

                                I had a look at a bit of code on how Teiid connection factory is integrated with the resource adapter subsystem and also some code in WildFly to see how the resource adapter subsystem works. So from what I see this appears to be a bug in WildFly, specifically the resource adapter subsystem where various services are setup for the configurations defined in that subsystem.

                                 

                                If you look at that example:

                                          <resource-adapter id="file">
                                             <module slot="main" id="org.jboss.teiid.resource-adapter.file"/>
                                              <transaction-support>NoTransaction</transaction-support>
                                                    <connection-definitions>
                                                     <connection-definition class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory" jndi-name="java:/FILE-DS" enabled="true" use-java-context="true" pool-name="FILE-DS">
                                                            <config-property name="ParentDirectory">
                                                                ${jboss.home.dir}/myFiles
                                                            </config-property>
                                                            <config-property name="AllowParentPaths">
                                                                true
                                                            </config-property>
                                                        </connection-definition>
                                                    </connection-definitions>
                                                </resource-adapter
                                

                                 

                                 

                                there's a resource-adapter being configured with one connection-definition and that connection-definition has some config-property. In the resource adapter subsystem of WildFly all of this translates into (MSC) services. The resource-adapter gets a service, the connection-definition gets a service of its own and so does the config-property. For things to work in the right order and correct fashion, proper dependencies need to be setup between these.

                                 

                                From what I see in the code, the config property service depends on the connection definition server which in turn depends on resource adapter service. This, IMO, is the opposite of what needs to happen. The resource adapter should depend on the connection definition service and the connection definition service should depend on the config property service. That way when the connection definition service is up, it is assured that the config property service is already up and the necessary config property setup correctly. In its current form there's no guarantee that when the connection-definition service is up the config-property service is up (since there connection-definition service doesn't setup that dependency on the config-property). Same with the resource-adapter service and connection-definition service.

                                 

                                As a result of this, you can run into the problem that you are currently seeing and it also explains why this works sometimes and why it fails on other occasions. The part which I'm a bit surprised though is why this doesn't fail more often or why it hasn't been reported more frequently.

                                 

                                Anyway, long story short, this might be something that the JCA team might have to evaluate since like I said, my analysis is based on a few minutes of reading the code and might not have taken all aspects into account. Perhaps jesper.pedersen might be able to help.

                                 

                                P.S: This is where the config-property service is created and which adds the dependency on the connection-definition instead of the other way around https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/CDConfigPropertyAdd.java#L69

                                 

                                P.P.S: Ignore the getRaInjector() method name on that line in the code. It looks more like a copy/paste of method names. What it's really injecting is a connection definition, so perhaps getConnectionDefinitionInjector() would be a good name.

                                • 13. Re: JBAS010446: Failed to start RA deployment
                                  rakeshsagar

                                  Thank You Kiran for going through the problem and explaining the root cause in detail. Appreciate your time

                                   

                                  Jesper Pedersen can you please take a look at this problem and help us in resolving this?

                                  • 14. Re: JBAS010446: Failed to start RA deployment
                                    sanjeev.gour

                                    Hi jesper.pedersen, this is an old problem and has been occurring at customer sites for us. Jaikiran points that you might help here. Unfortunately, we do not have any work around either other than retry starting JBoss. Do you have any suggestions for us.

                                     

                                    Appreciate your help.

                                     

                                    Thanks

                                    Sanjeev.