Questions tagged as 'java'

1
answer

MVC representation in UML class diagram

I'm building the class diagram of my project and I was left with a question at one point. In the project I create an instance of my Controller class in main and step reference (I know that in Java the pass is always by value, but when we pass th...
asked by 16.12.2015 / 00:11
1
answer

Object-relational mapping (JPA + Hibernate) using XML

For a specific reason, I need to map object-relational (JPA) of my entities with XML. [Unfortunately,] I can not use annotations to do this. It turns out that on certain properties I need to use Hibernate-specific features. For example, extra la...
asked by 09.07.2014 / 03:09
2
answers

Tomcat only reads Log4J.properties when rebooted

Until recently I made changes to the log4j.properties ex file: change the level of the TestMB class) and just do the redeploy the application. Now, the changes only take effect when I restart Tomcat. What will happen? Log4j.properties...
asked by 20.01.2014 / 14:46
1
answer

How to return 2 objects at the same time in a method in Java?

public class Equacao2Grau { int a, b, c; public int CalculoDelta(){ return (int) (Math.pow(b, 2) - 4*a*c); } public int FormulaQuadratica(){ int x1 = (int) (-b + Math.sqrt(CalculoDelta(...
asked by 12.09.2017 / 21:48
1
answer

Pick up Strings from other Activitys [closed]

How do I get a String, or more, from another Activity, and then use it in another Activity, does anyone there know how to tell me?     
asked by 24.10.2017 / 05:40
2
answers

Problems assigning values to variables in an object

I need to pass variable data to another class called Fila.java. I have a vector of type that receives objects, so in the main class I created an object that I initialized as follows: public class Dados{ int menu = 20,i=0; String produ...
asked by 24.10.2017 / 04:16
1
answer

"No Persistence provider for EntityManager" for Hibernate 5.x

Well, I have to update the version of hibernate that I was already trying to implement in my project to avoid bugs of the previous version, but I'm having a hard time persisting in the new version, since there were changes. > The first...
asked by 19.10.2017 / 15:39
1
answer

Hibernate is not creating or updating DB tables

I have classes beans.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javae...
asked by 02.05.2018 / 21:30
1
answer

Spring boot Data-JPA and JSF Java Config

I'm setting up a project using Spring boot for ioc and Data-Jpa along with JSF but I have a problem with @Autowired my DAO is not loading. Does anyone know how to do this setting and where can I be wrong? Here's my setup: Applica...
asked by 09.07.2015 / 08:42
1
answer

Java Https - HttpsURLConnection - Unsupported SSLv2Hello

When making an https request I have the following exception:    javax.net.ssl.SSLException: Unsupported record version SSLv2Hello public static void main(String[] args) throws Exception { URL url = new URL("URL"); HttpsURL...
asked by 14.09.2015 / 15:31