Questions tagged as 'java'

2
answers

Date Value 0000-00-00 can not be used in java Date

First of all, yes, I already added ?zeroDateTimeBehavi‌​or=convertToNull in the connection URL, the problem is that in the query the date zeroed does not come null and always releases the following Exception: java.sql.SQLException: Valu...
asked by 11.04.2017 / 14:22
1
answer

Problem inserting JTextField into JPanel that is inside JTabbedPane [closed]

I have a Swing application where the main window is composed of a JtabbedPane that contains some classes that extend JPanel [ViewPrincipal, ViewCadastro, ViewReport, etc ...]. When I add JLabels and JButtons, they appear and win...
asked by 21.04.2017 / 21:38
1
answer

Render image size in table cell

I created a table in java that shows my images stored in blob in the database. However, the height of the table is not automatically resized by having to put a value manually, for example: Tabela.setRowHeight(60); I would like to get the im...
asked by 15.05.2017 / 01:09
1
answer

After request AJAX input does not return value to ManagedBean?

I am building an address registration form and I have implemented the combos for State and City respectively. They work in the usual way, with the combo of the city being filled according to the value selected by the state combo. I have read...
asked by 04.04.2017 / 03:13
1
answer

Question about parallel programming

I'm starting to learn parallel programming, and I'm wanting to compare a single threaded program to a multithreaded one. What I thought was to make a very simple algorithm that, within a period of 1 minute, calculate the largest number of poss...
asked by 01.05.2017 / 16:53
2
answers

Creating a MySQL default date string from a Java Date

I need to pass a string in this format: "yyyy-mm-dd + HH: mm: ss" (where the "+" should be a space) for a webservice from a Java Date object. How can I do this?     
asked by 28.03.2017 / 22:45
1
answer

Doubts about logic, ifs with multiple checks

I have a code where I need to check if two entries are true. I'm doing this: if (!estudante.getOutTotal.equals("0") && !estudante.getOutEmAtendimento.equals.("0")) { // Faz algo... itens.add(estudante); } If the totals of...
asked by 29.03.2017 / 04:32
1
answer

How to save return from java -version command in cmd

I have a problem saving in .txt the return of the "java -version" command executed in cmd. I'm running as follows: java -version >> "%temp%/resultado.txt" It creates the file but does not save the return to the file. Any other ping co...
asked by 26.05.2017 / 19:19
1
answer

Application with Spring Boot does not rise - org.springframework.beans.factory.UnsatisfiedDependencyException

I created the application from SPRING INITIALIZR. I made the adjustments for the first operation and configured the application.properties however I still receive the same exception: 2017-05-24 16:49:23.784 WARN 5568 --- [ main] ati...
asked by 24.05.2017 / 22:14
1
answer

How to configure the JUnit component of Demoiselle 2.4.2 to inject EJB dependencies

I have a Demoiselle 2.4.2 / JSF / Hibernate application that presents several fully functioning test cases. The BCs operated by these test cases undergo several injections of dependence without any problem. Now I needed the injection of an EJB c...
asked by 24.05.2017 / 15:55