Questions tagged as 'java'

2
answers

Connection problem with the database

I'm building an application from NetBeans IDE 8.1 and accessing the database developed in Sql server more when executing the application is generating the error:    Connection error The port number 1433 / system_vend is not valid I alread...
asked by 30.01.2017 / 13:23
2
answers

Page displaying an error

I'm new to spring with java and I have the following controller and jsp Controller: @Controller //mapeamento do nome @RequestMapping("/hello") public class HelloController { //mapeamento do nome @RequestMapping("/controller") p...
asked by 01.01.2019 / 15:29
1
answer

"Error" CRUD Hibernate JAVA

Folks, I'm starting to learn how to use hibernate, and a kind of "error" occurred while a registry persisted. When registering an object player I must also pass the team of that player, however, the team is already registered in the database, so...
asked by 09.09.2016 / 20:37
1
answer

StackOverflow in bidirectional relationship in JPA

I am facing this problem with a bidirectional relationship, when I put a question in question to create an answer it does the persistence, until then beauty, but if I try to get a get or even in the API response points me an http 500, I discover...
asked by 08.06.2016 / 13:38
2
answers

Java2D time-based movement

I'm trying to move an object using Java2D but I'm having some problems, I have following method: public void logics() throws Exception{ before = System.nanoTime(); loop.logics(diff); after = System.nanoTime(); diff = after - be...
asked by 06.06.2016 / 04:58
1
answer

Using Criteria for sorting

In the system I am developing I am trying to use the criteria to be able to execute a query which I am not able to work with jpql, so I tried to execute according to the material that had been getting to that code. CriteriaBuilder crite = em.ge...
asked by 28.06.2017 / 20:40
1
answer

Do not repeat letters (char) in an ASCII array

You had to create a 5x5 array by printing random characters from the ASCII table. public class ExercicioClass01g { static Scanner ler = new Scanner(System.in); public static char mat[][] = new char[5][5]; public static void gera(...
asked by 29.05.2016 / 01:09
2
answers

Api Rest server-side only

Hello, I have a restful api in Java, using Jax RS that will be consumed by another application that will be online. I'd like to prevent people from directly accessing the api, but only by the web application. Is there a way to do this lock...
asked by 13.02.2016 / 07:30
1
answer

How to mount a link in the JSP with the value of an input?

Is it possible to create a link (href) or an action (form) by taking the value of an input to pass to a @PathVariable of a method in the controller? My code is the following in the controller: @RequestMapping(value="atendimentos/{numeroCham...
asked by 04.02.2016 / 15:05
1
answer

Problem persisting object with @ManyToOne - JPA / Hibernate

I have the following problem: I can save / persist the two objects below, but JPA is not binding the ID of the DeclaracaoImportacao in the class / entity ID column. Follow the code @Entity @Table (name = "declaracaoimportacao") publi...
asked by 22.09.2016 / 21:12