tomcat8

JSON Builder cause memory leak in Tomcat8 Application

微笑、不失礼 提交于 2020-02-06 10:37:54
问题 I've created a WebApp for a Tomcat8 Server. It is a small webbased game. Since I've switched from flatfiles to MySQL I have a lot of problems with javax.json builder. Here the part of my code: public void saveUserResearch(){ MySQLTable t = SpaceWar.instance().getUserResearchTable(); JsonObjectBuilder mainBuilder = Json.createObjectBuilder(); JsonObjectBuilder subBuilder = Json.createObjectBuilder(); for(UserResearch r : getResearchList()){ int index = r.getIndex(); subBuilder = Json

JSON Builder cause memory leak in Tomcat8 Application

巧了我就是萌 提交于 2020-02-06 10:35:10
问题 I've created a WebApp for a Tomcat8 Server. It is a small webbased game. Since I've switched from flatfiles to MySQL I have a lot of problems with javax.json builder. Here the part of my code: public void saveUserResearch(){ MySQLTable t = SpaceWar.instance().getUserResearchTable(); JsonObjectBuilder mainBuilder = Json.createObjectBuilder(); JsonObjectBuilder subBuilder = Json.createObjectBuilder(); for(UserResearch r : getResearchList()){ int index = r.getIndex(); subBuilder = Json

Unable to process file module-info.class within a Java9 project results in ClassFormatException

蓝咒 提交于 2020-01-20 07:00:21
问题 Trying to Run Vaadin 8.1 app under Java 9 prerelease in IntelliJ 2017.2.2 I was able to build a vaadinjavanine.war using a fresh project and host the same using Jetty Server. I ended up trying to deploy the generated war to a tomcat server. But, during the startup of the tomcat server, I am getting the following exception: 21-Aug-2017 22:53:38.830 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsFile Unable to process file [/Library/Tomcat/apache

Running Moqui on Tomcat over SSL (setting http-port and htts-port) - return code 302

风格不统一 提交于 2020-01-17 04:43:05
问题 I have a Tomcat server with SSL configured. I can access the Tomcat Web Application Manager, the connection is secured. Tomcat server is accessible on ports ports 80 and 443, and is dockerized (the container's ports are 8080 and 8443). The application is working fine over http, no problems spotted. Then I decided to switch to https. So I modified the MoquiProductionConf.xml web-app tag this way: <webapp-list> <!-- NOTE: when you set https-enabled="true" make sure to set the http-port and

Cannot cast from ConnectionWrapper to oracle.jdbc.OracleConnection using JAVA1.8 and Tomcat 8.5.28

北慕城南 提交于 2020-01-17 02:19:26
问题 Why connection is not working after few seconds? Application is hanging up and not running as expected and returning the below error. java.lang.ClassCastException: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to org.apache.tomcat.dbcp.dbcp2.DelegatingConnection Below is the code that is used to get the connection: OracleConnection oracleConnection = (OracleConnection) ((DelegatingConnection)connection).getInnermostDelegate(); using libraries: commons

Spring boot multiple contexts - one for public error

帅比萌擦擦* 提交于 2020-01-16 18:24:15
问题 I have this requirement, where "com.my.application/" should show customized 404 error page while "com.my.application/data" should work properly. Following context-path is configured in application.properties server.context-path=/data What are my options? How can I keep context-path "/" and "/data" both alive? 来源: https://stackoverflow.com/questions/55247140/spring-boot-multiple-contexts-one-for-public-error

Why Tomcat returns different headers for HEAD and GET requests to my RESTful API?

我怕爱的太早我们不能终老 提交于 2020-01-12 07:01:50
问题 My initial purpose was to verify the HTTP chunked transfer . But accidentally found this inconsistency. The API is designed to return a file to client. I use HEAD and GET methods against it. Different headers are returned. For GET , I get these headers: (This is what I expected.) For HEAD , I get these headers: According to this thread, HEAD and GET SHOULD return identical headers but not necessarily . My question is: If Transfer-Encoding: chunked is used because the file is dynamically fed

Can't use Tomcat server in Eclipse

女生的网名这么多〃 提交于 2020-01-07 06:35:10
问题 I have installed Tomcat v8.0.35 and I have configured it following these steps (here). I have checked it and it's working fine: I went to localhost:(myport) and got this Now I installed Eclipse Mars2 Enterprise Edition, New->Dynamic Web Project, I had no target runtime so New Runtime->Tomcat v8->gave the installation folder->finish. Now the project has been created but when I click the server tab, it doesnt show tomcat. I get this message "No servers available. Click this link to create a

Why Tomcat8.exe starts with a JAVA_HOME that is different from JAVA_HOME setted in Windows environment variables?

末鹿安然 提交于 2020-01-06 23:50:01
问题 I have this strange situation with Tomcat8.exe in Windows 10. My JAVA_HOME environment variable defined in Windows System environment points at JDK 1.8 path: JAVA_HOME=C:\Program Files\Java\jdk1.8.0_65 When I run "C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\Tomcat8.exe", the server starts with another JDK, as I can see in catalina.log: 12-May-2016 08:57:28.250 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.30 12-May-2016 08

Nothing printed on jsp for added model object

被刻印的时光 ゝ 提交于 2020-01-06 05:40:13
问题 I am getting a strange behavior below: I am adding a model object in Spring Controller, when I access the same using jstl in jsp, I get nothing over there. My project is REST based built on Java 1.8+ Tomcat 8.0+ Maven. My maven project is named reporting having modules reporting-rest and reporting-dao. Jsp pages and controllers are located in reporting-rest. pom. xml content in reporting-rest <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven