can't add external js script to javascript Evaluator in streamsets - streamsets

I am using external javascript inside javascript evaluator in streamsets. But when i try to load the external code i got following error. How should i resolve this. Thanks
ERROR SafeScheduledExecutorService - Uncaught throwable from
com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable#69717812:
com.streamsets.datacollector.util.PipelineException: PREVIEW_0003 -
Encountered error while previewing :
java.security.AccessControlException: access denied
("java.io.FilePermission"
"/opt/streamsets-datacollector-user-libs/test.js" "read")
com.streamsets.datacollector.util.PipelineException: PREVIEW_0003 -
Encountered error while previewing :
java.security.AccessControlException: access denied
("java.io.FilePermission"
"/opt/streamsets-datacollector-user-libs/test.js" "read")

As I've responded elsewhere, you will need to add a security policy to be able to load a script file. Add the following to $SDC_CONF/sdc-security.policy :
// Set global perm so that JS can load scripts from this directory
// Note - this means any code in the JVM can read this dir!
grant {
permission java.io.FilePermission "/opt/streamsets-datacollector-user-libs/-", "read";
};
You will need to restart Data Collector for changes to the security policy file to take effect.

Related

HerePositioningClient fails to initalize

While working with HERE-SDK for flutter, HerePositioningClient fails to initialize with the error:
onInitializationFailed. API token that failed: com.here.services.location.LocationServices$1#2bdef2b
Additionally, the ActivityThread throws this error:
E/ActivityThread(12002): Service com.here.services.internal.LocationService has leaked IntentReceiver com.here.odnp.util.AlarmTimer$Scheduler#163882d that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(12002): android.app.IntentReceiverLeaked: Service com.here.services.internal.LocationService has leaked IntentReceiver com.here.odnp.util.AlarmTimer$Scheduler#163882d that was originally registered here. Are you missing a call to unregisterReceiver()?
Update:
Fixed this issue by adding all the possible permissions required as in the example files provided. Just adding Location and Activity permission was not enough.

AEM 6.2 create backup issue

While creating new online backup of my Author instance it is showing error showing below:
In the log it is showing error:
30.11.2017 12:11:59.105 *ERROR* [112.196.146.254 [1512043919094] GET /libs/granite/backup/content/createBackup/content/items/backupform.check.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
java.lang.RuntimeException: java.io.FileNotFoundException: /home/ubuntu/AEM/Dev/author/crx-quickstart/launchpad/felix/bundle305/data/classes/org/apache/jsp/libs/granite/backup/components/backupform/check_html_jsp.java (Permission denied)
at org.apache.sling.commons.fsclassloader.impl.FSClassLoaderProvider.getOutputStream(FSClassLoaderProvider.java:225)
at org.apache.sling.scripting.jsp.SlingIOProvider.getOutputStream(SlingIOProvider.java:145)
at org.apache.sling.scripting.jsp.jasper.JspCompilationContext.getOutputStream(JspCompilationContext.java:146)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.generateJava(Compiler.java:150)
I have checked the bundle 305 is active. Can anyone suggest why it is unable to create a backup and showing this error.
You seem to be dealing with filesystem-level permissions problem.
java.io.FileNotFoundException:
/home/ubuntu/AEM/Dev/(...)/check_html_jsp.java (Permission denied)
This error tells you that the AEM process was denied permission to access or save a file at the path provided.
Check which user started AEM and if the user has the permissions necessary to access the directory that you're trying to use (/home/ubuntu/AEM/Dev). Change the path or the permissions.

Error: Load failed, save is disabled

I'm completely new to ipython/ jupyter, I literally just typed in me first example and went to save it. I'm not getting the error above?
Error: Load failed, save is disabled
Also I don't know if it is related but I can't left click into cells? I have to right click and then press escape (very annoying).
Thanks
Open up the Javascript developer console and read the error msg.
In my case it looked like:
Failed to load resource: the server responded with a status of 404 (Not Found)
main.min.js:12623 Object
main.min.js:12625 API request failed (404): No such file or directory: code/pcc/Prototype%%20Pattern.ipynb
main.min.js:26690 Error stack trace while loading notebook was:
main.min.js:26691 XhrError: No such file or directory: code/pcc/Prototype%%20Pattern.ipynb
at wrap_ajax_error (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12671:29)
at Object.settings.error (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12692:24)
at l (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:89:24882)
at Object.c.fireWith (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:89:25702)
at k (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:91:5373)
at XMLHttpRequest.<anonymous> (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:91:9152)
main.min.js:12030 Loaded extension: widgets/notebook/js/extension

Determining reason that chrome enterprise-deployed extension will not load

I have a locally sourced enterprise-installed extension which is installed via the ExtensionInstallForcelist policy. The policy is visible on the chrome://policy page with a status of OK. The URL to the update manifest xml file is of the form "file:///c:/program%20files/xxx/updates.xml" The .crx file is also located in the same folder "file:///c:/program%20files/xxx/myextension.crx" I can successfully browse to both of those files. Yet the extension does not load.
Is there any way to determine the reason that chrome is not loading the extension? I do not see any indication of error. I have opened up the inspect developer window on the extension page, but see no console messages or exceptions. Is there a log file I could look at, or some other means of determining why the extension is not loading?
UPDATE: Turned on logging and see the following:
[3752:3156:0327/171545:WARNING:extension_error_reporter.cc(79)] Extension error: Expected ID "kfegeekbdleinhdfillngiggbjiflghe", but ID was "ijdpkgandgfnpbammiehlfpfpboclodn".
[3752:3440:0327/172253:WARNING:extension_protocols.cc(422)] Failed to GetPathForExtension: kfegeekbdleinhdfillngiggbjiflghe
[3752:3440:0327/172253:WARNING:url_request_job_manager.cc(89)] Failed to map: chrome-extension://kfegeekbdleinhdfillngiggbjiflghe/
[3752:3440:0327/172253:VERBOSE1:resource_loader.cc(364)] OnResponseStarted: chrome-extension://kfegeekbdleinhdfillngiggbjiflghe/
[3752:3440:0327/172253:VERBOSE1:resource_loader.cc(778)] ResponseCompleted: chrome-extension://kfegeekbdleinhdfillngiggbjiflghe/
[3752:3156:0327/172253:VERBOSE1:navigator_impl.cc(298)] Failed Provisional Load: chrome-extension://kfegeekbdleinhdfillngiggbjiflghe/, error_code: -2, error_description: Unknown error., showing_repost_interstitial: 0, frame_id: 1

http://facebook.com to get property LocaFacebook JS Error - Permission denied to get property Location.href from http://www.mysite.com

Simply loading the standard Facebook connect JS framework and getting the following error:
Permission denied for facebook.com to get property Location.href /www.mysite.com
The error happens on line 127 in the file :
static.ak.connect.facebook.com/connect.php/en_US/js/Api/CanvasUtil/Connect/XFBML
Using FF 3.5.7 and Firebug 1.5.0
Is anyone else getting this error?
It's an issue falsely reported by Firebug. Nothing to worry about.