"Unfilled mandatory fields"
Database Subsetter and Relational Data Browser
Brought to you by:
rwisser
Some magic happened
To: schema in same database
Receipt: (filled)
Working table schema: (filled)
Target schema: (filled)
Source schema: (filled)
And yet Customer DBA gets "Unfilled mandatory fields" when tries to click [Export] button.
Console export works.
Checked relevant block:
boolean err = false;
if (insert.getText().trim().length() == 0 && (!delete.isVisible() || delete.getText().trim().length() == 0)) {
exportLabel.setForeground(Color.RED);
err = true;
}
if (scriptFormat == ScriptFormat.INTRA_DATABASE) {
for (Map.Entry<String, JTextField> e: schemaMappingFields.entrySet()) {
if (e.getValue().getText().trim().length() == 0) {
JLabel label = schemaMappingLabels.get(e.getKey());
if (label != null) {
label.setForeground(Color.RED);
}
err = true;
}
}
}
if (err) {
JOptionPane.showMessageDialog(this, "Unfilled mandatory fields", "Error", JOptionPane.ERROR_MESSAGE);
And feel that key fields are
1. Receipt:
2. Target schema:
Noted that NO LABEL gets RED.
which implies that "if (label != null)" is not working.
God knows how that happens.
Customer uses same .jar file as me.
I get away happy -- he=not.
Anonymous
The panel in which the schemaMappingLabels (and the input fields) are located is switched to invisible if there is exactly 1 schema, because the schema mapping is then irrelevant.
Unfortunately, because of the persistence of the dialog state, the fields can be initialized with the empty string. Since label and field are invisible, you can not see that and can not correct it.
I corrected that.
Lightning-MacWisser ;)
2 times.
I've compiled pushed this to Customer, but they've got so fond of doing it the command line way that didn't try that yet.
I'll ask them to verify this issue after they would see for themselves first pass.
Customer claims current master still doesn't let him click [Export].
At the bottom there's command line text, he runs that in command line, and it works fine.
Seems that something is still lurking somewhere.
If there are tables in the data model from several schemas, but the tables associated with a subject are all in the same schema, then for each schema, 1 field was created for the "target schema" entry, but only one was displayed. However, all fields were checked so that this error occurred. I corrected that.
hmm, I'm not sure -- all tables in datamodel are there from analyzing database, and there was one and only schema.
also: same database model was used by me, and by DBA@Customer (git checkout by tag),
and so there I expect no discrepancy.
but would give it a go. thanks, Ralf!
Last edit: Alexander Petrossian (PAF) 2018-12-27