Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot execute FBBackupManager.backupDatabase() from a remote PC (it only works locally) [JDBC151] #103

Closed
firebird-automations opened this issue Feb 5, 2010 · 11 comments

Comments

@firebird-automations
Copy link

Submitted by: Gregory Kotsaftis (gregkotsaftis)

Assigned to: Roman Rokytskyy (rrokytskyy)

Votes: 2

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)
...

@firebird-automations
Copy link
Author

Commented by: Gregory Kotsaftis (gregkotsaftis)

My Firebird version is 2.1.3 and my JDK is 1.6.0_u18

@firebird-automations
Copy link
Author

Commented by: Gregory Kotsaftis (gregkotsaftis)

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.

@firebird-automations
Copy link
Author

Modified by: Gregory Kotsaftis (gregkotsaftis)

Version: Jaybird 2.1.6 [ 10285 ]

Version: Jaybird 2.1.3 [ 10252 ] =>

@firebird-automations
Copy link
Author

Commented by: Kostas Filippaios (kosfil)

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.

@firebird-automations
Copy link
Author

Commented by: Roman Rokytskyy (rrokytskyy)

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.

@firebird-automations
Copy link
Author

Commented by: Gregory Kotsaftis (gregkotsaftis)

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.

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

Fix Version: Jaybird 2.2 [ 10053 ]

timeestimate: 0 [ 0 ]

timeoriginalestimate: 0 [ 0 ]

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Commented by: Roman Rokytskyy (rrokytskyy)

Just checked the code again, it works and produces the correct error message. Closing a ticket.

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.2 [ 10053 ] =>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant