Guest User

Untitled

a guest
Oct 24th, 2017
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. java.sql.SQLException: The service in process is not supported. Unable to obtain Principal Name for authentication
  2. at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
  3. at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
  4. at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
  5. at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:480)
  6. at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
  7. at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
  8. at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
  9. at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
  10. at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
  11. at java.sql.DriverManager.getConnection(DriverManager.java:664)
  12. at java.sql.DriverManager.getConnection(DriverManager.java:208)
  13. at talendtest.tbillingops_0_1.tBillingOPS.tOracleConnection_1Process(tBillingOPS.java:614)
  14. at talendtest.tbillingops_0_1.tBillingOPS.runJobInTOS(tBillingOPS.java:6515)
  15. at talendtest.tbillingops_0_1.tBillingOPS.main(tBillingOPS.java:6333)
  16. Caused by: oracle.net.ns.NetException: The service in process is not supported. Unable to obtain Principal Name for authentication
  17. at oracle.net.ano.AuthenticationService.h(Unknown Source)
  18. at oracle.net.ano.Ano.negotiation(Unknown Source)
  19. at oracle.net.ns.NSProtocol.connect(NSProtocol.java:405)
  20. at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
  21. at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
  22. ... 9 more
  23.  
  24. Output of klist:
  25. pagupta@xxxxxxxxx:~/> klist
  26. Ticket cache: FILE:/tmp/krb5cc_8483390
  27. Default principal: xxxxxx@yyy.zzzzzz.NET
  28. Valid starting Expires Service principal
  29. 10/10/17 13:28:23 10/10/17 23:28:23 krbtgt/xxxx.yyyyyyy.zzz@xx.yyy.NET
  30. renew until 10/11/17 13:28:23
  31. Kerberos 4 ticket cache: /tmp/tkt8483390
  32. klist: You have no tickets cached
  33.  
  34. java.util.Properties prop = new java.util.Properties();
  35. prop.setProperty(oracle.jdbc.OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_SERVICES,"("+oracle.net.ano.AnoServices.AUTHENTICATION_KERBEROS5+")");
  36. prop.setProperty(oracle.jdbc.OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_MUTUAL,"true");
  37. prop.setProperty(oracle.jdbc.OracleConnection.CONNECTION_PROPERTY_THIN_NET_AUTHENTICATION_KRB5_CC_NAME,"/tmp/krb5cc_8483390");
  38. System.setProperty("java.security.krb5.conf","/home/pagupta/krb5.conf");
  39. String url_tOracleConnection_1 = "jdbc:oracle:thin:@(description=(address=(protocol=tcp)(host="+ context.DB_HOST+ ")(port="+ context.DB_PORT+ "))(connect_data=(service_name="+ context.DB_SRV+ ")))";
  40. java.sql.DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
  41. oracle.jdbc.OracleDriver dri= new oracle.jdbc.OracleDriver();
  42. conn_tOracleConnection_1 = java.sql.DriverManager.getConnection(url_tOracleConnection_1,prop);
  43. System.out.print("Connected");
  44.  
  45. SQLNET.AUTHENTICATION_SERVICES=(KERBEROS5)
  46. SQLNET.AUTHENTICATION_KERBEROS5_SERVICE=kservice
Add Comment
Please, Sign In to add comment