Posts by Bruno César • 5,450 points
138 posts
- 
		1 votes1 answer1180 viewsA: Docker Database Connection ProblemBy error message you are trying to connect to a local postgres: Network is unreachable n tis the server running on host "localhost" (::1) and Accepting n tTCP/IP Connections on port 5432? It happens… 
- 
		1 votes1 answer78 viewsA: How to assign recover ip from a service within Docker-Composer?You are using some concepts incorrectly, such as the use of external_links. external_links are used only when a link with container created/managed outside the commie in question. Being on the same… 
- 
		1 votes1 answer163 viewsA: How to configure the Auditor using Spring Boot 2.0.2I will consider your old implementation, which returns String, not a user entity, for example. Also, I won’t consider anything that leads me to believe that you are using custom things for user… 
- 
		2 votes1 answer109 viewsA: When the container does not know the host name?The containers have no knowledge of hosts which are outside the networks in which the container is. This is your problem, namely the Docker host - your machine - know the pgmaster, but not the… 
- 
		2 votes1 answer99 viewsA: How can I register a route in IIS to my container Docker?How are you simply using a host Docker and IIS is not a container/service, the solution would be to have your IIS access the host Docker. Since the networks created by Docker are virtual, both the… 
- 
		2 votes1 answer807 viewsA: How to make a find with Pagination and search term at the same time with Spring data?How you want to use all attributes of the type object Pessoa, one of the ways is to use Query by Example (QBE), then the first thing you must do to facilitate is to inherit also from the executioner… 
- 
		1 votes1 answer3749 viewsA: How to expose more than one Docker container port?First, take a look in this that talks a little more about the differences of publishing/displaying doors. Would it be on Dockerfile? This option is mandatory if we want to expose the doors? Use the… dockeranswered Bruno César 5,450
- 
		1 votes2 answers1060 viewsA: Doubts about the Docker-Compose and Dockerfile configurationAs you mentioned the difference begins in the "scope", where each one is applied. EXPOSE is in the scope of the image, in the Dockerfile while port in the creation of container, either in the… 
- 
		4 votes1 answer2838 viewsA: Docker Compose LinkThe commie will always create a network for your services and this is where the problem lies, since by default you will not be able to access container of different networks other than the default.… 
- 
		1 votes1 answer55 viewsA: Problem with DockerfileAbout this specific error, the problem is that you are "mixing" the commands in a single line, which ends up generating wrong instructions. To separate the commands you must use&&, ; or || -… dockeranswered Bruno César 5,450
- 
		1 votes1 answer48 viewsA: query executes in the database but in the project points errorYour query is yes valid, as you yourself noted when running it directly on an SQL client. The problem is you’re using aliases in the consultation, exactly in the calls nome, naming them as Distrito,… 
- 
		1 votes1 answer324 viewsA: How to expose UDP ports in the Docker-Compose configuration file?To expose the port as UDP, simply add at the end of the mapping /udp. Using his commie as an example, we would have this: version: "3.0" services: myservice: image: "my/service" ports: -… 
- 
		1 votes2 answers219 viewsA: Container LAMP with Debian StretchOf "different" from a standalone setup is that you will have running more than one process in your container. Not that containers have been made to run a single process/service, but do everything in… 
- 
		1 votes1 answer1100 viewsA: Perform a date search in a timestamp column using spring dataSince the database column also stores information that not only day/month/year you have to make the generated query consider this. One way to do this is by shopping with date between the start and… 
- 
		2 votes1 answer143 viewsA: How do I use Page in this query instead of List?The first point is that the pagination information in the method signature should be the last argument. In your case, just have something like this: Page<Protocolo>… 
- 
		1 votes1 answer131 viewsA: Multiple @Elementcollection in two different classes @EmbeddableHibernate will present this problem when trying to persist more than one entity it manages that share the same instance of a collection. For example, this scenario will present this problem: final… 
- 
		3 votes1 answer9434 viewsA: Eclipse Message: The Selection cannot be launched, and there are no recent launchesThe problem is because the main method signature is wrong, see: public static void main() Simply adjust by providing a signature as provided in JLS, that is, this: public static void main(final… 
- 
		3 votes1 answer1267 viewsA: How to deploy a web application manually in wildfly9?If it is possible to manually deploy to wildfly, how do I perform a deployment test using an application helloworld that I implanted in the Tomcat webapp to run in wildfly? It is possible. If you… 
- 
		4 votes1 answer140 viewsA: How to escape all metacharacters using Pattern.Compile(.)?You need the compiled standard to be literal, that is, that meta characters or escape characters in the pattern do not have regular expression treatment. To do this simply compile the pattern by… 
- 
		6 votes1 answer2259 viewsA: Use of the Consumer interfaceImplement a Consumer(or any other functional interface), in a class proper to this, in a centralized way, has sometimes its usefulness, as not to spread the same code in several points, mainly when… 
- 
		4 votes1 answer740 viewsA: How to make Hibernate read a table in a Mysql database and write to another table in Postgresql?By default Hibernate will look for entities that are in the same classpath of persitence.xml, that is, entities that are in the same jar. How he does this is the expected behavior what is happening… 
- 
		0 votes1 answer101 viewsA: Log4j does not log into DockerLogs are not created because there is no container spinning. build build an image and make it available, so you can use it to create containers. The application construction logs, the Jetty running… dockeranswered Bruno César 5,450
- 
		3 votes1 answer671 viewsA: How to override CSS Primefaces added via Maven?Simply declare the stylesheet that contains what you need to overwrite after pressing the one on the first faces. Like the one on the first faces will be on <head />, may declare so:… 
- 
		1 votes1 answer107 viewsA: httppost is not solved in my class in my applicationYou can add libraries in many ways. It is available in public repository, so it is used Maven, can add it like this: <dependency> <groupId>org.apache.httpcomponents</groupId>… 
- 
		6 votes3 answers454 viewsA: Why was the parameterized class attribute <T> not instantiated?Briefly I would define as follows: badly made class design :), the constructor argument of Menu should also be typed, since BdApp is a raw type, in addition to which it could be a reference to IDAO,… 
- 
		1 votes1 answer2008 viewsA: Recover WSDL from Webservice Nfe ASMXBy default services published with ASMX leave the WSDL accessible in a URL ended with ?wsdl, then you can access the WSDL by adding ?wsdl from this url, something like this:… 
- 
		5 votes1 answer1735 viewsA: Problem retrieving Datasource in Wildfly: javax.naming.NamenotfoundexceptionIn a nutshell: cannot do remote lookup of a datasource in JNDI in versions superior to Jboss AS 7. I’ll show you a basic example of how a customer can try to recover a datasource of the JNDI in… 
- 
		2 votes1 answer2691 viewsA: How to open a window inside a main frame?You can use JInternalFrame to manage your registration screens. A very simple example. Consider that you have your main screen, MainFrame, that has a menu, something like that: The summary code… 
- 
		2 votes1 answer379 viewsA: How to mount a link in JSP with the value of an input?You can do it with javascript in a simple way. For this just have an event in your input text and whenever its value is changed we will change the attribute action of form. Starting from something… 
- 
		0 votes1 answer1003 viewsA: Destroying Session and Session Objects in JSFIt is not necessary for you to recover the session, remove the controller Session scoped and then invalidate the session manually, having to work with specific things from the Servlet API. You can… 
- 
		2 votes2 answers762 viewsA: Problems to remove @Manytomany element with @JointableFirst of all I believe that your mapping can be simplified, mainly the join table. To centralize the mapping of the primary key of the entities I created a BaseEntity, thus: @MappedSuperclass public… 
- 
		2 votes4 answers119 viewsA: Data deletion via HibernateIf you want to use the remove, you can wear something like that: Temp temp = new Temp(); temp.setId(1); getEntityManager().remove(temp); In this case the object must be in the session, otherwise a… 
- 
		2 votes2 answers185 viewsA: Read XML file with only one Parent NodeThis XML of yours has a basic problem, which is to have more than one root tag (<Registos /> and <Socios />), making it an invalid XML. Since it is not a valid format you will not be… 
- 
		1 votes2 answers377 viewsA: Doubt regarding the management of JPA with Spring in JEE serverIf what the container is managed for you is the data source, just change the way you recover the data source. As opposed to using DriverManagerDataSource, which is a basic implementation of… 
- 
		2 votes1 answer185 viewsA: What is Context and Generated Keys?Since you have not included more details about what this context is I will not assume that it is a context of JNDI, a Spring, CDI, or any other context. So just include answer to the second question… 
- 
		3 votes1 answer717 viewsA: Error 403 Forbidden while consuming CEP webserviceI tested calls to this provided URL example: http://apps.widenet.com.br/busca-cep/api/cep.json?code=01001000 What I realized is causing the 403 is that the server needs the header User-Agent is… 
- 
		0 votes1 answer155 viewsA: Hide column at editing timeUsually in the edition the id will not be null, since it was created in the bank and everything else. If that’s true, you can wear something like this: <h:panelGroup… 
- 
		1 votes1 answer746 viewsA: Problem running runnable JAR: Unable to load class [com.microsoft.sqlserver.jdbc.Sqlserverdriver]The root of your problem is a ClassNotFoundException, because there is no class in the classpath of the application. As discussed the absence of this class in the classpath is due to the fact that… 
- 
		1 votes2 answers704 viewsA: Error replacing occurrence in string using replaceAllSo much replace(Charsequence target, Charsequence Replacement) how much replaceAll(String regex, String Replacement) make substitution using matching patterns using regular expressions. The question… 
- 
		0 votes1 answer267 viewsA: Maven calling AntUsing the maven-antrun-plugin you can use a file ant external. As an example, let’s consider this build.xml containing a target for <?xml version="1.0"?> <project name="stack-test">… 
- 
		2 votes1 answer498 viewsA: java.lang.Classcastexception: Converter JSF errorConsidering the exception: java.lang.ClassCastException: java.lang.Long cannot be cast to com.porto.npf.sgpsweb.model.Cargo at… 
- 
		1 votes2 answers566 viewsA: 400 (Bad Request) when sending array to Spring Controller using AJAXFirst we have to understand how the request is made, how the values will arrive on the server. For this we just see in the documentation of jQuery and we will have there that the data of ajax is… 
- 
		6 votes2 answers4741 viewsA: How to read a JSON file without a server?If you already have JSON in a file, in Dropbox itself, you can use getJSON as you mentioned, Dropbox is your static file server ;) To do this, just pass your JSON URL, say you’re at this Dropbox… 
- 
		3 votes1 answer1947 viewsA: How to extract Array from JSON into an object’s List type attributeThere are several ways to deserialize this your object using Jackson, I will cite only two of them, then you can choose the one you think most appropriate to use in your context. First, considering… 
- 
		2 votes1 answer533 viewsA: "java.lang.String cannot be cast to ..." using access control in ServletAs spoken in the comments, you are adding to the session an attribute called name with the guy String and then trying to get it back and doing cast for the guy Usuario. One ClassCastException is… 
- 
		2 votes1 answer112 viewsA: Thread execution - Java EE - JbossThere are some ways to do, such as using Servletcontextlistener, startup Servlets (see load-on-startup in specification), Resource Adapters in environments full profile, EJB 3.1 @Startup, etc.. The… 
- 
		4 votes1 answer1079 viewsA: Save File with ExtensionThe simplest approach to use, since you have the original file, is to also save the file extension or the mime type. Unlike how you’re doing, having a column of the kind blob on the table empresa,… 
- 
		2 votes4 answers2280 viewsA: String Manipulation - split()For registration and (maybe) use for someone, in this case there is no need to do split of string. I don’t know if the obligation is to use split or have a last name, but without using split it is… 
- 
		1 votes1 answer172 viewsA: Define which method is not serializedResteasy is the preview JAX-RS on Jboss AS. In version 7.1.1.Final of Jboss AS the version of Resteasy is the 2.3.2.Final (can be seen in modules\org\jboss\resteasy). In his documentation it is said… 
- 
		2 votes1 answer121 viewsA: Java Https - Httpsurlconnection - Unsupported Sslv2helloYou’re probably running this code on Runtime version 8 of Java. SSLv2 is obsolete it’s been a long time, so it’s no longer supported by default on Runtime version 8, not having a socket Factory for… javaanswered Bruno César 5,450