babelfish-for-postgresql / babelfish_compass

Babelfish Compass: compatibility assessment tool for Babelfish for PostgreSQL
Apache License 2.0
108 stars 21 forks source link

Problem writing file/folder in OS (windows) #85

Closed rflsouza closed 2 years ago

rflsouza commented 2 years ago

It seems that the program has a permission problem or error to write to the windows FOLDER.

I tried with my user and with administrator. Follow the details:

I did the process on page 21 (captured sql queries) After I saved the profile file I ran the command

BabelfishCompass.bat MyReport MyCapture.xml -importfmt MSSQLProfilerXML

presented the following error:

Babelfish Compass v.2022-07, July 2022 Compatibility assessment tool for Babelfish for PostgreSQL Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

Reading BabelfishFeatures.cfg Latest Babelfish version supported: 2.1.1: BabelfishFeatures.cfg Creating user configuration file C:...\BabelfishCompass\BabelfishCompassUser.cfg **Error creating** C:\...\BabelfishCompass; please try again Exception in thread "main" java.io.FileNotFoundException: C:...BabelfishCompass\BabelfishCompassUser.cfg (The system cannot find the path specified) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at compass.CompassUtilities.openUserCfgFile(CompassUtilities.java:5940) at compass.CompassUtilities.openUserCfgFileNew(CompassUtilities.java:5935) at compass.CompassConfig.validateUserCfgFile(CompassConfig.java:118) at compass.CompassConfig.validateCfgFile(CompassConfig.java:95) at compass.Compass.main(Compass.java:739)

So I tried with the command with the -nooverride option

BabelfishCompass.bat MyReport MyCapture.xml -importfmt MSSQLProfilerXML -nooverride

presented the following error:

Babelfish Compass v.2022-07, July 2022 Compatibility assessment tool for Babelfish for PostgreSQL Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

Reading BabelfishFeatures.cfg Latest Babelfish version supported: 2.1.1: BabelfishFeatures.cfg Skipping C:\Users\RafaelSouza\Documents\BabelfishCompass\BabelfishCompassUser.cfg `Error creating C:...\Documents\BabelfishCompass; please try again` Error creating** C:...\Documents\BabelfishCompass\MyReport; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\imported; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\imported\html; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\imported\sym; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\captured; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\log; please try again Directory C:...\Documents\BabelfishCompass\MyReport\log should exist, but not found. Continuing... Error creating C:...\Documents\BabelfishCompass\MyReport\log; please try again Exception in thread "main" java.io.FileNotFoundException: C:...\Documents\BabelfishCompass\MyReport\log\session-log-MyReport-bbf.2.1.1-2022-ago-17-16.57.24.html (O sistema não pode encontrar o caminho especificado) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at compass.CompassUtilities.openSessionLogFile(CompassUtilities.java:2833) at compass.Compass.main(Compass.java:815)

Java version:

C:\temp\BabelfishCompass>java -version
java version "1.8.0_341"
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)

Windows: 10 Pro

rflsouza commented 2 years ago

I saw that the error is in the parameter of the file to analyze, even if the file is in the same folder, I need to put the full path.