Questions tagged as 'jdbc'

0
answers

Failed to communicate with the database Communications link failure

I have a database that is in the cloud because it is from a site that I and some colleagues are creating and I needed to connect it to Netbeans, I put the host, the name of the bank, user name and password and everything is right, but when I go...
asked by 25.03.2016 / 23:49
0
answers

Apostille caelum fj21 error driver mysql

Good afternoon guys, Beginning I'm studying the caelum Java WEB booklet but the following error is showing up. I already imported the MySQL driver, I switched between the commented line and commented the above, but it is not working the brows...
asked by 18.01.2016 / 17:56
2
answers

NullPointerException error, where is the error?

I wanted to know where the error is. I read that the NullPointerException error is when we try to access a variable that was not initialized, I just did not find this error in my code. import java.sql.Connection; import java.sql.DriverM...
asked by 29.07.2016 / 21:45
2
answers

PreparedStatement is not working

Code I'm using PreparedStatement i = conexao.prepareStatement("INSERT INTO teste VALUES (player='teste', level_1=0, level_2=0, level_3=0, level_4=0, level_5=0, level_6=0, level_7=0, level_8=0, level_9=0, level_10=0)"); i.executeUpdate(); Ta...
asked by 13.06.2015 / 19:17
1
answer

"Java exception has occurred" error while running PostgreSQL JDBC driver

Here's my problem: 1 - I'm using the Postgre 9.6 database. 2 - I downloaded and opened in ECLIPSE a project with Java application example with the use of Hibernate and Postgre that the teacher created (that is, the code is correct) I put t...
asked by 16.03.2018 / 02:28
2
answers

Code with JDBC fails with exception

I'm trying to search the database through java. I'm using this code, but entering the exception: public ArrayList<Pessoas> pesquisar(String nome) { ArrayList<Pessoas> lista = new ArrayList<Pessoas>(); try(Connectio...
asked by 25.11.2017 / 00:51
1
answer

java.lang.RuntimeException: java.lang.ClassNotFoundException: org.postgresql.Driver

I created the DAO, MODEL, CONTROLLER packages and a test It runs normal with the server, persists in the normal bank but through the view layer. I wanted to test on the main running with java application and set the values of the car before buil...
asked by 16.02.2016 / 13:56
1
answer

Passing an Array of Strings to a preparedStatement?

I'm trying to pass an array of Strings to a preparedStatement , but it's returning this exception: java.sql.SQLFeatureNotSupportedException: This operation is not supported. at com.microsoft.sqlserver.jdbc.SQLServerConnection.create...
asked by 04.07.2017 / 00:29
2
answers

While ResultSet.next () returning only one result

I have a problem, when I put the ResultSet.next() in while and I get the information in the Database column it returns only one result. People table: Pessoas: Idade: Marcos 22 Marcos 24 Marcos 25 Robe...
asked by 20.07.2018 / 21:12
3
answers

MySQL printing multiple times

I'm having a problem printing the MySQL data in Eclipse. When I put to print the list of the registered data it is printing 3 times each information. I know where the problem is, but I can not see the solution. My database has a schema and...
asked by 24.07.2018 / 03:06