Posts by Giuliana Bezerra • 3,707 points
133 posts
-
0
votes2
answers74
viewsA: Problems to generate SQL command
Look, if you want to insert the user into your relationship with the group just explore JPA and Hibernate, you don’t need to use SQL. You’d do it this way: 1 - Add user and group mapping to the…
-
0
votes2
answers483
viewsA: Webservice + SOAP for android
Exchange the following excerpt: private static final String NAMESPACE = "http://engecard.engeplay.card.com/"; For: private static final String NAMESPACE = "http://engecard.engeplay.card.com"; Taking…
-
1
votes1
answer496
viewsA: Internationalization in Java
So you can do this using a language file. It would be something like: 1- Method to recover language file selected based on language option selected in Jmenuitem (files . lang would be in the lang…
-
5
votes1
answer260
viewsA: How to install Python 3
In Ubuntu one of the ways to install any package is to use apt-get: sudo apt-get install <nome do pacote> If you do not know the package name uses: apt-cache search <nome do pacote> In…
-
3
votes2
answers302
viewsA: Questions about the Spring XML file?
By answering your questions: Where I create the Spring xml file? If you are using a Maven archetype, put it in the project’s Resources folder (src/main/Resources). What name do I give to the xml…
-
1
votes1
answer442
viewsA: Primefaces autocomplete does not pass value to the bean
The error is in completeMethod: <p:autoComplete id="acCliente" value="#{projetosBean.filtroClientes}" completeMethod="#{projetosBean.listarFiltroDeClientes()}"/> You do not use "()" calling…
-
2
votes1
answer265
viewsA: How to run an application on multiple Threads?
Now that’s where my problem is, when I click the GENERATE button, the application is to take all the Ips that are in Arraylist and play on thread, but it does not enter the loop that will do this…
-
3
votes1
answer1244
viewsA: How do I change the Look and Feel of an app?
The original format uses the look and Feel Nimbus, the format that was left after is the Java standard. You can programmatically select the look and Feel of your application as follows: try { for…
-
2
votes1
answer443
viewsA: Consume Webservice C# on android
Come on, first you need to define the responsibilities of your program. Clearly this Activity has many responsibilities, so to structure it better I suggest you follow the following architecture:…
-
0
votes1
answer289
viewsA: Postgresql reserved word problems
So my question is does there exist how to resolve this issue without needing to change the bank? Yes, by changing the code. Modifies the column name where you have the reserved word Authorization:…
-
1
votes3
answers3113
viewsA: Consuming HTTPS web service
One way to solve this is to create a certificate factory to generate one that allows you to make calls to an https service. This is an example of Factory that I created for certificates: public…
-
3
votes2
answers366
viewsA: Are product box bar codes suitable for primary keys?
Product box bar codes are suitable for keys primaries? To answer the question, no, it is never good to make public the identifier of a bank record. Public information, even if it is unique as a…
-
2
votes2
answers812
viewsA: Pegar sql Hibernate
Using org.hibernate.Query from Hibernate (which is the most common practice when someone develops queries using Hibernate) it is possible to retrieve the query string using the getQueryString…
-
0
votes1
answer137
viewsA: I can’t find my GET method path in Webservice Rest
You also need to set up your web.xml. It would look like this: <servlet-name>Jersey RESTful Application</servlet-name> <url-pattern>/rest/*</url-pattern>…
-
0
votes2
answers228
viewsA: Create bi-directional relationship without using DTO?
To manipulate services the strategy commonly adopts is to use Dtos, even to avoid these annotated entity problems with bi-directional dependencies. Even replicating information is a good practice to…
-
1
votes1
answer366
viewsA: Eclipse + Javahl / SVN - Clientexception - Help
This Javahl doesn’t usually work with the subeclipse because it uses the Java Native Interface that never works! Switches pro Nector Svnkit: To configure the nector, go to: Window, Preferences, Team…
-
2
votes1
answer314
viewsA: Mapping the same entity class to two banks
Yes. In JPA you use persistence units, which represent specific banks. If you want to specify more than one bank just declare more than one persistence unit (PU) and create the Entity managers for…
-
5
votes1
answer92
viewsA: Non-recognition eclipse error of Static and default modifiers
Hello, follow the following steps: 1 - Window > Preferences > Java > Compiler: Czech if you have java 8 in Compiler compliance level. 2 - Window > Preferences > Java > Installed…
javaanswered Giuliana Bezerra 3,707 -
1
votes2
answers4697
viewsA: Eclipse UTF8 configuration
Window > Preferences > Workspace: Edit where you have "Text file encoding". Remember that in linux by default comes UTF-8, but in windows comes an ISO. It’s always good to align the enconding…
-
-1
votes1
answer271
viewsA: Create Rest service versions
Versions of an application are not managed programmatically, but rather through version control systems (GIT, SVN, ...). When you need to close a version that should not be modified and is stable…
-
4
votes2
answers783
viewsA: Do I need to do unit testing of the system entities?
There is no unit test of getters and setters, which are the methods contained in POJOS. For any other method one should create the unit tests. It is good to keep in mind that the idea of a unit test…
-
1
votes1
answer2086
viewsA: Number of repeats within an array
To work you could only print after performing all the accounting. To do this, you would need to save everything you counted and then just print the variable that stored those accounts. A possible…
-
1
votes1
answer229
viewsA: Reading of text file
Check the encoding you’re using. The problems that occur with corrupted files are often related to the encoding used for reading the file. Look at the following post and make the indicated change:…
-
0
votes2
answers2498
viewsA: Prohibit duplicate registration
If you want to display a user-friendly message just treat the bank exception thrown when trying to register a data breaking a Unique Constraint. It would look something like this: public Usuario…
-
1
votes2
answers1888
viewsA: Error :"Cannot create JDBC driver of class '' for connect URL 'null' java.sql.Sqlexception: No suitable driver"
I managed with the help of @Dilnei Cunha. I made the following modifications: 1- The context I was modifying was not the right one, I had to modify what is in the Servers folder of the eclipse. Also…
-
1
votes2
answers1888
viewsQ: Error :"Cannot create JDBC driver of class '' for connect URL 'null' java.sql.Sqlexception: No suitable driver"
Hello, I am trying to configure the database connection in my JPA application using JNDI. I am following this tutorial…
-
1
votes1
answer77
viewsA: Sensitive data in persistence.xml
Solved using JNDI. I prefer to leave this control of sensitive data to the container (Tomcat).
-
1
votes1
answer77
viewsQ: Sensitive data in persistence.xml
I am using JPA in my application and so I have a file persistence.xml which contains the connection data to my database: <property name="javax.persistence.jdbc.url"…
-
2
votes1
answer57
viewsA: Query returns nothing
The problem is in your query filter: where ((dia>=15 and mes=valor-1) and (dia<=14 and mes=valor)) Note that you have placed 2 conflicting conditions on the Where label: mes=value-1 and…
-
1
votes2
answers1470
viewsA: How to search using jpa with searching for foreign key
Your problem is here: m.username_id = ? 1 As you are using jpql, the field name is not the name of the column in the database, but rather the name of the entity method of m without the get, which is…
-
5
votes1
answer67
viewsA: Refresh page inserts again
This is because you are submitting the same inclusion request when updating the page. This is a security breach that must be addressed in the architecture of your system. One way to treat this is to…
-
2
votes1
answer843
viewsA: Why did the folders in my github directory turn gray and empty?
"did td that and yet: fatal: 'origin' does not appear to be a git Repository fatal: Could not read from remote Repository. Please make sure you have the correct access Rights and the Repository…
-
0
votes2
answers191
viewsA: null return when registering new product, but when editing I can save give no error
The mbean view scope would only call the constructor when you left the page. That way the problem should be in your save method: this.product = registersProduceService.save(this.product); Checks…