Posts by Julian • 248 points
12 posts
-
2
votes2
answers716
viewsA: Using java change method
The class should look something like this: public class TesteAltera { public static void main(String[] args) { ContatoDao dao = new ContatoDao(); Contato contato = dao.pesquisarId(1);…
-
0
votes2
answers1011
viewsA: Problem running project - Special characters
Right-click on your project package. Go to properties then find the encoding (if it is encoding) and select ISO-8859-1 which is to synchronize the encoding of the text. Source…
-
3
votes2
answers57
viewsA: Nullpointerexception error when obtaining location
Location é null. This is not going to work: longitude = location.getLongitude(); Where is this variable location? I believe this is: location =…
-
1
votes1
answer108
viewsA: Login screen - cannot log in a user, admin or user
I’m not sure that’s it but, Do not use underline (_) in variable names, you always start with lowercase letter and any other name that appears after you start with uppercase letter. Example:…
-
1
votes2
answers1233
viewsA: Error reading java properties file
Apparently you are indicated the wrong way to the file. I don’t know if I got your project tree right because I don’t work with this IDE but try changing this path: src/properties/conf.properties By…
-
2
votes1
answer71
viewsA: Set ID manually with Hibernate in AUTO mode
Yes, has how, so that it is possible to do the following (using this question as a reference): Add this to your id attribute': @Id @GeneratedValue(strategy=GenerationType.IDENTITY,…
-
0
votes3
answers523
viewsA: Error in Hibernate
You should change the library settings, first because you are in error and second because it is very outdated. If you are using Maven, I recommend that you take version 5.2.0.Final of Hibernate-Core…
-
1
votes2
answers106
viewsA: Hibernate: Increment from a specific value
I’m not sure I understand, but come on. I will assume that you already have a running Mysql database and that you will need to recover the last (highest) enrollment used and use it to determine…
-
1
votes2
answers172
viewsA: Sum mm:ss of a jtable column
Something you can do is this: Retrieve Data in String Form. Use this code to get the number of minutes and seconds in different variables String str = (String) q.getSingleResult(); int posicao =…
-
0
votes2
answers452
viewsA: Problem with Entitymanager and JPA
Transform the EntityManagerFactory in a variable in the class scope and not method, since you will only need one for each execution of the program, and make the declaration directly. private static…
-
1
votes1
answer39
views -
1
votes1
answer878
viewsA: Java command to add column in table
Apparently you need to access a table column, but I cannot say exactly what type of component you are using, so my best suggestion is to use the EntityManager of JPA. Start by creating a class that…