3 Replies Latest reply on Dec 9, 2015 10:23 AM by Ramesh Reddy

    Not able to connect to teiid server through AdminApi

    Nishant Agrawal Novice

      Hi Everyone. I am facing problem while using AdminApi from my test api to deploy VDB which needs to connect to teiid server. ( I tried different methods also other than deploy)

      But Its throwing connection exception.

      I am currently using teiid 7.7 version on JBOSS AS 5.1.


      Please help me on this.


      Exception in thread "main" org.teiid.poc.AdminApiClientException: TEIID70015 java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out


      I tried passing different ports like :8080 ,9999,31443. and Hostname as, still getting same error

      please find snippet of my code :


      CallbackHandler cbh = new AuthenticationCallbackHandler("admin", "admin".toCharArray());

      this.admin = AdminFactory.getInstance().createAdmin(ModelControllerClient.Factory.create(localhost, 9999,cbh));


      final Properties p = new Properties();


      p.setProperty("pool-name", "marketdata-file");

      p.setProperty("max-pool-size", "4");

      p.setProperty("enabled", "true");

      p.setProperty("use-java-context", "true");

      p.setProperty("ParentDirectory", "../data/");

      p.setProperty("AllowParentPaths", "true");

      this.admin.createDataSource("java:/marketdata-file3", "file", p);

      I am getting exception at last line of code.