Venu Annaram
Venu Annaram

Reputation: 287

Not able to connect VMware teradata database from windows 8(Host Machine) java application

I have installed in windows8 teradata in VMwere by following bellow link

http://kosmisch.net/Blog/DataAndBusinessIntelligence/Archive/2014/6/29/1a7ee23474544efb9e2318c7a771f74f.html

Now i am trying to connect the db from windows java application, but i am not able to connect it. i have given below credentials

con = DriverManager.getConnection("jdbc:teradata://192.168.10.182:1025/database=DBC", "dbc", "dbc");

getting exception like

2016-06-09.13:15:42.126 TERAJDBC4 ERROR [main]
com.teradata.jdbc.jdk6.JDK6_SQL_Connection@264b898 Connection to 192.168.128.128:1025 Thu Jun 09 13:15:42 IST 2016
socket orig=192.168.128.128:1025 cid=cd63cd3 sess=0 java.net.UnknownHostException: 192.168.128.128:1025: invalid IPv6 address 
at java.net.InetAddress.getAllByName(InetAddress.java:1141)   at java.net.InetAddress.getAllByName(InetAddress.java:1098) 
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:201)   at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost
(TDNetworkIOIF.java:301)   at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.java:149)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:135)
at com.teradata.jdbc.jdbc.GenericTeradataConnection.getIO(GenericTeradataConnection.java:130)
at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:98)   at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:207)
at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:35)  
at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6ConnectionFactory.java:25)   
at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:179)   
at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:169)   
at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:234)  
at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:160)   
at java.sql.DriverManager.getConnection(DriverManager.java:571)   
at java.sql.DriverManager.getConnection(DriverManager.java:215)   
at xteradatademo.TeradataExampl.buildCon(TeradataExampl.java:33)   
at xteradatademo.TeradataExampl.main(TeradataExampl.java:19)  

Can any one please help me.

Upvotes: 0

Views: 584

Answers (1)

Rob Paller
Rob Paller

Reputation: 7786

You do not need to specify a port number with a Type 4 JDBC driver, hence why it works without the port number. The error message suggests with the port number it is being interpreted as a malformed IPv6 address.

Upvotes: 1

Related Questions