Posts

Converting base64 bit to a file. Used for images

add this function to tour ts file immediatly after imports function base64toBlob(base64Data, contentType) {   contentType = contentType || '';   const sliceSize = 1024;   const byteCharacters = atob(base64Data);   const bytesLength = byteCharacters.length;   const slicesCount = Math.ceil(bytesLength / sliceSize);   const byteArrays = new Array(slicesCount);   for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {     const begin = sliceIndex * sliceSize;     const end = Math.min(begin + sliceSize, bytesLength);     const bytes = new Array(end - begin);     for (let offset = begin, i = 0; offset < end; ++i, ++offset) {       bytes[i] = byteCharacters[offset].charCodeAt(0);     }     byteArrays[sliceIndex] = new Uint8Array(bytes);   }   return new Blob(byteArrays, { type: contentType }); } example:   onImageP...

weblogic windows JPS-01050: Opening of wallet based credential store failed. Reason java.io.IOException: Failed to lock cwallet.sso.lck

Integreated weblogic serer cannot be started and retuen this error weblogic windows JPS-01050: Opening of wallet based credential store failed. Reason java.io.IOException: Failed to lock cwallet.sso.lck Solution is simple  just remove the cwallet.sso file and cwallet.sso.lck located in C:\Users\tarek.DHAMAN\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.jdeveloper.rescat2.model Then open jevveloper again and start weblogic again

Cannot access Mapped folder -Windows 10

Open Poweshell as administrator and run the folowing commands sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi sc.exe config mrxsmb20 start= disabled

CallableStatement

    public Long getEmployeeIdForAttendance(String attendName) {         Long empId = null;         String callabelStm = "begin ?:=HRS_EMP_PKG.GET_EMPID_4ATTEND(?); end;";         CallableStatement cstm = getDBTransaction().createCallableStatement(callabelStm, 1);         try {             cstm.registerOutParameter(1, Types.NUMERIC);             cstm.setObject(2, attendName.trim());             cstm.executeUpdate();             empId = cstm.getLong(1);         } catch (SQLException e) {             e.printStackTrace();  ...

How to execute navigation in RegionNavigationEvent of af:region

    public void onDynamicReqionnavigation(RegionNavigationEvent regionNavigationEvent) {         System.out.println("*******onDynamicReqionnavigation**********");         try{         if (regionNavigationEvent.getNewViewId() == null) {                 navigate("back");         }         }catch(Exception ex){             ex.printStackTrace();             JSFUtils.reportException(ex);         }     }     public void navigate(String controlFlowCase){            NavigationHandler nvHndlr  =  ...

How to change row state

Some time you need to change the row status to be NEW instead on initalized  ViewRowImpl row  = null;     DCIteratorBinding  itr = ADFUtils.findIterator("DocTransHdrViewIterator");  ViewObjectImpl vo = (ViewObjectImpl) itr.getViewObject();  row = (ViewRowImpl) vo.createRow();  row.setNewRowState(Row.STATUS_NEW);

JNDI naming exception:javax.naming.NameNotFoundException when trying to create Connection factory

Image
I faced a problem which is when trying to establish connection Factory to the JMS server that I have configured correctly , I got that error. the following is the code The hi lighted line failed. I am sure that I created the connection factory with the correct JNDI name. it runs successfully on the integated WLS , but not working on the Stand alone WLS  The solution is Deploy you JMS server on the admin server not on the managed server