A gpload control file processing error occurred. Entry must be a YAML sequence - database

I want to load data into a greenplum database with gpload.py (Windows Server). But I only get a weird output:
|ERROR|A gload control file processing error occured. The gpload:input:source(1):file entry must be a YAML sequence
I tried to use gpload with linux and it worked fine. So my yaml file and my input data should be correct.
Does anyone know how to fix that problem?

You should post the yaml config file you are using to make sure there are no other problems. But I would guess since you said that it works on linux but not on windows that you have a line ending problem.
YAML files are line and whitespace sensitive. Try editing the file with a local editor on the Windows machine.

Related

What are common pscp command issues?

I am transferring files from Windows server to Unix server using pscp command.
About 30% files are not getting transferred, I am not getting any specific error in the logs,apart from this:
pscp: MP*.xml: No such file or directory
What can be the possible reason of some files not getting transferred?
What are the common issues with pscp?
Please suggest.
The source files you are trying to copy could be locked for editing. I suggest you close all other applications, restart, and try again.

.net core console app not runing when called from .bat file

I have created a .net core 2.0 app and can run it by using Powershell and navigating to the project folder and calling dotnet run.
If I add a .bat file containing the above command and call myFile.bat I get the error
'´╗┐dotnet' is not recognized as an internal or external command,
So I tried adding dotnet myProject.dll in the batch file and get the same error.
I have read the the two ╗┐ characters are an encoding issue, so I changed my .bat file to UTF8, but that had not effect.
What have I done wrong?
Those strange characters are indeed an encoding issue, they are called Byte order marks. These are useful to programs which consume text streams, informs them of some meta information about the text that follows.
Not particularly useful for you however because the windows command prompt does not understand them. To fix this open the file up in notepad and save the file with an ANSI encoding, cmd should understand how to handle it.

theme.res file does not open anymore, codename one themes

Themes.res file is not opening.
What do i do ?
However, the app is working.
The exception that I am getting on the console while opening the file is:
java.lang.NullPointerException
at com.codename1.ui.util.Resources.createImage(Resources.java:936)
at com.codename1.ui.util.EditableResources.createImage(EditableResources.java:2332)
at com.codename1.ui.util.Resources.loadFont(Resources.java:1119)
at com.codename1.ui.util.EditableResources.loadFont(EditableResources.java:1932)
at com.codename1.ui.util.EditableResources.openFileWithXMLSupport(EditableResources.java:426)
at com.codename1.designer.ResourceEditorView$LoadResourceFileAction.exectute(ResourceEditorView.java:4112)
at com.codename1.ui.resource.util.BlockingAction.run(BlockingAction.java:88)
at java.lang.Thread.run(Unknown Source)
Is there any way I can recover this file / data ?
First verify that the file isn't a 0 size file, if it got corrupted to that level you will need to restore from backup. This hasn't happened for us in years as far as I know but its always a risk.
Next make sure you didn't remove/rename any ttf fonts that might be used by the theme, this is a common cause for failures in the designer.
Next we need to see the actual error and to do that we need to run the designer from command line using:
java -jar ~/.codenameone/designer_1.jar
(code for Mac/Linux replace ~ with your home directory and reverse the slashes for Windows).
Now try to open the resource file and see if you get an exception in the console. Assuming you do we will know more about it and might be able to help you recover your data.
We are currently migrating to new XML based format which should become the default soon.

Perl Script not locating File via its set path

I am working on a reporting tool called MARS (Multi Access Reporting Service). This is a tool which reads reports via a SQL server. We have a local machine test environment setup which has everything running fine but when we upload onto the Windows Server 2008 it seems to not want to locate a "required" file. We are running Perl(v5.14.2) on the server and an older version on the desktop/local.
the error i am receieving is:
*HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Can't locate jsdb.pl in #INC (#INC contains: /Inetpub/Scripts /Inetpub/Scripts/Security c:/Perl/site/lib c:/Perl/lib .) at \gl-0185-nas07p\MCL_Dev_MPN_GL\Green_App\MARS\Scripts\Security\security.pl line 7. ".*
Here is the header on the Security.pl file which clearly has the set path and file in it:
use CGI qw/:standard *table start_ul/;
use Date::Calc;
use Win32::ODBC;
use POSIX qw(floor);
###
use lib "/Inetpub/Scripts/Security";
require "jsdb.pl";
###
require "javascript.pl";
require "SecurityUtils.pl";
use lib "/Inetpub/Scripts";
require "webpageutils.pl";
Within the JSDB file is the code for the "Profiles" tab which is used to setup and modify users of the system.
Any help is really appreciated as we cannot seem to get our heads around it.
You seem to be insensitive to case sensitivity, i.e. in the file it is listed as jsdb.pl and in your question you identify it as JSDB. Also, the error message identifies the offending file as security.pl, but your question calls it Security.pl. Perl is case sensitive. Is it possible this could be a factor, e.g. the jsdb.pl file is actually named JSDB.pl?
Where is jsdb.pl? From your source file I would guess it's in /Inetpub/Scripts/Security which doesn't look like a Windows path to me.
At a guess, only C:/Perl/site/lib and C:/Perl/lib exist on your Windows Server machine, and the other paths are either different on that machine or you simply have no access to jsdb.pl from there
Also, you don't seem to be using use strict and use warnings at the top of your code, and your method of using libraries by require 'library.pl' could be very much better

File extension .DB - What kind of database is it exactly?

I have a database file with .DB file extension. I have been googling and it looks like SQLite. I tried to connect to it using SQLite and SQLite3 drivers and I am getting an error "File is encrypted or not a database".
So I dont know if file is encrypted or it is not an SQLite database. Are there any other options what should the .DB extension should be? How do I find out that file is encrypted?
I tried to open it in the text editor and it is mostly a mess of charaters and some times there are words visible. I have uploaded the file here: http://cl.ly/3k0E01373r3v182a3p1o for the closer look.
Thank you for your hints and ideas what to do and how to work with this file.
Marco Pontello's TrID is a great way to determine the type of any file.
TrID is simple to use. Just run TrID and point it to the file to be analyzed. The file will be read and compared with the definitions in the database. Results are presented in order of highest probability.
Just download the executable and the latest definitions file into the same directory and then run TrID:
trid.exe "path/to/file.xyz"
It will output a list of possible file types for the file with a confidence rating. Here's a screenshot of using TrID to analyze a SQLite database file:
There's also a GUI version called TrIDNet:
If you're on a Unix-like platform (Mac OS X, Linux, etc), you could try running file myfile.db to see if that can figure out what type of file it is. The file utility will inspect the beginning of the file, looking for any clues like magic numbers, headers, and so on to determine the type of the file.
Look at the first 30 bytes of the file (open it in Notepad, Notepad++ or another simple text viewer). There's usually some kind of tag or extension name in there.
Both SQLite 2 and SQLite 3 have a very clear message: SQLite format 3 for SQLite 3 (obviously) and This file contains an SQLite 2.1 database for SQLite 2.
Note that encrypted SQLite databases don't have a header like that since the entire file is encrypted. See siyw's comment below.
On a Unix-like system (or Cygwin under Windows), the strings utility will search a file for strings, and print them to stdout. Might help you narrow the field.
There are a lot of programs besides database programs that use a "db" extension, including
ArcView Object Database File (ESRI)
MultiEdit
Netscape
Palm
and so on. Google "file extensions" for some sites that catalog file extensions and the programs that use them.
There's no conclusive way to know, because SQLite encrypts the entire database file, including the header.
Further, there's not a lot of difference to you, except for possible error text to a user if you're prompting them for a password.

Resources