Questions tagged as 'java'

2
answers

Invalid property 'category.subcategory' of bean class. Error saving user to bank

I'm developing a web application that has the following mapping: A user has a category; A category has several subcategories; a subcategory has several products. As the image below: WhatIamtryingtoimplementis:whentheadminregistersanewsupplierhe...
asked by 13.06.2018 / 01:52
1
answer

SQL login method

I have the following scheme: JdbcRowSet myrs = new JdbcRowSetImpl(); myrs.setUrl("jdbc:postgresql://localhost:9999/teste"); myrs.setUsername("postgres"); myrs.setPassword(""); myrs.setCommand("select count (*) from pessoas where cpf = '12345'...
asked by 13.08.2014 / 04:56
1
answer

Hibernate + Inheritance

I'm trying for some time a solution to my problem. I have researched a lot but nothing explains me clearly what I need. So I created an example application and I'm making it available from this link: Appliance To run this application, si...
asked by 05.08.2014 / 22:25
1
answer

Remote debug in isolated environments

Work in a company doing bug fixes. Some clients deploy the system to computers on their internal network, so it is not possible to remote debug. Clients' computers usually have Internet access. I wonder if there are any tools that would al...
asked by 29.07.2017 / 12:59
2
answers

How do I check the status code of the server http response in java?

Good morning, guys. I would like to know how to do this in java to see if the response received from the server was successful or not. Can anyone help me with this?     
asked by 26.06.2015 / 16:55
1
answer

How to create a directory in Java using NIO.2 - Java SE 7

The java.nio API is part of the Java SE platform since its 1.4 release. Now, starting with Java 7, we have a number of new enhancements in this API and new features, which provide better file system management ( file system ) utility methods...
asked by 27.06.2015 / 00:43
1
answer

JAVA Connection with BANK

I am not able to connect java with a database, because an error appears as in the image, Can anyone help me?     
asked by 15.06.2015 / 19:32
1
answer

Initialization of attributes

Is there any difference between initializing an attribute like this: public class Turma { private List<Aluno> alunos = new ArrayList<Aluno>(); } Or so: public class Turma { private List<Aluno> alunos; //Co...
asked by 06.07.2017 / 21:16
3
answers

How to sort vector in descending order?

How do I place a vector in descending order? public static void vetor() { int[] vet = { 7, 4, 10, 8, 2, 5 }; Arrays.sort(vet); //Comando para colocar em or...
asked by 22.06.2017 / 00:15
1
answer

Why use DriverManager for bank connection?

I'm connecting to the SQLite database with the following code: public SQLiteConnection conn() throws SQLException{ String path = System.getProperty("user.dir"); try { return new SQLiteConnection(path, "DadosPastas.s3db");...
asked by 26.06.2017 / 16:31