• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC Connection to Unidata

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to connect to Unidata using jdbc and after resolving the classpath issues, since a jar file "unijdbc.jar" & a zip "asjava.zip" were to be included for various jdbc classes to be available, am now stuck at a error code which suggest that i have an RPC issue. In short the error message says : "Middleware connect fail:UniRPCConnection failed to establish a connection with the remote host. The returned error code=81014".

The code snippet goes something like this :

public class jdbcsample {

public static void main(String[] argc)
{
Connection con = null;
try {
System.out.println("Connecting Step 0...");
String url = "jdbc:ibm-u2://10.xxx.xxx.xxx/SUNXXX;user=XXXXX;password=XXXXX";
String driver = "com.ibm.u2.jdbc.UniJDBCDriver";
System.out.println("Connecting Step 1...");
Class.forName(driver);
System.out.println("Connecting Step 2...");
con = DriverManager.getConnection(url);

} catch ( SQLException e ) {
System.out.println("Ex-Message :" + e.getMessage());
System.out.println("Ex-Code :" + e.getErrorCode()) ;
System.out.println("Ex-SQLState:" + e.getSQLState());
System.out.println("Ex-Next :" + e.getNextException());
e.printStackTrace() ;
System.gc();
} catch ( Exception e) {
System.out.println("Exception caught:"+e) ;
e.printStackTrace() ;
}
}
}

The error code comes as
Connecting Step 0...
Connecting Step 1...
Connecting Step 2...
Ex-Message :Middleware connect fail:UniRPCConnection failed to establish a connection with the remote host. The returned error code=81014.
Ex-Code :930021
Ex-SQLState:08001
Ex-Next :null
java.sql.SQLException: Middleware connect fail:UniRPCConnection failed to establish a connection with the remote host. The returned error code=81014.
at com.ibm.u2.jdbc.UniJDBCMsgFactory.createException(UniJDBCMsgFactory.java:114)
at com.ibm.u2.jdbc.UniJDBCExceptionSupport.addAndThrowException(UniJDBCExceptionSupport.java:62)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.connect(UniJDBCProtocolU2Impl.java:784)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.executeOpenDatabase(UniJDBCProtocolU2Impl.java:279)
at com.ibm.u2.jdbc.UniJDBCConnectionImpl.<init>(UniJDBCConnectionImpl.java:138)
at com.ibm.u2.jdbc.UniJDBCDriver.connect(UniJDBCDriver.java:111)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at dee.jdbcsample.main(jdbcsample.java:23)

Any suggestions as to what could possibly be wrong, since i checked for Unirpc as well the connecting remote server and ps -ef | grep unirpc yields
# ps -ef | grep unirpc
root 465 1 0 Feb 07 ? 0:00 /usr/ud61/unishared/unirpc/unirpcd
root 17108 16976 0 17:43:28 pts/5 0:00 grep unirpc
so i believe am working okay as far as RPC part on the remote server is concerned. If you feel i should look into few more aspects ,kindly let me know. Thanks again
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic