This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270540

Summary: StringIndexOutOfBoundsException: String index out of range: -5
Product: db Reporter: prodigy4440
Component: CodeAssignee: matthias42
Status: RESOLVED INCOMPLETE    
Severity: normal CC: javydreamercsw
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 157855
Attachments: stacktrace
stacktrace

Description prodigy4440 2017-05-03 07:10:35 UTC
Build: NetBeans IDE 8.2 (Build 201609300101)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.131-b11, Java(TM) SE Runtime Environment, 1.8.0_131-b11
OS: Linux

User Comments:
GUEST: I do not know

GUEST: Trying to run a class with a main inside the maven web project.

GUEST: aa

prodigy4440: After installing kotlin plugin

GUEST: I opened the Procedures section in a mysql Database. There quite a lot of procedures in this database (like 30 or so...)




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -5
   at java.lang.String.substring(String.java:1967)
   at com.mysql.jdbc.DatabaseMetaData$TypeDescriptor.<init>(DatabaseMetaData.java:214)
   at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:1704)
   at com.mysql.jdbc.DatabaseMetaData.getProcedureOrFunctionColumns(DatabaseMetaData.java:4305)
   at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:4146)
   at org.netbeans.modules.db.metadata.model.jdbc.JDBCProcedure.createProcedureInfo(JDBCProcedure.java:151)
Comment 1 prodigy4440 2017-05-03 07:10:38 UTC
Created attachment 164231 [details]
stacktrace
Comment 2 javydreamercsw 2017-07-07 16:25:36 UTC
Created attachment 164720 [details]
stacktrace

Not sure what tiggered it. Was doing inspect and transform on can use diamond.
Comment 3 matthias42 2017-07-19 18:55:37 UTC
I suspect a problem with the mysql driver or the mysql database. The problem of  javydreamercsw can be explained by a parallel running update of the database metadata.

Can anybody of you reproduce the issue (expanding the procedure nodes of mysql databases should trigger the issue) and would be willing to test?