-XX:OnOutOfMemoryError=”kill -9 %p” Problem

In Java version 8u92 the VM arguments -XX:+ExitOnOutOfMemoryError -XX:+CrashOnOutOfMemoryError were added, see the release notes. ExitOnOutOfMemoryError When you enable this option, the JVM exits on the first occurrence of an out-of-memory error. It can be used if you prefer restarting an instance of the JVM rather than handling out of memory errors. CrashOnOutOfMemoryError If this … Read more

How to enable DEBUG level logging with Jetty embedded?

My question was answered on the Jetty mailing list by Joakim Erdfelt: You are looking at the old Jetty 6.x docs at docs.codehaus.org. DEBUG logging is just a logging level determined by the logging implementation you choose to use. If you use slf4j, then use slf4j’s docs for configuring logging level. http://slf4j.org/manual.html If you use … Read more

Configure embedded jetty with web.xml?

Use a org.eclipse.jetty.webapp.WebAppContext Example: package jetty; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.webapp.WebAppContext; public class OnWebApp { public static void main(String[] args) throws Exception { // Create a basic jetty server object that will listen on port 8080. // Note that if you set this to port 0 then a randomly available port // will be assigned that … Read more

Spring Boot project with static content generates 404 when running jar

It turns out that whilst Spring Boot is being clever at adding the various resource directories to the classpath, Maven is not and it’s up to you to deal with that part. By default, only src/main/resources will be included in your JAR. If you create a folder called /static in the root of your project … Read more

Form too Large Exception

Try setting System properties via jetty.xml <Call class=”java.lang.System” name=”setProperty”> <Arg>org.mortbay.jetty.Request.maxFormContentSize</Arg> <Arg>500000</Arg> </Call> ok you can configure it from your web app Add WEB-INF/jetty-web.xml file in your web application and configure the parameter in that file: <?xml version=”1.0″?> <!DOCTYPE Configure PUBLIC “-//Mort Bay Consulting//DTD Configure//EN” “http://jetty.mortbay.org/configure.dtd”> <Configure id=”WebAppContext” class=”org.mortbay.jetty.webapp.WebAppContext”> <Set name=”maxFormContentSize” type=”int”>600000</Set> </Configure> Document Version 7 … Read more

Remote debug Jetty (no mvn, no plugins)

This is what we are adding to our JBoss command line while development: -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n Then we launch the eclipse remote debugging and connection to this port. Update: To run from jar (standalone) do the following java -Xdebug -Xrunjdwp:transport=dt_socket,address=8585,server=y,suspend=n -jar start.jar

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)