• Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.1.2, 9.2
    • 8.12.6.6_3
    • Connector API
    • None

      I was trying to set up the simpledb example:
      https://developer.jboss.org/wiki/IntegrateAmazonSimpleDBWithTeiid

      When I create the DataSource to AWS I get the following error:
      Inline image 1

      and the stack trace:
      07:19:29,048 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (teiid-async-threads - 1) IJ000604: Throwable while attempting to get a new connection: null: java.lang.NoClassDefFoundError: com/amazonaws/AmazonServiceException
      at org.teiid.resource.adapter.simpledb.SimpleDBManagedConnectionFactory$1.getConnection(SimpleDBManagedConnectionFactory.java:46)
      at org.teiid.resource.adapter.simpledb.SimpleDBManagedConnectionFactory$1.getConnection(SimpleDBManagedConnectionFactory.java:41)
      at org.teiid.resource.spi.BasicManagedConnectionFactory.createManagedConnection(BasicManagedConnectionFactory.java:71) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
      at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:834)
      at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:379)
      at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:453)
      at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:425)
      at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:354)

            [TEIID-4584] SimpleDB doesn' work

            Updated to AmazonAWS version 1.11.0, this was the closest to the "com.fasterxml" version dependency that comes along in the WildFly 10 which Teiid 9.1 and Teiid 9.2 depend upon.

            Since build is different between 9.1 and 9.2 two completely separate commits were needed to fix the issue.

            Ramesh Reddy added a comment - Updated to AmazonAWS version 1.11.0, this was the closest to the "com.fasterxml" version dependency that comes along in the WildFly 10 which Teiid 9.1 and Teiid 9.2 depend upon. Since build is different between 9.1 and 9.2 two completely separate commits were needed to fix the issue.

            response from AWS

            Hi @rareddy

            SDK is modularized into multiple maven sub modules. SDK now have one maven sub module per AWS service. The aws-java-sdk module transitively depends on all sub modules. This is just a convenient modules for customers who wish to depend on entire SDK.

            We modularized the SDK in 1.9 major version. Prior to 1.9 SDK was vended as one single maven module.

            https://aws.amazon.com/blogs/developer/aws-sdk-for-java-maven-modules/

            Ramesh Reddy added a comment - response from AWS Hi @rareddy SDK is modularized into multiple maven sub modules. SDK now have one maven sub module per AWS service. The aws-java-sdk module transitively depends on all sub modules. This is just a convenient modules for customers who wish to depend on entire SDK. We modularized the SDK in 1.9 major version. Prior to 1.9 SDK was vended as one single maven module. https://aws.amazon.com/blogs/developer/aws-sdk-for-java-maven-modules/

            Looks like we'll need to redo the dependencies.

            Steven Hawkins added a comment - Looks like we'll need to redo the dependencies.

            I did add the full jar. It allows the creation of the Teiid Connection >> Source Model to go almost to creation before failing. The new error is:java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper

            These files are included in the aws-sdk-xxx/third-party/lib area. If you try adding them like so: <resources>
            <resource-root path="simpledb-api-8.12.5.redhat-8.jar" />
            <resource-root path="aws-java-sdk-1.11.52.jar" />
            <!-- <resource-root path="aws-java-sdk-simpledb-1.10.77.jar" /> -->
            <!-- Insert resources here -->
            </resources>

            You can add the jackson libs which are included in the sdk download /third-party/libs. That works but you have problems with the httpclient, httpcore libs when I add those.

            SimpleDB_ERROR_HTTP.txt SimpleDB_ERROR_Jackson.txt

            Glen Wilcox (Inactive) added a comment - I did add the full jar. It allows the creation of the Teiid Connection >> Source Model to go almost to creation before failing. The new error is:java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper These files are included in the aws-sdk-xxx/third-party/lib area. If you try adding them like so: <resources> <resource-root path="simpledb-api-8.12.5.redhat-8.jar" /> <resource-root path="aws-java-sdk-1.11.52.jar" /> <!-- <resource-root path="aws-java-sdk-simpledb-1.10.77.jar" /> --> <!-- Insert resources here --> </resources> You can add the jackson libs which are included in the sdk download /third-party/libs. That works but you have problems with the httpclient, httpcore libs when I add those. SimpleDB_ERROR_HTTP.txt SimpleDB_ERROR_Jackson.txt

            Ramesh Reddy added a comment - Posted to AWS community https://forums.aws.amazon.com/thread.jspa?threadID=243224

            Download the JAR from here https://aws.amazon.com/sdk-for-java/ look in the zip file under "lib" directory and replace the above and see if that works

            Ramesh Reddy added a comment - Download the JAR from here https://aws.amazon.com/sdk-for-java/ look in the zip file under "lib" directory and replace the above and see if that works

            I see even aws-java-sdk-1.11.52.jar is empty of classes

            Ramesh Reddy added a comment - I see even aws-java-sdk-1.11.52.jar is empty of classes

            /u01/dv/EAP-6.4.0/modules/system/layers/dv/org/jboss/teiid/translator/simpledb/main
            [demo1@localhost main]$ cat module.xml
            <?xml version="1.0" encoding="UTF-8"?>
            <module xmlns="urn:jboss:module:1.0" name="org.jboss.teiid.translator.simpledb">
            <properties>
            <property name="jboss.api" value="private"/>
            </properties>

            <resources>
            <resource-root path="translator-simpledb-8.12.5.redhat-8.jar" />
            <!-- Insert resources here -->
            <resource-root path="aws-java-sdk-1.11.52.jar" />
            </resources>

            <dependencies>
            <module name="javax.api" />
            <module name="javax.resource.api" />
            <module name="org.jboss.teiid.common-core" />
            <module name="org.jboss.teiid.api" />
            <module name="org.jboss.teiid.translator.simpledb.api" />
            </dependencies>
            </module>

            The above didn't work. Did you have something else in mind?

            Glen Wilcox (Inactive) added a comment - /u01/dv/EAP-6.4.0/modules/system/layers/dv/org/jboss/teiid/translator/simpledb/main [demo1@localhost main] $ cat module.xml <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="org.jboss.teiid.translator.simpledb"> <properties> <property name="jboss.api" value="private"/> </properties> <resources> <resource-root path="translator-simpledb-8.12.5.redhat-8.jar" /> <!-- Insert resources here --> <resource-root path="aws-java-sdk-1.11.52.jar" /> </resources> <dependencies> <module name="javax.api" /> <module name="javax.resource.api" /> <module name="org.jboss.teiid.common-core" /> <module name="org.jboss.teiid.api" /> <module name="org.jboss.teiid.translator.simpledb.api" /> </dependencies> </module> The above didn't work. Did you have something else in mind?

            gdwinco Did update of the JAR with classes in it work for you?

            Ramesh Reddy added a comment - gdwinco Did update of the JAR with classes in it work for you?

              rhn-engineering-rareddy Ramesh Reddy
              gdwinco Glen Wilcox (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: