Quantcast
Channel: GUJ - Tópicos com a tag java
Viewing all articles
Browse latest Browse all 17410

Erro ao me trazer os dados do banco SQL Server [ Resolvido]

$
0
0

@marcosraves escreveu:

Tenho uma Web Service , e apresenta esse erro quando testo ela, para me trazer dados do banco de dados SQL Server, já testei minha web service está certo, já configurei o banco no NetBeasn, deu conexao bem sucedida

Erro Web Service

GET SolicitaçãoFailed RequestFailed --> Status: (500)
Resposta: {

type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception
javax.servlet.ServletException: java.lang.UnsupportedOperationException: Not supported yet.

root cause
java.lang.UnsupportedOperationException: Not supported yet.

note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1.1 logs.

query de busca do meu usuariodao

public List<Login>listar()
{
     String sql = ("SELECT * FROM tb_login");
    List<Login> retorno = new ArrayList<Login>();
    
    PreparedStatement pst = Conexao.getPreparedStatement(sql);
    try {

        ResultSet res = pst.executeQuery();
        while(res.next())
        {
            Login item  = new Login();
            item.setId(res.getString("id"));
            item.setSenha(res.getString("senha"));


            retorno.add(item);
        }



    }catch(SQLException ex) {
      Logger.getLogger(UsuarioDAO.class.getName()).log(Level.SEVERE ,null,ex);

    }

    return  retorno;     
 }    
}

Mensagens: 12

Participantes: 3

Ler tópico completo


Viewing all articles
Browse latest Browse all 17410

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>