Tuesday, 21 March 2017

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA


Solution :

Try changing your ORA properties.

from this :
ORA11gR23 =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS =

        (PROTOCOL = TCP)

        (HOST = orasrv-alanb-lx06)

        (PORT = 1521)

      )

      (CONNECT_DATA =

        (SERVER = DEDICATED)

        (SERVICE_NAME = ORA11gR23)

      )

    )

  )
  

To this:
ORA11gR23 =

  (DESCRIPTION =

      (ADDRESS =

        (PROTOCOL = TCP)

        (HOST = orasrv-alanb-lx06)

        (PORT = 1521)

      )

      (CONNECT_DATA =

        (SERVER = DEDICATED)

        (SERVICE_NAME = ORA11gR23)

      )

  )
  
your SERVICE_NAME = ORA11gR23 should match the name you have given before description.



Wednesday, 8 March 2017

Unknown Provider : $locationProviderProvider <- $locationProvider

Error :

Unknown Provider : $locationProviderProvider <- $locationProvider <- myCtrl 

also got this error.

You're allowed to inject a $location into a controller, but not a $locationProvider.

Instead, the $locationProvider can be injected into a config method:


Solution :
var app = angular.module("myApp", []);

app.config(function($locationProvider) {
  $locationProvider.html5Mode(true);
});

app.controller("myCtrl", function($location) {
  $location.path("/some/path");
});


And since I made this additional mistake: it's not just that you should add an app.config bit, but also remember to remove $locationProvider from the controller arguments, or you'll keep getting this error.


Also you have to add <base> tag in your html file <head> tag



 <base href="/myDemoProject/">

Wednesday, 1 March 2017

Angular alert will not display after being closed

Problem :

when you try to close the angular success and error pop up using manullay or using alert('close') event.


HTML
  <div class="cacheSuccessMessage alert alert-success alert-dismissable-success">
       <span class="cacheMessageHeader"><strong></strong></span>
        <div class="cacheMessageDetails"></div>
  </div>


JS:
$(".alert-dismissable-success").fadeTo(4000, 500).slideUp(500,
 function() {
 $(".alert-dismissable-success").alert('close');
})


so when you fire event of close Data-dismiss completely removes the element. 


Solution : 

 Use jQuery's .hide() or angular hide method instead to hide error.
and modify you HTML and JS as 


HTML
  <div class="cacheSuccessMessage alert alert-success">
           <span class="cacheMessageHeader"></span>
            <div class="cacheMessageDetails"></div>
  </div>

JS:
$(".cacheSuccessMessage").fadeTo(4000, 500).slideUp(500,
 function() {
 $(".cacheSuccessMessage").hide();
})

Spring boot with CORS

CORS (Cross-Origin Resource Sharing) errors occur when a web application running in a browser requests a resource from a different domain or...