Docker basic commands for beginners

Docker basic commands for beginners

Docker basic commands for beginners: docker ps To see running docker processes. docker exec -it czcmysql /bin/bash To login into particular container, here czcmysql is mysql’s container name, you can also use container id instead of name to login. docker image ls List all docker images. docker container ls List all docker containers. sudo docker start czcbackend To start a particular docker container, here czcbackend is my container’s name. sudo docker rm d724fc6c512c31585bfeebccce1196df09cdc3c9152f01eb627aa3c198982c09 Removing docker container   sudo docker inspect…

Read More Read More

172 total views, no views today

SOLVED: Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Unable to locate appropriate constructor on class

SOLVED: Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Unable to locate appropriate constructor on class

SOLVED: Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Unable to locate appropriate constructor on class: Root cause: If you are trying to populate result sets directly to your custom bean (not entity bean) then you must have public default constructor in your bean. See the below sample snippet to understand better.   Example: @Query(“SELECT new com.ngdeveloper.dto.SlugCountBean(t.tagSlug, count(c)) FROM Coupon c join c.tags t where c.couponEndDate >=CURRENT_DATE and t.tagType=:tagType GROUP BY t.tagSlug”) List<SlugCountBean> findCouponCountsTagWise(@Param(“tagType”) String tagType);   SlugCountBean.java Bean | which is causing the issue:…

Read More Read More

192 total views, no views today

Ionic 4 Slider Previous Next Working Example with Angular 6

Ionic 4 Slider Previous Next Working Example with Angular 6

Hi All, Recently I got an opportunity to create slider with previous and next arrow marks for one of my mobile app, Herewith sharing the code to help someone. Part of the code from the following are actually taken out from stackoverflow & ionic support link, but still on top of it I did lot of things to make it work, so sharing here for someone.   home.component.html: <ion-header> <ion-toolbar> <ion-row class=”filters” style=”font-size:14px;”> <ion-col class=”col-with-arrow” (click)=”slidePrev()” no-padding col-2 style=”display: flex;justify-content:…

Read More Read More

150 total views, no views today

SOLVED: ng serve throws Could not find module “@angular-devkit/build-angular”

SOLVED: ng serve throws Could not find module “@angular-devkit/build-angular”

SOLVED: ng serve throws Could not find module “@angular-devkit/build-angular”: Resolution: npm install @angular-devkit/build-angular (or) remove node_modules folder completely and run npm install command then try ng serve. 177 total views, 4 views today

177 total views, 4 views today

Trim() not working with excel read apache poi in Java:

Trim() not working with excel read apache poi in Java:

Trim() not working with excel read apache poi in Java: While reading from the excel, you need to make sure you are considering this unicode value as well \u00A0 along with white spaces to handle all the possible inputs. Trim() does not help us for this, and below are the tries I made and got the solution, posted all here to help you with n number of possible use cases and solutions. Not working: Try 1: row.getCell(0).getStringCellValue().replaceAll(“\u00A0”, “”);   Try 2:…

Read More Read More

248 total views, no views today

[Solved] JSON parse error: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain:

[Solved] JSON parse error: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain:

[Solved] JSON parse error: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: Full Exception: {“timestamp”:”2018-09-21T12:25:44.365+0000″,”status”:400,”error”:”Bad Request”,”message”:”JSON parse error: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: com.ngdeveloper.entities.Coupon[\”store\”]->com.ngdeveloper.entities.Store[\”description\”])”,”path”:”/ngdeveloper/api/rest/coupon/add”}   Solution: By default jackson tries to serialize the class as well as all the fields of the class, so you could have got the null pointer exception. Add @JsonIgnore to your getter method, here I resolved like this, @JsonIgnore public Set<Description> getDescription() { return description; }…

Read More Read More

254 total views, no views today

[Solved] The entity “le” was referenced, but not declared.’ itext pdf

[Solved] The entity “le” was referenced, but not declared.’ itext pdf

[Solved] The entity “le” was referenced, but not declared.’ Issue: If you used &le; then you will get this issue. Solution: You have to actually use &lt;=, currently it does not support &le; this can be done as &lt;= Hope this helps! 234 total views, no views today

234 total views, no views today

How to create a text/html file from java string ?

How to create a text/html file from java string ?

How to create a text/html file from java string ? try { File file = new File(“ngd.txt”); // ngd.html for html file generation. FileWriter fileWriter = new FileWriter(file); fileWriter.write(html); fileWriter.flush(); fileWriter.close(); } catch (IOException e) { e.printStackTrace(); } 224 total views, no views today

224 total views, no views today

Useful Linux Commands for Beginners

Useful Linux Commands for Beginners

Useful Linux Commands for Beginners: 1. free -h | RAM usage details (use -h to get the details in MB/GB, else you will get the details in KB, which is quiet difficult to calculate and understand) 2. du -h | Disk usage details 3. sudo du /temp -h –max-depth=2 | sort -k2 | Disk usage of particular directory here temp is the directory, if you want to see for all the directories then use this command, du $dir -hk –max-depth=2…

Read More Read More

198 total views, no views today

How to deploy angular 2/4/5/6 application from bitbucket to Nginx Server in AWS EC2

How to deploy angular 2/4/5/6 application from bitbucket to Nginx Server in AWS EC2

How to deploy angular 2/4/5/6 application from bitbucket to Nginx Server in AWS EC2: Prerequisite: Make sure you have installed following in your linux machines: Nginx server. git. Account in bitbucket (atleast in github to clone some angular app).   1. Create temp folder in root path and do git clone: sudo git clone -b my-Branch https://YOURUSERNAME@bitbucket.org/YOURUSERNAME/YOURPROJECT Here my-Branch is branch name, if you want the master to be cloned then your url will be like this, sudo git clone…

Read More Read More

242 total views, no views today