Questions tagged as 'java'

1
answer

JPA / Hibernate - LazyLoading OneToMany duplicating records

Well, I have the following structure: public class FinCxaTransacaoGrupo { @Id @GeneratedValue(generator="gen-uuid") @GenericGenerator(name="gen-uuid", strategy = "uuid2") @Type(type="pg-uuid") @Column(name="id_fin_cxa_tran...
asked by 01.07.2016 / 20:02
2
answers

How to retrieve a previous value entered by the user?

I'm not able to retrieve a value typed in beforehand by the user. The program asks to enter notes and the end is indicated by the entry of number -1; public static void main(String[] args) { Scanner s = new Scanner(System.in);...
asked by 30.06.2016 / 23:16
1
answer

Spring / Jackson Json - Problem in deserialize

This question is a follow-up to another question, a user answered found the solution to my other question ( Spring Custom Json Receive ), but I'm now having trouble mapping using Jackson. I want to receive a custom request in JSON and send a...
asked by 01.07.2016 / 22:09
1
answer

How to make a JFrame return an instance of a given object?

I have a JFrame called JFrameCadastroPessoa that has only two fields first and last name, as the image shows: JFrameCadastroPeople:publicclassJFrameCadastroPessoaextendsjavax.swing.JFrame{privatePessoapessoa=newPessoa();//codigosger...
asked by 29.06.2016 / 23:41
1
answer

How to separate an array of pairs into sets?

I need to troubleshoot a problem in java and I'm having trouble. I have the array with the following pairs: 0 - 1 1 - 2 2 - 4 2 - 5 3 - 6 4 - 5 6 - 7 I would like to group these numbers as follows: - If the number 'x' has a connection with...
asked by 13.05.2016 / 15:47
1
answer

Query ORDER BY dynamic from the selection of a comboBox

I'm developing an application in java that manages a database. This application primarily performs a SELECT database, then submits ResultSet to an editable table. I tried to add a comboBox to the user to select the orde...
asked by 04.05.2016 / 11:57
1
answer

Css not found html page - SpringFramework

Hello. I'm having trouble getting the css, js, fonts etc from my project on my pages. I'm using Spring by entering the address of the css files in the browser but the system is not managing to find the path correctly. If anyone can help .....
asked by 27.04.2016 / 01:53
1
answer

JSF - how to send information to another page

I have orderList for the operator to select the client name. After selecting it, I need to direct it to another page with the client data. How do I pass information from the client that was selected to another xhtml page? What is the rati...
asked by 04.05.2016 / 13:38
1
answer

Competition with thread and database inserting duplicates

I have the following problem with concurrency using Thread. The code below should take the last number of a column of a table and add +1 to save again in the database, the problem is that this number can not be repeated and because of the thread...
asked by 28.04.2016 / 14:50
2
answers

How to run a Timer class (always) in the deployment?

I have a non-web project and I'm going to turn it into a web project using Spring MVC. Today in my method static main of my main class, I create this here: Exec.principalTimer = new Timer(); Exec.principalTimer.scheduleAtFixe...
asked by 09.05.2016 / 21:07