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 201050 - IndexOutOfBounds when using grab file to recreate db
Summary: IndexOutOfBounds when using grab file to recreate db
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: -S1S-
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 16:23 UTC by Kenneth Ganfield
Modified: 2011-10-17 14:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Ganfield 2011-08-17 16:23:06 UTC
Product Version: NetBeans IDE Dev (Build 201108160601)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-384
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)
User directory: /Applications/NetBeans/userdirs/20110814
Cache directory: /Applications/NetBeans/userdirs/20110814/var/cache

When using the Recreate table from a grabbed schema, after you locate the grab file, the IDE opens the Name the Table dialog which contains the script.

If you click on the Edit table script button in the dialog, and then click OK, you get the StringIndexOutOfBoundsException. The table is not created



INFO [org.netbeans.modules.db.explorer.action.RecreateTableAction]: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1937)
	at org.netbeans.modules.db.explorer.dataview.DataViewWindow.<init>(DataViewWindow.java:128)
	at org.netbeans.modules.db.explorer.action.RecreateTableAction$WindowTask.run(RecreateTableAction.java:251)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
	at java.awt.EventQueue.access$000(EventQueue.java:85)
	at java.awt.EventQueue$1.run(EventQueue.java:638)
	at java.awt.EventQueue$1.run(EventQueue.java:636)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused: org.netbeans.api.db.explorer.DatabaseException
	at org.netbeans.modules.db.explorer.action.RecreateTableAction.runWindow(RecreateTableAction.java:225)
	at org.netbeans.modules.db.explorer.action.RecreateTableAction.access$100(RecreateTableAction.java:76)
[catch] at org.netbeans.modules.db.explorer.action.RecreateTableAction$1.run(RecreateTableAction.java:156)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 1 Jiri Rechtacek 2011-10-14 16:23:23 UTC
Unable to reproduce it recent nightly builds. Ken, reopen if appear again. Will be best if you verify it's works for you too. Thanks
Comment 2 Kenneth Ganfield 2011-10-17 14:26:27 UTC
Seems to work for me now.