Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLCL on windows. Error executing javascript

IOcampoApr 26 2016 — edited Apr 26 2016

I'm using sqlcl trying to execute a javascript to upload files into blob field.

https://github.com/oracle/oracle-db-tools/blob/master/sqlcl/examples/blob.helper.all.js

DB connexion it's ok bet when I ran the script I receive the following error:

SQL> script load_file_to_db.js

javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "load" is not defined. (<Unknown source>#1) in <Unknown source> at line number 1

My script:

load('https://raw.githubusercontent.com/oracle/Oracle_DB_Tools/master/sqlcl/lib/helpers.js');

/* File name */

var files= helpers.exec('find . -maxdepth 1 -type f ').stdout.split('\n');

/* bind for reuse */

var binds = helpers.getBindMap();

for(f in files ) {

    /* load the blob */

  blob = helpers.getBlobFromFile(files[f]);

  /* assign the binds */

  binds.put("path",files[f]);

  binds.put("b",blob);

/* Just do it */

  var ret = util.execute("insert into k(path,blob_content,when) values(:path , :b, sysdate)",binds);

}

Comments

User_LYSW0

I'm facing the same issue after 20.2 upgrade as well..

Answer

Hi,
Thanks for reporting this, and apologies for the delay in responding. This was easy to reproduce, and I've filed bug #32122067 to track it. We'll also update the thread with any workaround, when we have it.
Regards,
Anthony

Marked as Answer by tvbishan · Nov 6 2020
Tim Kimberl-Oracle

Until this is patched, here is a temporary bit of css you can add to your app to fix this issue.

.a-GV-columnItem .apex-item-group--auto-complete {
  display: flex;
}

.a-GV-columnItem .apex-item-group--auto-complete .oj-form-control,
.a-GV-columnItem .apex-item-group--auto-complete .oj-inputsearch-choice {
  display: flex;
  flex-grow: 1;
}

Thanks,
Tim

User_Y6MKJ
Hello, I would like to know how I apply the code above, 
through the page itself in the CSS part and call the class in the Css Classes of the column, 
or in the General theme?

Sincerely, Mariangela

Leon_M

Copy and paste the code in your Page Inline CSS

User_Y6MKJ

Thank you!

Leon_M

@tim-kimberl-oracle Thanks for the fix!
Can you also have a look at another issue with autocomplete please:
https://community.oracle.com/tech/developers/discussion/4483380/apex-20-2-autocomplete-issue-need-solution#latest

1 - 7

Post Details

Added on Apr 26 2016
0 comments
72 views