Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

254
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda