xjr100419 opened a new issue #1296: fix mysql Connection URL Syntax
URL: https://github.com/apache/incubator-skywalking/issues/1296
 
 
   
   - Why do you submit this issue?
   
   My orm framework mysql link does not specify the database:
   protocol//[hosts][/database][?properties]  -》protocol//[hosts][?properties]
   
   In code
   MysqlURLParser.fetchDatabaseHostsIndexRange() 
   `
   protected URLLocation fetchDatabaseHostsIndexRange() {
           int hostLabelStartIndex = url.indexOf("//");
           int hostLabelEndIndex = url.indexOf("/", hostLabelStartIndex + 2);
           return new URLLocation(hostLabelStartIndex + 2, hostLabelEndIndex);
       }
   `
   
   thent it  report an error
   `
   ERROR 2018-05-31 10:21:06 InstMethodsInter :  class[class 
com.mysql.jdbc.Driver] after method[connect] intercept failure 
   java.lang.StringIndexOutOfBoundsException: String index out of range: -14
        at java.lang.String.substring(String.java:1967)
        at 
org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.MysqlURLParser.parse(MysqlURLParser.java:59)
        at 
org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.URLParser.parser(URLParser.java:48)
   `
   
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to