jetty

How to gracefully close an Endpoint when an exception occurs?

不想你离开。 提交于 2019-12-10 08:58:52
问题 I've written a small JAX-WS webservice that I'm running outside a container with Endpoint.publish() : Endpoint endpoint = Endpoint.create(new MyServiceImpl()); endpoint.publish("http://localhost:4425/myService"); If any of my web service methods throws an exception, the endpoint is not gracefully closed and the address remains in use until Windows eventually releases it. This causes the classic error: com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net

Jersey Client POST results in - header full: java.lang.RuntimeException: Header>6144

笑着哭i 提交于 2019-12-10 07:58:25
问题 Got Jetty 8.1 with Jersey 2.4 as the REST servlet: <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> <init-param> <param-name>jersey.config.server.provider.packages</param-name> <param-value>org.foo.rest;org.bar.rest</param-value> </init-param> The GET responses work just fine, but when I try a POST, this strange error is seen from Jetty: WARN o.e.j.server.AbstractHttpConnection - header full: java.lang.RuntimeException: Header>6144 The client sees only an HTTP 500

Setup Jetty GzipHandler programmatically

安稳与你 提交于 2019-12-10 07:36:13
问题 I'm playing with Jetty GzipHandler and it seems to work rather strangely: It only compresses already compressed files. My whole setup is GzipHandler gzipHandler = new GzipHandler(); gzipHandler.setHandler(myHandler); server.setHandler(gzipHandler); The browser (Chromium) always sends a header containing Accept-Encoding:gzip,deflate,sdch so according to the documentation GZIP Handler This handler will gzip the content of a response if: The filter is mapped to a matching path The response

How to get Jetty thread dump?

坚强是说给别人听的谎言 提交于 2019-12-10 05:53:22
问题 I have a Ubuntu Server 10.10 64-bit running a web application on Jetty 6.1.24-6 on Sun's JVM , both installed from standard Ubuntu repositories. I'm trying to track down a problem with this server (100% cpu after some time, it might be related to a known bug on NIO's Selector, although it looks like changing the connector to old io SocketConnector didn't solve the problem!), and need to take a thread dump. Unfortunately I'm unable to get the thread dump. I've tried to send a SIGQUIT to the

错误整理:No plugin found for prefix &apos;jetty&apos; in the....

纵然是瞬间 提交于 2019-12-10 04:59:20
在maven进行jetty的调试中出现错误: [plain] view plain copy print ? [ERROR] No plugin found for prefix 'jetty' in the current project and in the plu gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo sitories [local (C:\Documents and Settings\Administrator\.m2\repository), centra l (http://repo.maven.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit 详情如下: [plain] view plain copy print ? C:\myjava\workspace>mvn jetty:run [INFO] Scanning for projects... [WARNING] Failed to retrieve plugin descriptor for org

Jetty - java.lang.IllegalStateException: zip file closed

对着背影说爱祢 提交于 2019-12-10 03:42:02
问题 I'm getting some error with some connection to our web server. I saw that a bug causing this was solved in Jetty 7.6. Yes we get this error on our application running under Jetty 7.5.4 but we also get this with another apps running on a newer version 9. Do you have any idea what this can be? We are getting this error randomly: java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632) at java.util.zip.ZipFile.access$200(ZipFile.java:56) at java.util

Integrating Jetty with RESTEasy

╄→尐↘猪︶ㄣ 提交于 2019-12-10 03:19:02
问题 Any links on how to integrate Jetty and RESTEasy? I am kinda stuck trying to configure RESTEasy with Jetty together....and there seems to be no credible help on the web. public static void main(String[] args) throws Exception { Server server = new Server(8080); WebAppContext context = new WebAppContext(); context.setDescriptor("../WEB-INF/web.xml"); context.setResourceBase("../src/webapp"); context.setContextPath("/"); context.setParentLoaderPriority(true); server.setHandler(context); server

How to migrate existing Spring project to Spring Boot

孤者浪人 提交于 2019-12-10 01:48:01
问题 I'm trying to migrate existing Spring project to Spring Boot. In project already used Spring Data JPA/Hibernate and simple DAO with JDBC (PostgreSQL used). In few states I found that all that I need to migrate on Spring boot, is: Add necessary dependencies Add entry point @SpringBootApplication profit, that's all. 1) Dependencies: <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring

Classpath issue between jetty-maven-plugin and tomcat-jdbc 8.0.9+ leading to ServiceConfigurationError

喜夏-厌秋 提交于 2019-12-10 01:17:17
问题 I'm working on an app using : jetty-maven-plugin:9.3.2.v20150730 tomcat-jdbc:8.0.8 (which has tomcat-juli as dependency) After trying to upgrade the tomcat-jdbc jar to any version beyond 8.0.9+ I get the following error: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype Looking the changelog between those 2 versions I've found something that looks suspicious: "Add a simple ServiceLoader based discovery mechanism to

Web service using CXF, Jetty and Spring

南笙酒味 提交于 2019-12-09 23:35:39
问题 I try to create simple web service with CXF, Jetty and Spring. I create service interface @WebService public interface AnonymousService { @WebMethod public String getVersion(); } and its implementation @Service("anonymousService") @WebService( serviceName = "AnonymousService", targetNamespace = "http://ws.test/", endpointInterface = "test.ws.AnonymousService" ) public class AnonymousServiceImpl { public String getVersion() { return "Version"; } } Next step I add to Spring context