Issue Details (XML | Word | Printable)

Key: JDBC-151
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Major Major
Assignee: Roman Rokytskyy
Reporter: Gregory Kotsaftis
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Jaybird JDBC Driver

Cannot execute FBBackupManager.backupDatabase() from a remote PC (it only works locally)

Created: 05/Feb/10 02:43 PM   Updated: 10/Sep/11 04:10 PM
Component/s: JDBC driver
Affects Version/s: Jaybird 2.1.6
Fix Version/s: None

Environment:
Windows XP Pro SP3 EN
Firebird installed via following system commands (not the guardian):
instreg install
instsvc install -superserver -demand


 Description  « Hide
The following Java code fails if executed from any remote PC. It only functions properly if executed on the server PC.
                FBBackupManager backupManager = new FBBackupManager("PURE_JAVA");
                backupManager.setBackupPath( filename );
                backupManager.setDatabase( database );
                backupManager.setUser( username );
                backupManager.setPassword( passwd );
                backupManager.setHost( dnsname );
                backupManager.setPort(3050);
                backupManager.backupDatabase();
The exception is:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 65. No message for code 65 found.
null
at org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:280)
at org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:215)
at org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:201)
...
at org.firebirdsql.gds.GDSException: No message for code 65 found.
null
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJavaGDSImpl.java:2791)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGDSImpl.java:2743)
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscServiceQuery(AbstractJavaGDSImpl.java:2942)
at org.firebirdsql.management.FBServiceManager.queueService(FBServiceManager.java:227)
at org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:275)
at org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:215)
at org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:201)
...


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Gregory Kotsaftis added a comment - 05/Feb/10 07:19 PM - edited
My Firebird version is 2.1.3 and my JDK is 1.6.0_u18

Gregory Kotsaftis added a comment - 06/Feb/10 08:05 AM
I also want to note that I was always getting the same exception even from the server PC, unless the backupManager.setXXX() commands where correct. Since there is no valid example for FBBackupManager, I had to guess the parameters. The exception message was not a help at all! For example I thought that backupManager.setBackupPath() was used to set the PATH and not the actual FILENAME, as the method name implies, and I was getting the same exception as well. I think there should be better exception handling and a couple of solid usage examples for the Services API. You have really made some very useful functions for Java developers to handle a Firebird installation, and it's a pitty we do not know how to use them! I myself had to go though the Jaybird source code and extensive google searching just to find out about the suggested use of FBBackupManager.

Kostas Filippaios added a comment - 18/Feb/10 04:16 PM
I also have exactly the same problem. This is a major problem in our development procedures because our specification is to be able to excecute backup from any remote PC. We are in a "dead end" here so it is mantatory for us to find a solution to this issue.
Thank you.

Roman Rokytskyy added a comment - 18/Feb/10 10:29 PM
I guess the main confusion comes from the fact that the path you specify there is a local path on a remote computer, exactly as you do in gbak command line. So, C:\Temp is a temp directory on a remote computer, not on your local.

If that is not the case, please join the Firebird-Java list and let's try to reproduce the issue there.

Gregory Kotsaftis added a comment - 19/Feb/10 09:05 AM - edited
Roman thanks; you are correct, I used a path that exists on the server and the backup works!
Again, if you could modify the exception message, trivial problems as this one can be avoided in the future.
Also please see if you could sum up some small examples of the Services API for Java, so we can use it.
It's a pity to actually have implemented the methods and no-one knows how to use them properly.
If Kostas has no objections, please feel free to close this issue.

Roman Rokytskyy added a comment - 15/Jul/11 06:52 PM
Just checked the code again, it works and produces the correct error message. Closing a ticket.