Questions tagged as 'java'

1
answer

Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements

Good Night. I have the following error in Hibernate:    org.hibernate.AnnotationException: Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: bestroute.modelo.Peca.grupoPeca I can not display on...
asked by 01.10.2017 / 03:17
1
answer

Double-chained list with remove method that does not work

I have this algorithm for a double-chained list, but I get error in the last interaction in both remove methods. Any idea what might be wrong with my methods? Main class public class Teste<T> extends Node<T> { public static...
asked by 24.09.2017 / 23:02
1
answer

Help with simply linked list of java

I have a package with the codes below to implement a Simple Chained List. Apparently everything is correct in the classes, but when I run my main I get as a return what I believe to be the memory reference of the nodes and not the value itself....
asked by 24.09.2017 / 18:11
1
answer

Date conversion to oracle

I have a problem, I'm trying to save a date in oracle with the formatted dd/MM/yyyy , however, in the database it displays the date in dd/MM/yy format. So, I came to doubt, if the type I used in the table is not appropriate, or i...
asked by 23.09.2017 / 02:10
1
answer

Error requesting GET, JavaScript, Angular, Spring, Java

I'm having an error opening the screen with the search results in the database. The error is in the image below. Debugging, data is coming from the database. In the other image, the Server Log appears MyNeighborhoods@Entity@Table(nam...
asked by 25.09.2017 / 15:10
2
answers

Read strings in java within a while or do-while loop

How do I read strings in java within a while or do-while loop? without error and does not read Code: package listas; import static java.lang.System.exit; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public...
asked by 16.09.2017 / 09:53
1
answer

Error mark / reset not supported when running .wav file

I created a button that, when pressed, played a sound, but I'm having problems because it throws this exception:    "mark / reset not supported", I have no idea what can be and how to solve, can anyone help me? I created an example cla...
asked by 06.10.2017 / 16:51
1
answer

How to prevent a variable from getting negative in Java?

I'm making an Android app in Android Studio where there is a list of items, where you can choose to increase or decrease the amount of each item, so I created two buttons for each item, one to increase and one to decrease quantity, follow templa...
asked by 14.09.2017 / 01:35
2
answers

java.lang.NullPointerException JSP Servlet

I'm developing a web application using jsp and servlet and I want to show all my records from my database and the amount of records in a table, I created a DAO where I performed queries where they returned the data correctly and put a session in...
asked by 14.09.2017 / 06:31
1
answer

When I click, I want to define the phrase through the indexes

As you can see in the code, when I click I'm defining the phrase in a random way, but when I click, I want the phrase to be defined by the indexes myself, how do I do this? Public class MainActivity extends AppCompatActivity { private Tex...
asked by 13.10.2017 / 05:31