Wednesday, December 11, 2019

filesize powershel script

$logfile="d:\batch\filesize.csv"
$dirs='c:\temp', 'd:\batch'
$size = 0
$datum=Get-Date -Format "yyyyMMdd"
foreach ($file in (get-childitem -path $dirs -file)) {
$file.FullName + "," + $file.Length + "," + $datum | out-file -filepath  $logfile -append }

commandline oracle bipublisher login and clear cache , java nullpointer calling xmlpserver java.lang.NullPointerException wwv_flow_webservices_api.make_request



OBIEE 12c: How to Clear the BI Presentation Service Cache with Command Line  (Doc ID 2468367.1) DID NOT WORK for me, it cleared the presentation cache , but we were looking for a clear of the BIPUBLISHER CACHE.

The problem was that when we restarted the bi_server1 the webservice to schedule a request gave a java nullpointer exception, WE DO THIS FROM APEX STORED PROCEDURE IN A DATABASE.
When we pushed the button naar http://servernaam:8080/analytics , kies beheer, bi publisher beheren, cache beheren, objectcache wissen ( translated goto management, manage bi publisher, manage cache, clear object cache) it was all working again..
But this was not the real solution...or should I say cause...
It was enough to just go to the admin page.
We automated this with the following curl statements : 

curl -v -X "POST" "http://SERVERNAME:8080/bi-security-login/login" --data "j_username=weblogic&j_password=TOPSECRET" --cookie-jar "cookies.txt"
curl -v http://SERVERNAME:8080/xmlpserver/servlet/admin --cookie "cookies.txt" --cookie-jar "cookies.txt"

After the start.sh we called these statements in a script ...
Now we don't have a problem with calling the webservice from apex to print our pdf's.

wwv_flow_webservices_api.make_request(
    p_url => l_url,
    p_envelope => l_env );

Regards ,
Dik Pater