Monday, 27 June 2016

java.lang.IllegalStateException: LifecycleProcessor not initialized

java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date


check the configuration in
1. applicationcontext.xml
2.pom.xml

observation :
1. make sure to upgrade dependency to 4.0 release or 3.0 release.




Thursday, 23 June 2016

Unknown provider: $stateProvider

[$injector:unpr] Unknown provider: $stateProvider <- $state <- LoginCtrl

problem :
missing angular-ui-router.js

<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>


steps :
1.
go the project folder and from commandline.

cmd :  bower install angular-ui-router

ref : git

the above command will download package

2. start grunt server

cmd : grunt serve

Wednesday, 22 June 2016

start writing a project in yoman for angular js project

start writing a project in yeoman for angular js project

IN the app folder.

project structure is


1. images.
2. script
2.1 controller folder (all the controller are stored here.)
2.2 app.js (for routing the pages.)
3.style.
4. views. (all the static html stored here.)

create a module address.

1. Create a listItem in index.html in the navigation bar.
ex : <li><a ng-href="#/address">Address</a></li>

2. create a route in app.js

ex :

.when('/address', {
 templateUrl : 'views/address.html',
 controller : 'AdressCtrl',
 controllerAs : 'contact'
 })
3. create address.js in script/controller folder and write adress controller.
ex :
angular.module('scjavaApp')
.controller('AdressCtrl',function(){
console.log("Hhi this from controller");

});

4. In view folder create address.html
<div>
HI this from address page.
</div>

start grunt server and check

Wednesday, 15 June 2016

Jersey java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer

Jersey java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer


solution : In eclipse 
go to  project -> properties -> development assembly -> add -> java build path entries.

src/main/java not visible in project folder eclipse

src/main/java not visible in project folder eclipse

steps :
1) right click on project.
2) click on build path.
3) select configure buildpath.
4) select order and export
5) click and select.
a) jre system lib.
b) maven dependency 

creating a maven web project from commandline

1)
a. creating a maven project from commandline

mvn archetype:generate -DgroupId={project-packaging}
-DartifactId={project-name}
-DarchetypeArtifactId=maven-archetype-webapp
-DinteractiveMode=false

ref : maven

b) need to create sample web application

ex : mvn archetype:generate -DarchetypeGroupId=com.sample.voice -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion= voice


mvn archetype:generate -DgroupId=com.voice -DartifactId=sample -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

Tuesday, 14 June 2016

Previously created MySQL Schema ` ` was found. Statement ignored. ERROR: Previously created MySQL Table

Previously created MySQL Schema ` ` was found. Statement ignored. ERROR: Previously created MySQL Table

scenario : When performing reverse engineering in workbench. If there are multiple instance of DB created in workbench we get the error.
solution :  Make sure workbench dashboard only have one connection in open, to communicate with DB.