Subject Problem with backup
Author STI Fábrica de Software
I am trying to do just that backup is showing the following error:

public void backUpBD(String caminhoBD, String caminhoBKP){

try {

//File f = new File(caminhoBKP);

FBBackupManager fbbm = new FBBackupManager("PURE_JAVA");

fbbm.setBackupPath(caminhoBKP); //f.getAbsolutePath());

fbbm.setDatabase(caminhoBD);

fbbm.setUser(prop.getProperty("usuario"));

fbbm.setPassword(prop.getProperty("senha"));

fbbm.backupDatabase(); // line 81

} catch (SQLException ex) {

setErro(ex.toString());

javax.swing.JOptionPane.showMessageDialog(null,

"Erro na operação de BackUp - " + ex, "Erro!!",

javax.swing.JOptionPane.ERROR_MESSAGE);

}

}
This is a error:


Exception occurred during event dispatching:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(String.java:1938)

at
org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscServiceAttach(AbstractJavaGDSImpl.java:2573)

at
org.firebirdsql.management.FBServiceManager.attachServiceManager(FBServiceManager.java:207)

at
org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:272)

at
org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:215)

at
org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:201)

at br.eti.stifabricasw.model.GeraBD.backUpBD(GeraBD.java:81)

at
br.eti.stifabricasw.principal.FormBackUpRestore.jbtSalvarActionPerformed(FormBackUpRestore.java:146)

at
br.eti.stifabricasw.principal.FormBackUpRestore.access$100(FormBackUpRestore.java:20)

at
br.eti.stifabricasw.principal.FormBackUpRestore$2.actionPerformed(FormBackUpRestore.java:62)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

at java.awt.Component.processMouseEvent(Component.java:6038)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)

at java.awt.Component.processEvent(Component.java:5803)

at java.awt.Container.processEvent(Container.java:2058)

at java.awt.Component.dispatchEventImpl(Component.java:4410)

at java.awt.Container.dispatchEventImpl(Container.java:2116)

at java.awt.Component.dispatchEvent(Component.java:4240)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)

at java.awt.Container.dispatchEventImpl(Container.java:2102)

at java.awt.Window.dispatchEventImpl(Window.java:2429)

at java.awt.Component.dispatchEvent(Component.java:4240)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)

at java.awt.Dialog$1.run(Dialog.java:1039)

at java.awt.Dialog$3.run(Dialog.java:1091)

at java.security.AccessController.doPrivileged(Native Method)

at java.awt.Dialog.show(Dialog.java:1089)

at java.awt.Component.show(Component.java:1419)

at java.awt.Component.setVisible(Component.java:1372)

at java.awt.Window.setVisible(Window.java:801)

at java.awt.Dialog.setVisible(Dialog.java:979)

at
br.eti.stifabricasw.principal.Principal.jMenuItem2ActionPerformed(Principal.java:185)

at br.eti.stifabricasw.principal.Principal.access$600(Principal.java:23)

at
br.eti.stifabricasw.principal.Principal$7.actionPerformed(Principal.java:135)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.AbstractButton.doClick(AbstractButton.java:357)

at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)

at
javax.swing.plaf.basic.BasicPopupMenuUI$Actions.doReturn(BasicPopupMenuUI.java:439)

at
javax.swing.plaf.basic.BasicPopupMenuUI$Actions.actionPerformed(BasicPopupMenuUI.java:413)

at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)

at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)

at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)

at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)

at
javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2926)

at javax.swing.JComponent.processKeyBindings(JComponent.java:2918)

at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)

at java.awt.Component.processEvent(Component.java:5815)

at java.awt.Container.processEvent(Container.java:2058)

at java.awt.Component.dispatchEventImpl(Component.java:4410)

at java.awt.Container.dispatchEventImpl(Container.java:2116)

at java.awt.Component.dispatchEvent(Component.java:4240)

at
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)

at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:697)

at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:962)

at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:834)

at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:661)

at java.awt.Component.dispatchEventImpl(Component.java:4282)

at java.awt.Container.dispatchEventImpl(Container.java:2116)

at java.awt.Window.dispatchEventImpl(Window.java:2429)

at java.awt.Component.dispatchEvent(Component.java:4240)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

--
~~~~^^~~~~^^~~~~^^~~~~
Jean Carlos C. Alencar
STI - Fábrica de SoftWare
Java + Firebird = :-) :-) :-)
www.stifabricasw.eti.br
sti.fabricasw@...
jean@...
Petrolina/PE
^^^^~~^^^^~~^^^^~~^^^^~~


[Non-text portions of this message have been removed]