Bug in parsing the short version jdbc connection string
Showing
4 changed files
with
7 additions
and
5 deletions
No preview for this file type
... | @@ -94,11 +94,11 @@ public class OraMonRESTgetData extends HttpServlet { | ... | @@ -94,11 +94,11 @@ public class OraMonRESTgetData extends HttpServlet { |
94 | } | 94 | } |
95 | String conStr, usrStr, pwdStr; | 95 | String conStr, usrStr, pwdStr; |
96 | if(serviceName) { | 96 | if(serviceName) { |
97 | conStr = "jdbc:oracle:thin:@" + conStrParamArray[0] + ":" + conStrParamArray[1]; | 97 | conStr = "jdbc:oracle:thin:@//" + conStrParamArray[0] + ":" + conStrParamArray[1]; |
98 | usrStr = conStrParamArray[2]; | 98 | usrStr = conStrParamArray[2]; |
99 | pwdStr = conStrParamArray[3]; | 99 | pwdStr = conStrParamArray[3]; |
100 | } else { | 100 | } else { |
101 | conStr = "jdbc:oracle:thin:@" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2]; | 101 | conStr = "jdbc:oracle:thin:@//" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2]; |
102 | usrStr = conStrParamArray[3]; | 102 | usrStr = conStrParamArray[3]; |
103 | pwdStr = conStrParamArray[4]; | 103 | pwdStr = conStrParamArray[4]; |
104 | } | 104 | } | ... | ... |
... | @@ -89,9 +89,9 @@ public class OraMonRESTgetMetrics extends HttpServlet { | ... | @@ -89,9 +89,9 @@ public class OraMonRESTgetMetrics extends HttpServlet { |
89 | } | 89 | } |
90 | String conStr; | 90 | String conStr; |
91 | if(serviceName) { | 91 | if(serviceName) { |
92 | conStr = "jdbc:oracle:thin:@" + conStrParamArray[0] + ":" + conStrParamArray[1]; | 92 | conStr = "jdbc:oracle:thin:@//" + conStrParamArray[0] + ":" + conStrParamArray[1]; |
93 | } else { | 93 | } else { |
94 | conStr = "jdbc:oracle:thin:@" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2]; | 94 | conStr = "jdbc:oracle:thin:@//" + conStrParamArray[0] + ":" + conStrParamArray[1] + ":" + conStrParamArray[2]; |
95 | } | 95 | } |
96 | monitor = Registry.find(conStr); | 96 | monitor = Registry.find(conStr); |
97 | if(monitor == null) { | 97 | if(monitor == null) { | ... | ... |
... | @@ -17,7 +17,9 @@ public class TestRunner { | ... | @@ -17,7 +17,9 @@ public class TestRunner { |
17 | //ArrayList<OraMon> oraList = new ArrayList<OraMon>(); | 17 | //ArrayList<OraMon> oraList = new ArrayList<OraMon>(); |
18 | ArrayList<OraMon> oraList = Registry.getList(); | 18 | ArrayList<OraMon> oraList = Registry.getList(); |
19 | 19 | ||
20 | OraMon mon1 = new OraMon("jdbc:oracle:thin:@uvp3dbkappkg:1550:VP1K03","dbsnmp","dbsnmp"); // SID eller Service Name format | 20 | //OraMon mon1 = new OraMon("jdbc:oracle:thin:@uvp3dbkappkg:1550:VP1K03","dbsnmp","dbsnmp"); // SID eller Service Name format |
21 | //OraMon mon1 = new OraMon("jdbc:oracle:thin:@//u00154.kap.rsv.se:1526/DB1K01","dbsnmp","dbsnmp"); | ||
22 | OraMon mon1 = new OraMon("jdbc:oracle:thin:@//u03634.kap.rsv.se:1526/DA1K001","dbsnmp","dbsnmp"); | ||
21 | //OraMon mon2 = new OraMon("jdbc:oracle:thin:@host:port:sid","user","pass"); // SID format | 23 | //OraMon mon2 = new OraMon("jdbc:oracle:thin:@host:port:sid","user","pass"); // SID format |
22 | mon1.open(); | 24 | mon1.open(); |
23 | //mon2.open(); | 25 | //mon2.open(); | ... | ... |
-
Please register or sign in to post a comment