5 Replies Latest reply on Apr 17, 2009 5:29 PM by rareddy

    Embedded Driver Configuration

    kirkm

      I created a VDB that works fine in the designer and have exported it for use in an external application. I have made a few mods to the embedded driver example and am have problems connecting to the data source. In looking at the log created using the instructions in section 6.1 of the quick start, I see the following error when the password is being decrypted:

      ERR.003.030.0076: Could not get instance of cipher for encryption, invalid algorithm specified: AES/ECB/PKCS5Padding
      1 [NoSuchAlgorithmException]Cannot find any provider supporting AES/ECB/PKCS5Padding

      Same error occurs whether I am using mysql or oracle data sources. Is there a missing crypto provider library in the example an is there a way to set the userid and password during application runtime for the data source?

      Kirk

        • 1. Re: Embedded Driver Configuration
          rareddy

          Are you using Java 1.6 as the runtime environment?

          • 2. Re: Embedded Driver Configuration
            kirkm

            I am using jdk 1.6.0_12 on windows.

            I installed the high encryption pack as well and the bouncy castle libraries in an attempt to fix.

            I tried it on another machine setup with jdk 1.6.0_10. Here is the relevant stack trace.

            Session Apr 17, 2009 15:27:59.408 ----------------------------------------------
            java.version=1.6.0_10
            java.vendor=Sun Microsystems Inc.
            BootLoader constants: OS=Windows XP, ARCH=x86
            Apr 17, 2009 15:28:07.658 [main|0] ERROR <DQP|0> initialization of the connector binding "MDA3_1.mdarecords_mysql Connector" failed because, system failed to decrypt the property "Password"
            [CryptoException] ERR.003.030.0076: Could not get instance of cipher for encryption, invalid algorithm specified: AES/ECB/PKCS5Padding
            1 [NoSuchAlgorithmException]Cannot find any provider supporting AES/ECB/PKCS5Padding
            at com.metamatrix.common.util.crypto.cipher.BasicCryptor.initEncryptCipher(BasicCryptor.java:206)
            at com.metamatrix.common.util.crypto.cipher.BasicCryptor.(BasicCryptor.java:73)
            at com.metamatrix.common.util.crypto.cipher.SymmetricCryptor.(SymmetricCryptor.java:113)
            at com.metamatrix.common.util.crypto.cipher.SymmetricCryptor.getSymmectricCryptor(SymmetricCryptor.java:99)
            at com.metamatrix.common.util.crypto.cipher.SymmetricCryptor.getSymmectricCryptor(SymmetricCryptor.java:87)
            at com.metamatrix.common.util.crypto.CryptoUtil.init(CryptoUtil.java:287)
            at com.metamatrix.common.util.crypto.CryptoUtil.init(CryptoUtil.java:261)
            at com.metamatrix.common.util.crypto.CryptoUtil.getCryptor(CryptoUtil.java:307)
            at com.metamatrix.common.util.crypto.CryptoUtil.stringDecrypt(CryptoUtil.java:342)
            at com.metamatrix.dqp.embedded.services.EmbeddedDataService.decryptProperty(EmbeddedDataService.java:579)
            at com.metamatrix.dqp.embedded.services.EmbeddedDataService.getDecryptedProperties(EmbeddedDataService.java:543)
            at com.metamatrix.dqp.embedded.services.EmbeddedDataService.createConnectorManger(EmbeddedDataService.java:475)
            at com.metamatrix.dqp.embedded.services.EmbeddedDataService.getConnectorManager(EmbeddedDataService.java:432)
            at com.metamatrix.dqp.embedded.services.EmbeddedDataService.getConnectorManager(EmbeddedDataService.java:439)
            at com.metamatrix.dqp.embedded.services.EmbeddedDataService.startConnectorBinding(EmbeddedDataService.java:234)
            at com.metamatrix.dqp.embedded.services.EmbeddedDataService.startService(EmbeddedDataService.java:383)
            at com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService.start(EmbeddedBaseDQPService.java:88)
            at com.metamatrix.common.application.basic.BasicApplication.installService(BasicApplication.java:64)
            at com.metamatrix.dqp.config.DQPLauncher.createDqp(DQPLauncher.java:67)
            at com.metamatrix.dqp.embedded.DQPEmbeddedManager.createDQP(DQPEmbeddedManager.java:80)
            at com.metamatrix.jdbc.transport.LocalTransportHandler.initManager(LocalTransportHandler.java:183)
            at com.metamatrix.jdbc.transport.LocalTransportHandler.initManager(LocalTransportHandler.java:229)
            at com.metamatrix.jdbc.EmbeddedConnectionFactoryImpl.createConnection(EmbeddedConnectionFactoryImpl.java:90)
            at com.metamatrix.jdbc.EmbeddedDriver$EmbeddedTransport.createConnection(EmbeddedDriver.java:568)
            at com.metamatrix.jdbc.EmbeddedDriver.createConnection(EmbeddedDriver.java:133)
            at com.metamatrix.jdbc.EmbeddedDriver.connect(EmbeddedDriver.java:117)
            at java.sql.DriverManager.getConnection(DriverManager.java:582)
            at java.sql.DriverManager.getConnection(DriverManager.java:207)
            at com.fgm.mdad3l.TeiidExample.execute(TeiidExample.java:43)
            at com.fgm.mdad3l.TeiidExample.main(TeiidExample.java:16)

            • 3. Re: Embedded Driver Configuration
              rareddy

              We have seen some integration issues with crypto stuff if you are trying to use Teiid 6.0 with pre6.0 Teiid Designer, is that the case?

              The issue is, if the Designer has separate encryption key from the Teiid embedded, this can happen. Try the same versions. Also Teiid Embedded 6.0 has some new connector type property changes that pre-6.0 Teiid designer not aware of, so deploying the connectors would be difficult, without some manual work to fix them.

              If nothing works, you can open the VDB with zip utility, and edit the "ConfigurationInfo.def" file, and wipe the password fields to plain text passwords. This will get you over the issue, but password will be visible any one.

              Bouncy castle is not required. We will have some tooling around this feature later releases where you will be able to configure common encryption key between the Designer and Embedded runtime.

              • 4. Re: Embedded Driver Configuration
                kirkm

                That would be the problem. I will install the latest designer and try again.

                Thanks!

                • 5. Re: Embedded Driver Configuration
                  rareddy

                  Actually the Teiid Designer 6.0 is to be released in next week, so going back to pre-6.0 Embedded would be an option available until then.