embedded-jetty

Wicket and embedded jetty - classNotFoundException

空扰寡人 提交于 2019-12-12 03:11:35
问题 I'm trying to run my (seam and) wicket app on an embedded jetty server. I get the following exception: Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader

Embedding Jetty 9.3 with modular XmlConfiguration

北战南征 提交于 2019-12-12 01:51:45
问题 I am migrating from Jetty 8.1.17 to Jetty 9.3.9. Our application embeds Jetty. Previously we had a single XML configuration file jetty.xml which contained everything we needed. I felt that with Jetty 9.3.9 it would be much nicer to use the modular approach that they suggest, so far I have jetty.xml , jetty-http.xml , jetty-https.xml and jetty-ssl.xml in my $JETTY_HOME/etc ; these are pretty much copies of those from the 9.3.9 distribution. This seems to work well when I use start.jar but not

Error Could not find or load main class

霸气de小男生 提交于 2019-12-12 00:15:31
问题 I have a embedded jetty java application, which starts itself up and serving requests at the mentioned routes. While testing it is working good. Now that I want to deploy this java application via war file it is giving me issues. While running java -jar server--1.0-SNAPSHOT.war : It is giving me error as Error: Could not find or load main class com.server.core.App This one will come after the 1st issue is fixed, how to include all the dependencies into the war file. Here is my pom.xml https:/

Java heap space when uploading large file to server Spring boot with embedded Jetty

 ̄綄美尐妖づ 提交于 2019-12-11 17:39:42
问题 I need to upload a large file to the server, preferably in streaming mode, so that it does not load completely into RAM. Since now, when trying to upload a large file, an exception is thrown /manager/api/server/import/upload java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3236) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) at java.io.ByteArrayOutputStream

Jetty: Pass object from main method with WebAppProvider to Servlet

寵の児 提交于 2019-12-11 17:17:55
问题 I need to pass an object from the embedded jetty code in a main method to be used in a servlet. This is an issue because of the separate classloader used within the WebAppContext - otherwise I would just use a static variable. My main code sets things up like this: Server server = new Server(); // setup connectors here... ContextHandlerCollection contexts = new ContextHandlerCollection(); RequestLogHandler requestLogHandler = new RequestLogHandler(); HandlerCollection handlers = new

“Closed while Pending/Unready” warnings from Jetty

谁都会走 提交于 2019-12-11 13:49:57
问题 After fixing synchronization issues in our async servlet we still got rare java.io.IOException: Closed while Pending/Unready warnings from Jetty. With the fixes above it decreased from ~90/day to ~5/day in our production system. It's rare and it seems a lot better but probably something minor is still missing. Complete stacktrace: [jetty-63523] (HttpOutput.java:287) - java.io.IOException: Closed while Pending/Unready at org.eclipse.jetty.server.HttpOutput.close(HttpOutput.java:285) at org

Embedded jetty application built by gradle always returns a 500 (internal server error) when launched from jar

戏子无情 提交于 2019-12-11 13:38:10
问题 I'm experiencing an issue that I do not quite get. I've written the simplest jetty application:HelloWorldJetty that binds to port 8080 and always returns 'Hello World' on http requests. The build is configured using gradle. When I use the gradle support netbeans plugin to debug the application, it works and I get the hello world response. Now when I build the jar and execute it using java -jar HelloWorldJetty.jar , it does bind to port 8080 but all responses have status 500 - internal server

Embeded Jetty, kill Request after a given time

爱⌒轻易说出口 提交于 2019-12-11 13:06:56
问题 I run a jar with an embedded Jetty. From time to time it happens that one request get stuck in some endless loop. Obviously fixing the endless-loop would be the best option. However, this is currently not possible. So I am looking for an option, that checks if a request exists for more than e.g. 5 minutes, and kills the corresponding thread. I tried the typical Jetty options: maxIdleTime soLingerTime stopTimeout None of them worked as expected. Is there another option to consider? 回答1: Do you

unable to start jetty service through command in window 7

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:19:29
问题 I am using jetty-9.1.1.v20140108 and tried to start jetty service through the command line showing me the following error. for this, using the JRE "1.7.0_02". java.io.IOException: Cannot read file: modules\npn\npn-1.7.0_02.mod at org.eclipse.jetty.start.Modules.registerModule(Modules.java:405) at org.eclipse.jetty.start.Modules.registerAll(Modules.java:395) at org.eclipse.jetty.start.Main.processCommandLine(Main.java:561) at org.eclipse.jetty.start.Main.main(Main.java:102) 回答1: Jetty is

Deploying existing WAR to embedded Jetty

五迷三道 提交于 2019-12-11 06:57:00
问题 My intention is to deploy an existing WAR to embedded Jetty 9.4.5. Unfortunately I get the following error when trying to open a page (JSP): An error occurred at line: [52] in the generated java file: [/tmp/embedded-jetty-jsp/jsp/org/apache/jsp/WEB_002dINF/jsp/MainLayout_jsp.java] Type mismatch: cannot convert from HashSet<?> to Set<String> An error occurred at line: [52] in the generated java file: [/tmp/embedded-jetty-jsp/jsp/org/apache/jsp/WEB_002dINF/jsp/MainLayout_jsp.java] Cannot