Questions tagged as 'jdbc'

1
answer

JDBCTemplate RowMapper for Nested POJOs

Let's say I have the following Pojos public class Pedidos{ private Strig codigo; private String nomePedido; private List<Dados> dadosPedido; //getters e setters} } E public class Dados { private String nome; private...
asked by 27.02.2014 / 19:48
0
answers

Loading JTable and processor gets high process [closed]

I am making a system and it has a JTable and I need to load my data, I was analyzing through the task manager that when this function load the table is called, it increases the processor load a lot. What can it be? I already tested it and...
asked by 11.01.2017 / 23:25
0
answers

HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: DataSource must not be null

When doing a query in a dao class, the following error appears: My spring-context.xml is: <mvc:interceptors> <bean class="br.com.softwarescomerciais.os.interceptor.AutorizadorInterceptor"></bean> </mvc:interceptor...
asked by 07.01.2017 / 19:03
0
answers

JPA + EclipseLink - Lazy Loading with EntityManager closed

I'm using EclipseLink as a JPA provider in a Java SE project. I have already set up weaving correctly to allow Lazy Loading. Unlike Hibernate (which launches LazyInitializationException), EclipseLink can get the proxy of a LAZY relationship,...
asked by 19.09.2015 / 01:18
1
answer

What is the difference in executeQuery and executeUpdate?

What's the difference and when should I use executeQuery() or executeUpdate() ?     
asked by 12.07.2018 / 06:15
2
answers

Error when storing data from a Select with Java

Good morning. I would like to know if you have the possibility of storing in a variable the value of a search ( select ). In case I want to store a id of another table with the use of select , however after doing .executeQu...
asked by 25.11.2017 / 14:48
2
answers

Search is not performed after connecting to the Java database

I'm trying to search the database using the code in java, but I can not. The database is connected, but the search is not performed. I created two classes, one that owns the class with the connection method, and the other, which is the main one....
asked by 27.07.2018 / 16:02
1
answer

Removing reserved SQL words from a Java string

I'm doing a view that has an open field ( textarea ) where the user can write SQL and then can execute the same SQL. The question is that the oracle user where it will run SQL has permissions for everything and it is not supposed to d...
asked by 22.04.2016 / 18:17
2
answers

Error with SQL and MariaDB (Current position is before the first row)

I have a problem with my database and I have no idea what it is. public String getBlockPermission(String blockstring){ String permission = ""; try{ ResultSet res = connection.createStatement().executeQuery("select permission fr...
asked by 06.01.2018 / 08:25
1
answer

Different results with the same SQL statement

Speak programmers, easy? I've done a lot of research not to repeat questions here, but I really do not understand why the SQL statement works in MySQL Workbench and the Java / JDBC SQL string does not. I have two game and category tab...
asked by 24.08.2018 / 23:54