1 Reply Latest reply on Feb 16, 2017 4:21 PM by Steven Hawkins

    Migrating Teiid from 8.13 to 9.1.3 with jboss wildfly 10.0.0

    Kulbhushan Chaskar Master

      Hi,

       

      I am migrating  teiid from 8.13 to teiid 9.1.3 with jboss wildfly 10.0.0 where i am using teiid admin API to create dynamic vdb.

       

      I am trying to create an AdminAPI connection, which is represented by the org.teiid.adminapi.Admin interface,

      is obtained through the below metioned org.teiid.adminapi.AdminFactory.createAdmin method:

       

      Code snippet:

      CallbackHandler cbh = new AuthenticationCallbackHandler(userName, password.toCharArray());

        admin = AdminFactory.getInstance()

        .createAdmin(ModelControllerClient.Factory.create(serverHost, serverPort, cbh));

       

      But I am getting below exception while creating AdminAPI connection at 'AdminFactory.getInstance()'  point:

       

      java.lang.NoClassDefFoundError: javax/security/auth/callback/CallbackHandler

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Unknown Source)

        at com.test.tdm.teiid.internal.business.AdminApiClient.getAdminApi(AdminApiClient.java:131)

        at com.test.tdm.teiid.internal.business.AdminApiClient.<init>(AdminApiClient.java:106)

        at com.test.tdm.teiid.internal.business.AdminApiClientAccessor.createClient(AdminApiClientAccessor.java:69)

        at com.test.tdm.teiid.internal.business.AdminApiClientAccessor.getClient(AdminApiClientAccessor.java:81)

        at com.test.tdm.teiid.internal.management.TeiidMgmtService.deleteDataSource(TeiidMgmtService.java:101)

        at com.test.tdm.teiid.internal.management.TeiidMgmtService.createDataSourceWithVdb(TeiidMgmtService.java:133)

        at com.test.tdm.teiid.internal.management.TeiidMgmtService.testConnection(TeiidMgmtService.java:819)

        at com.test.tdm.teiid.internal.business.TeiidService.testConnection(TeiidService.java:88)

        at com.test.tdm.connection.internal.business.ConnectionService.testConnection(ConnectionService.java:273)

        at com.test.tdm.connection.internal.delegator.ConnectionDelegate.lambda$41(ConnectionDelegate.java:184)

        at java.util.Optional.ifPresent(Unknown Source)

        at com.test.common.communication.Either.apply(Either.java:39)

        at com.test.tdm.connection.internal.delegator.ConnectionDelegate.lambda$15(ConnectionDelegate.java:183)

       

      Caused by: java.lang.ClassNotFoundException: javax.security.auth.callback.CallbackHandler not found by com.test.teiid.utility [29]

        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)

        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)

        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        ... 141 more

       

       

      This is the first issue which I have faced during the migration,Please let me know if there is any more situation where I will have to make changes to avoid the such kind of errors.