Questions tagged as 'java'

1
answer

How to transform this Json into an ArrayList of objects?

I'm working on a project where I'm doing a query in the database and need to return a list of database users to be listed in my application. I have the following line Json (returned by the server): {"id": 1, "nome": Raphael, "sexo": M}{"id"...
asked by 08.10.2016 / 08:45
1
answer

Performace in native query

Good morning, I'm on a project where I have to build charts based on queries made in a Postgres database. This bank has a BI framework and the tables have an average 40 million lines . The queries I'm supposed to make at the bank are be...
asked by 01.08.2016 / 15:16
1
answer

Problems with RowFilter result

I'm working with DocumentListener and RowFilter , and I noticed that my filter is picking up the data I type, and searching by matching all columns in my table. I would like to know, how could I choose the column that it should compare, and a...
asked by 15.03.2017 / 13:58
1
answer

Encapsulation Principles

I am studying for the Java Programmer SE 7 I certification exam. I use SelfTest Kaplan (recommended by Oracle itself). I came across the following question: (I'll leave everything in English on purpose, not to translate and end up omitting...
asked by 27.02.2017 / 17:40
2
answers

Test a void method with mockito

How to test a void method with mockito? This is the basic syntax for a return method when(Classe.metodo()).thenReturn(variavelRetorno); However, how do I test a void method?     
asked by 08.07.2016 / 21:10
1
answer

Why is uploading images to my DigitalOcean server so slow? [closed]

I'm running a Java application using Play! Framework on my droplet on DigitalOcean. However, when I upload images through the browser I realize that the request is very slow and the upload of a ~ 2MB image is taking ~ 1-2 minutes to happen. D...
asked by 03.07.2016 / 02:00
1
answer

Error returning HashMap for JavaScript

When returning the hashmap to javascript I get the following error:    The resource identified by this request is only capable of generating   responses with characteristics not acceptable according to the request   "accept" headers. Call...
asked by 23.06.2016 / 03:15
2
answers

Execution does not find 'org.junit.Assert' even though JUnit jar is in classpath

I have a problem that I have researched a lot and still have not found the answer. I have a test case that I'm trying to run and send a message to the console. But even with JUnit jars, he accuses them as if he did not find them. I'm having a ma...
asked by 01.07.2016 / 01:08
1
answer

Fill in select web service return from CEP

I am using the viacep site example so when the user enters the zip code, the other address data is filled in, but I would like the state through a select to be filled in automatically. The example shows it being filled in an input. link...
asked by 05.05.2016 / 16:30
1
answer

Problem in calling DriveManager.getConnection?

I'm studying Java with database and I'm doing a few examples. On the PC with Windows I used a code and it worked, there was no problem, I now use Linux and the same code is giving error when calling the% with% of DriveManager.getConnectio...
asked by 23.01.2017 / 13:50