[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

86 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! 86 total views, 4 views today

86 total views, 4 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(); } 86 total views, 2 views today

86 total views, 2 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

54 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

94 total views, no views today

Connecting aws ec2 mysql from workbench

Connecting aws ec2 mysql from workbench

Hello all, After a lot of struggle I finally made connection to aws ec2 mysql from workbench, posting here to help you guys. Connecting aws ec2 mysql from workbench:     If you are getting any other exceptions then do validate the below steps once again,   Step 1: Creating root user with all the privileges: CREATE USER ‘root’@’18.188.178.178’ IDENTIFIED BY ‘root1’; GRANT ALL PRIVILEGES ON javadomain.* TO ‘root’@’18.188.178.178’; javadomain => database schema (which I created directly in linux mysql…

Read More Read More

148 total views, no views today

Angular 6 access control using ngx-permission

Angular 6 access control using ngx-permission

Angular 6 access control using ngx-permission: We can’t see any enterprise applications without access control management as this is the most important feature which all the sites must have to avoid security violations and control the views for different user groups. In angular this can be easily achieved using ngx-permission, I personally used it in my application developments and did not face any issues so far, and even if you face any issues developer is so active to respond as…

Read More Read More

191 total views, 1 views today

How to get JPA Project option in Eclipse STS ?

How to get JPA Project option in Eclipse STS ?

How to get JPA Project option in Eclipse STS ? By default JPA project option is not there when you check under New project in STS eclipse. To make it available install hibernate tools plugin(which is currently Jboss Tools)     Now you will be able to create the JPA Project,   Hope this helps!   544 total views, no views today

544 total views, no views today

How to disable the default spring security in spring boot ?

How to disable the default spring security in spring boot ?

How to disable the default spring security in spring boot ? To disable the spring boot’s default spring security / to disable the security for all the urls then include the below method in your custom security class which extends WebSecurityConfigurerAdapter Method to include: /* to permit all */ @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable().authorizeRequests().anyRequest().permitAll(); } Full class for reference:   @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class CustomJDSecurityConfig extends WebSecurityConfigurerAdapter { protected void…

Read More Read More

612 total views, 2 views today

Installing curl on windows 10

Installing curl on windows 10

Installing curl on windows 10:   Downloading Curl for Windows: Curl for Windows Portable Edition Curl for Windows   Installing CURL in windows: Once you downloaded the msi (or) exe file (or) portable from the above link double click and install it, if is is portable then just configure the environment variable alone like this,   Environment Variable Path Setting: Start Program -> My computer (Right click) -> Properties -> Advanced system settings     Enter the CURL installed path,…

Read More Read More

295 total views, no views today