8 Replies Latest reply on Jan 7, 2013 4:06 PM by jane_lj

    cont. for "Failed to deploy resource adapter"

    jane_lj

      Ramesh:

       

      Please see the attachment.

       

      Thanks.

        • 1. Re: cont. for "Failed to deploy resource adapter"
          rareddy

          I see following errors on the console, correct those first

           

          Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
          Section: 19.4.2
          Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.
          Code: org.teiid.resource.spi.BasicResourceAdapter
          
          Severity: ERROR
          Section: 6.5.3.2
          Description: A ManagedConnectionFactory must implement a "public boolean equals(Object)" method.
          Code: com.lgc.teiid.resource.adapter.petrel.PetrelManagedConnectionFactory
          
          Severity: ERROR
          Section: 19.4.2
          Description: A ResourceAdapter must implement a "public int hashCode()" method.
          Code: org.teiid.resource.spi.BasicResourceAdapter
          
          Severity: ERROR
          Section: 6.5.3.2
          Description: A ManagedConnectionFactory must implement a "public int hashCode()" method.
          Code: com.lgc.teiid.resource.adapter.petrel.PetrelManagedConnectionFactory
          
          1 of 1 people found this helpful
          • 2. Re: cont. for "Failed to deploy resource adapter"
            jane_lj

            Thanks, Ramesh.

             

            After I fixed these errors, I can deploy my resource adapter now.

             

            Can you tell me how did you see these errors in console, in my eclipse, I don't see compilation error and no complain when I package my RAR file?

            • 3. Re: cont. for "Failed to deploy resource adapter"
              rareddy

              The errors are not compile errors, these methods are required per the JCA spec. When you deloy the RAR file in the AS7, you will see them in the shell window where you launched the AS7 or in the server log files.

              • 4. Re: cont. for "Failed to deploy resource adapter"
                jane_lj

                In both places u mentioned, I didn't see those errors, maybe depends on the log level we configured.

                • 5. Re: cont. for "Failed to deploy resource adapter"
                  rareddy

                  Strange! I do not think I modified the default log settings. I am running on Fedora using java 64 bit

                  • 6. Re: cont. for "Failed to deploy resource adapter"
                    jane_lj

                    Ramesh,

                     

                    Did u see any other runtime errors about my resource adapter?

                     

                    Now teiid can find my translator, but I got this error now:

                     

                    15:44:57,727 INFO  [org.teiid.RUNTIME] (MSC service thread 1-4) TEIID50029 VDB PetrelVDB.1 model "PetrelModel" metadata is currently being loaded. Start Time: 1/4/13 3:44 PM
                    15:44:57,727 INFO  [org.teiid.RUNTIME] (MSC service thread 1-4) TEIID50029 VDB PetrelVDB.1 model "PetrelModel" metadata is currently being loaded. Start Time: 1/4/13 3:44 PM
                    15:44:57,837 WARN  [org.teiid.RUNTIME] (teiid-async-threads - 1) TEIID50036 VDB PetrelVDB.1 model "PetrelModel" metadata failed to load. Reason:com.lgc.teiid.resource.adapter.petrel.PetrelConnection cannot be cast to com.lgc.teiid.resource.adapter.petrel.PetrelConnection
                    15:44:57,837 WARN  [org.teiid.RUNTIME] (teiid-async-threads - 1) TEIID50036 VDB PetrelVDB.1 model "PetrelModel" metadata failed to load. Reason:com.lgc.teiid.resource.adapter.petrel.PetrelConnection cannot be cast to com.lgc.teiid.resource.adapter.petrel.PetrelConnection
                    15:44:57,961 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-ws.rar"
                    15:44:57,961 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-salesforce.rar"
                    15:44:57,961 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-ldap.rar"
                    15:44:57,961 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-file.rar"
                    15:44:57,977 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "petrelconnector.rar"
                    15:44:57,977 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "petrel-vdb.xml"

                     

                    Thanks.

                     

                    • 7. Re: cont. for "Failed to deploy resource adapter"
                      rareddy

                      "getMetadata" call in your translator is failing. Get the Teiid Web Console app from http://www.jboss.org/teiid/downloads and install it, then go to http://localhost:8080 to see the links for the launching the console. Using the console, if you look at your VDB and model, and the model, it will list the error on it as to why it failed to load. There are other ways to find out, but I think this is the easiest. Note that you need to add a management user before you can use the console.  See adduser.sh script in the jbossas/bin directory.

                      1 of 1 people found this helpful
                      • 8. Re: cont. for "Failed to deploy resource adapter"
                        jane_lj

                        Thank you very much, Ramesh.