Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
Getting null value from postgresql table

I am working on a Spring MVC project. I am having issue with getting null values from database after some time interval. Following is the method written in DAO which return last entered value.

@Override
public String getDashboardData() {
    String q = "SELECT deviceid FROM main_tbl order by id DESC limit 1";
    String newId = jdbcTemplate.queryForObject(q, String.class);
    System.out.println(newId);
    return newId;
}

This method is called from jsp with every 1 sec. My problem is that, this method returns bunch of some values & null value alternately. I didn't get the actual reason because everything works fine.

My output is like below:

01
05
09
41
null
null
null
null
15
09
05
65
10
null
null
null
null 

Is that problem with postgresql..? Or is their any that I missed. I’ll be very grateful for any help!

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!