Posts by Bruno César • 5,450 points
138 posts
-
5
votes2
answers1293
viewsA: How to create Jbutton in "square" format?
The rounded edge of the button is due to the look and Feel that you are using. See the Techo of your code: for (final javax.swing.UIManager.LookAndFeelInfo info :…
-
1
votes1
answer395
viewsA: Error deploying SOAP web service with Maven and Apache Tomcat
The mistake is to parse your file sun-jaxws.xml, how this log snippet shows: WSSERVLET11: failed to parse Runtime Descriptor: XML Reader error: javax.xml.stream.Xmlstreamexception: Parseerror at…
-
2
votes1
answer209
viewsA: How to find specific values in a String?
I’m considering you’re running ipconfig, for this case. On my machine while executing your code this was the return of your code: Windows IP Configuration Ethernet adapter VirtualBox:…
-
4
votes2
answers6465
viewsA: How to return a list as JSON using Spring MVC (@Restcontroller)?
Its loader is not in trouble, apparently the problem is in the dependency of Jackson, which is the standard JSON converter registered by Spring. By default Spring MVC registers these converters:…
-
1
votes1
answer843
viewsA: Bootstrap 3 | How to leave the last column always more to the right?
As stated in the commentary, just put a pull-right, but not in the column, but in the div which will have the button bar, like this example: <link…
-
10
votes3
answers7105
viewsA: Convert String with date to Datetime in Java
The first thing you need to do is look at the date formatting documentation. You can do this by looking at the documentation for Simpledateformat. Below, the meaning only of the patterns that will…
-
0
votes1
answer412
viewsA: I can’t get all the XML file data and save it to a txt
You need to recover a list of Element from the element pessoa, then then go through this list. The way you do, recovering a single Element formação will recover only the first node formação found in…
-
9
votes3
answers31605
viewsA: Check if the element exists in Arraylist and, if not, add it
You do not need to explicitly scroll through the entire list to verify the presence of an object, List already has a method for this: contains(Object o). So, to use it, just implement your equity…
javaanswered Bruno César 5,450 -
4
votes2
answers1415
viewsA: Adjust Barcode Size Barbecue
I don’t know a way to do this directly on an object like Barcode, since he does not respect the size, Preferred size, minimum size, etc and not even if it has any utility for this. I looked at…
-
6
votes1
answer3315
viewsA: Ensure that generic object passed as parameter is subclass of an abstract class
You don’t have to cast in the scenario you quoted. Java supports generic types since version 5, so you can say that verificaDadosCliente always waits for a guy who inherits from AbstractCliente, and…
-
1
votes1
answer957
viewsA: How to use variables declared on other JSP pages after include?
To make the reuse of declarations of Taglibs you should you should use the directive include, something like that: <%@ include file="<nomeDoArquivo.ext>" %> This directive makes the…
-
1
votes1
answer1201
viewsA: Error 404 directed/or not to the Servlet. Problems with Layout
I don’t know how your project is going and what I suggest is a way to solve, not necessarily the most elegant. Since you have not posted your page with the links that are not working, I assume that…
-
1
votes1
answer554
viewsA: How to inform download PDF file name using Itext/Lowagie and Primefaces?
Although not standard HTTP specification, the header Content-Disposition is documented to be widely used and search tell the HTTP client how the content that is going in the response should be…
-
1
votes2
answers796
viewsA: Project error after adding Ireport dependency
The error is due to Maven not being able to resolve the dependency on any of the configured repositories, both of the repositories that are default, and what you have explained in your settings (in…
-
4
votes1
answer1270
viewsA: How to change the view shown in Eclipse?
To present the "right" way, just change the view you want to use. For both Java EE and Java perspectives, there are several views, note that in the "wrong" way is presented Navigator, while on the…
eclipseanswered Bruno César 5,450 -
0
votes2
answers366
viewsA: Convert Spring XML declaration to Java code
Starting from the statement of his bean in XML, let’s first declare the resolve template, will look like this: @Bean public ServletContextTemplateResolver templateResolver() { final…
-
1
votes1
answer659
viewsA: Weblogic and libs conflicts: how to know which versions Weblogic already has?
To answer every question, it would be something like this: How can I know which libs Weblogic already offers me? The library version will depend on the version of container, since it will depend on…
-
0
votes1
answer53
viewsA: Progress of the aspect-oriented paradigm
I can’t tell if it’s really less spoken for, I don’t know specific research on this. However, AOP has not disappeared and if we talk enough yes, just see the amount of questions just in the tag aop…
-
1
votes1
answer52
viewsA: Ruby on Rails problem 3.2 - It shows in HTML Git commands
This is why you did it merge, rebase or some other operation for your current branch and did not resolve conflicts before commit --> push. When git can’t do the whole process on its own adds…
-
1
votes2
answers2823
viewsA: Maximum number of concurrent connections exceeded in Apache HTTP
By default the maximum number of connections is 256, as per documentation. To increase, you can try to include (or change) in your httpd.conf something like this: <IfModule mpm_worker_module>…
apacheanswered Bruno César 5,450 -
1
votes1
answer2035
viewsA: Error importing Maven project into Eclipse: No Marketplace Entries found to Handle
This error happens because the Maven plugin in eclipse (m2eclipse) not having support for goal run in the life Cycle defined, generate-resources. To import, you can do it in two ways: disregard the…
-
1
votes2
answers346
viewsA: Show streets and images in Type Satellite by default
In map options there are no properties to enable these options explicitly, they already come with the view type. To display as you need, just use the view HYBRID, in this way: var options = {…
-
2
votes1
answer783
viewsA: Import javax.persistence and javax.inject libraries
All the dependencies of these two groupID are in the central repositories, so in summary form, just include the libraries you need to your pom.xml. In the case of groupId javax.inject are only two,…
-
1
votes1
answer766
viewsA: Exception in thread "AWT-Eventqueue-0" java.lang.Stackoverflowerror
As stated in the comments there is a cycle in the construction of their objects, which will generate the StackOverflowError. In your case there is the following cycle: Interface integrity…
javaanswered Bruno César 5,450 -
2
votes1
answer455
viewsA: Microservices with Springboot
When we use the spring-boot, by default there is something Embedded/in-memory for almost everything from containers, messaging services and databases, which is this case. Due to this you can include…
-
1
votes1
answer97
viewsA: Search Locations by category
For searches on Google Places WS API by a category, as you said, you must inform as a parameter, in addition to the mandatory (location, radius, key and radius), the attribute types, as documented:…
-
3
votes2
answers145
viewsA: CAST: difference between "(String) Arg" and "String.class.cast(Arg)"
As said by Felipe in the comments, for comparison of performance just you do a benchmarking simple of the two approaches. In this example was used the Metrics, version 3.1.0. If use Maven, just add…
-
2
votes1
answer454
viewsA: Errors installing Phonegap/Cordova - Nodejs
The problem is that you probably don’t have git installed in this environment, since git is not recognized with a command, since the log displays the following error message: Error: not found: git…
-
4
votes2
answers2015
viewsA: Generate rows of a table with different colors with repeat loop
If you only need this, you really don’t need third-party libraries, you can use basic CSS yourself. First you must understand how the selectors of CSS work. For your need we need each row of the…
-
2
votes3
answers107
viewsA: Doubt about class inheritance in Java
Apparently your class modeling is correct, the problem that makes the error is the way you are trying set the content of nome, since you are using a non-valid syntax. For this problem, instead of…
-
4
votes2
answers10187
viewsA: Generate Boleto in Java
The ones you mentioned, apparently Stella-boleto is the most used today, even by other utilities of Caelum-Stella, like the Stella-bean-validation. Looking at the repository of Stella-boleto the…
-
3
votes1
answer392
viewsA: java.net.Protocolexception: many server redirects
The problem is due to not keeping user session, more or less what the browser does when you download from there, if you disable the cookies in the browser will realize the same error =) As there are…
javaanswered Bruno César 5,450 -
8
votes2
answers15301
viewsA: Date formatting with Calendar dd/MM/yyyy
The toString() of Date uses the format dow mon dd hh:mm:ss zzz yyyy to return as a String the value of the date, where: dow is the day of the week, in your case Sat(saturday) mon is the month, the…
-
3
votes1
answer147
viewsA: How to convert a String of this type to a Date Object
If the string is even in the form it presented, also containing the type of XML data, ie, ["2015-06-30T16:38:53"^^xsd:dateTime], a way would be to recover only the relevant part with a regular…
-
3
votes2
answers1142
viewsA: Convert and Validator with CDI injection
The CDI support in Converter and Validator is in the version 2.3 JSF, still release, only Milestones. Such support is provided for in JSR 372, integral part of Java EE 8. So you should use…
-
13
votes3
answers1923
viewsA: What is a microservice architecture?
First answers to these questions that can be answered more "simply": For each service one is generated WAR? It obviously depends on the technologies/platform used. In a real environment you will…
-
3
votes2
answers1258
viewsA: What is and how does an Enterprise Application Bus(ESB) work?
As an introduction, it should first be stressed that ESBs are agnostic in terms of technology, being this a premise and even factor that makes large companies with a heterogeneous park of…
-
7
votes2
answers2270
viewsA: Separate each number with semicolon(;) in Java
split even receives a regular expression and yours is not wrong, since [] combines a single character of contained in [], for example to [abc] will match only a, b, or c. In your case it doesn’t…
javaanswered Bruno César 5,450 -
3
votes1
answer896
viewsA: How to handle request header with Filter
To recover a header of the requisition HTTP you can use the methods getHeader, getHeaders, in addition to other utilities such as getDateHeader To add or change it is a little more laborious, since…
-
3
votes1
answer8135
viewsA: Ways to get bank values with Resultset
Yes, you can recover ResultSetMetaData of ResultSet and using getColumnCount() you would recover the amount of columns to then recover the values of ResultSet by the position of the column. To…
-
2
votes2
answers6738
viewsA: How to get the name of the properties of a Javascript or JSON object?
This question of yours is very similar to this another you posted. Consider checking the package class documentation org.json, chiefly JSONObject and JSONArray. Still see if this answer below helps…
-
2
votes2
answers344
viewsA: Ungroup tags using Google Maps API with Javascript
As he had cited in the comments an alternative that probably solves his problem, even though it is not official Google, is the Overlappingmarkerspiderfier. Considering the points below, which are…
-
0
votes1
answer603
viewsA: How to get the string of a parent Json or a Json in array format?
Considering your JSON, below: { "Pessoas":[ { "NomeHomem":{ "Idade":1 } }, { "NomeMulher":{ "Idade":true } }, { "NomeCrianca":{ "Idade":"string" } } ] } As you well noted now we have a array of…
-
4
votes1
answer3905
viewsA: Hibernate - Uplicate key value violates Unique Constraint
Considering your ORM, Hibernate will execute a query to retrieve the next value of tb_pessoa_id_seq before including the new record, something of this kind: select nextval ('tb_pessoa_id_seq')…
-
0
votes1
answer66
viewsA: Nullpointerexception on a non-null object
His instance novoPersonagem of Personagem is not null, as we observe by the image. However, negociopersonagem is a null reference. Then, to solve this, simply assign an instance to negociopersonagem…
-
1
votes1
answer155
viewsA: What dependencies in Maven to use Jqwicket to integrate Wicket and Jquery
For stack trace your problem is directly related to the dependency wicket-bootstrap-extensions and not with jqwicket. jqwicket really depends on the version 1.5.3 of wicket, as we can see in these…
-
4
votes1
answer2259
viewsA: Problems with Maven package dependencies
You probably only have the default Maven repositories and none that can solve this dependency. Like simple-email is not in the repositories that are standards you should add a repository that solves…
-
3
votes1
answer694
viewsA: Division of the EJB Project
As your doubt is general regarding the process of this physical separation of the components of your architecture, I will try to cover as much as possible. The form I show here is not the only one…
-
2
votes2
answers4788
viewsA: Spring MVC and Ajax
The way you intend to use it, and the way I understand it, you don’t need to use it @ModelAttribute, since we will not send the whole object of the model that is in the form. As we will pass only…
-
1
votes1
answer683
viewsA: Problem reading property file
Both your property file and the code that retrieves it are wrong, being the root of the error due to the fact that the file is not found. The error presented is: System cannot find specified path…