Posts by Marcos Sousa • 726 points
25 posts
-
1
votes2
answers1171
viewsA: Entitymanager or Session? What to use?
Well, JPA is a specification. Hibernate is one of the implementations of JPA, that is, it implements the specification. As well as Eclipselink, Toplink and Openjpa. For you to manage your objects…
-
6
votes1
answer2011
viewsA: Cascadetype.ALL doesn’t work. Am I using it wrong?
In fact,(Edition note 1: Not recommended for "mixing") do not mix notes Hibernate in JPA. to JPA is the specification and the Hibernate implements, in case of changes of implementation, for the…
-
1
votes1
answer416
viewsA: Adding JSF in java project
Well, I don’t understand the version of your JSF dependency. Try replacing it with the following (or you can choose another one from the Maven repository). <dependency>…
-
2
votes1
answer74
viewsA: Convert classes
You can create a class that implements the interface Converter, in it we can define how the data conversion will take place, in this way you customize this conversion. By steps: Create a class that…
jsfanswered Marcos Sousa 726 -
2
votes2
answers1186
viewsA: Find the jdbc mysql driver and establish connection
first- Check in your database server, if you actually created the database ucsal; 2nd- Missing add login and password access to your database server, in this case would look like this:…
javaanswered Marcos Sousa 726 -
5
votes1
answer1624
viewsA: Difference between process and immediate
Well, according to the documentation from Primefaces 6.0: The attribute immediate has its value default = false and your type is boolean. Its function is to determine at which stage of the JSF…
-
1
votes1
answer95
viewsA: Using CDI in the app
You should modify the management of your bean, which is currently managed by JSF and is set out as @ManagedBean in class mbean_002 for @Named, which will be managed by CDI, This is the control…
-
1
votes1
answer109
viewsA: JSF slowness after implementing Phaselistener
I have already gone through exactly this problem. This is caused by setting up your file web.xml, where you should delete the following lines: <listener>…
jsf-2.2answered Marcos Sousa 726 -
1
votes2
answers470
viewsA: Problems opening connection to JSF and JPA
There are really some problems with your file persistence.xml, but it is unclear whether the problem is specifically in persistence.xml. Make sure everything is ok with your Mysql Connection Driver;…
-
1
votes2
answers224
viewsA: Jconsole: Java Monitoring and Management Console
I was accessing the monitoring app from another directory (C: Program Files Java jdk1.8.0_74 lib), of the briefcase lib, but it’s only remote monitoring. I signed the jconsole of the briefcase bin,…
-
1
votes2
answers224
viewsQ: Jconsole: Java Monitoring and Management Console
Jconsole Hi, I read that this tool monitors JVM processes. However, when executing the tool appears this form (see image). As for these parameters, what do they mean? I don’t remember configuring…
-
1
votes1
answer265
viewsA: Mapping classes HIBERNATE
Well, in your persistence.xml missing vc add your entities in tags<class> </class>, you just have to publish the Fully Qualified name ex class:…
-
1
votes2
answers538
viewsA: Maven project with Hibernate and Glassfish does not generate database
Well, your persistence.xml file doesn’t have the type of transaction your application will use (local Resource or data source), the declaration of your entity classes, and the database properties…
-
2
votes1
answer181
viewsA: Glassfish installation error
The problem is you’re pointing to an JRE, not a JDK. Click "Installed JRE Preferences" at the top of the screen to add the reference to a JDK installed on your computer, for you to use when creating…
glassfishanswered Marcos Sousa 726 -
1
votes1
answer486
viewsA: How do I make a Onetomany Unidirectional relationship with joincolumn mandatory?
This question does not contain the Entities. Well, in this case just don’t create any attribute in the Phone class. As it is in your code, you are saying that this class (not specified in the…
jpa-2.0answered Marcos Sousa 726 -
2
votes1
answer1049
viewsA: Configure Sessionfactory Hibernate 5.2
Your question doesn’t contain many details, but I think I know what ails you: This utility class must be the Persistence Factory with the database, where it will receive a persistence unit from the…
-
1
votes1
answer318
viewsA: How to form a JSF with a field that can have as many values as needed?
Buddy, you need a view, an acquittal. XHTML which will contain the code of the form in question, is usually created and allocated in the Webcontent folder of your web project. Remember, you must…
-
2
votes2
answers2921
viewsA: How to resolve JPA Hibernate error
Hi, you are using the Eclipselink 2.5.2 library in your classpath, but in your persistence.xml it says that your implementation is Hibernate... Ex:…
-
2
votes2
answers233
viewsA: How to make this consultation with JPA?
Try modifying your Where "a. dataNascimento <> '12/9/2000'" as the equal "=" would look like this: "a. dataNascimento = '12/9/2000' " ////////////////////////// Well, I guess the problem…
-
-2
votes1
answer153
viewsQ: Hibernate libraries with JPA specification
I am using JPA and Hibernate and encountering difficulties regarding querys errors. I wonder if there is a specific JPQL library? and what are necessary for projects to sound this profile.
-
2
votes2
answers236
viewsA: Datatable does not populate object? JSF
Brother, have you ever tried to adopt an Id? //example @Id @Generatedvalue(Strategy=Generationtype.IDENTITY) // in case you are using a mysql BD. ps. vc could add your persistence.xml file to…
-
3
votes2
answers1434
viewsA: How does a Container work?
Brother, the issue is the specification to run your application. for example, if you follow the JEE specification - standard Edition, it has 2 types of servers that support various types of…
answered Marcos Sousa 726 -
2
votes2
answers173
viewsA: How to create Pojos with annotations quickly?
Web project, my brother? If you’re using JPA with provider Hibernate, to IDE Eclipse for Java EE has a feature for creating entities from tables, just select the project with the right click go on…
-
1
votes2
answers318
viewsA: DAO + Webservice
Well, apparently your question is about the structure of the project, right? In the IDE vc creates a dynamic web project (Dynamic Web project), it also supports you in choosing the libraries you…
-
5
votes1
answer1147
viewsQ: How to query in Manytomany tables?
I have two tables/entities in the database with the following attributes: Car (code, plate, color) Acessorio (code, description). public Carro buscarCarroComAcessorio(Long codigo) { return (Carro)…