jersey

Glassfish 3.1 - CXF and Jersey Clients Deployed in Same War?

我的未来我决定 提交于 2019-12-11 20:13:06
问题 I am trying to deploy a war to Glassfish 3.1.1 that makes use of a CXF webservice client library and a Jersey webservice client library. In order to get Glassfish to use CXF instead of Metro as the JAX-WS implementation, I am including a glassfish-web.xml file with the following contents: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN' 'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'>

Android Jersey Client com.sun.jersey.api.client.ClientHandlerException

有些话、适合烂在心里 提交于 2019-12-11 19:54:29
问题 I am using jersey client from my android app to connect to a web service. The version of android is 1.6 (api level 4) I have referenced jersey-core-1.12.jar and jersey-client-1.12.jar libs. When I call a request with MediaType.APPLICATION_FORM_URLENCODED (application/x-www-form-urlencoded) I am getting the following exception: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.core.util.MultivaluedMapImpl, and MIME media type,

Issue with concurrent POST requests with Jersey REST and Neo4j environment

倾然丶 夕夏残阳落幕 提交于 2019-12-11 19:34:18
问题 I have Jersery Rest service and i am using Neo4j Embedded Database to serve requests with data. Now when i make concurrent GET requests it works fine. But when i make concurrent POST requests It gives Following Exception : Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.StoreLockerLifecycleAdapter@62f1ca5e' was successfully initialized, but failed to start. Please see attached cause exception. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance

@XmlJavaTypeAdapter doesn't work

点点圈 提交于 2019-12-11 19:22:25
问题 I got the bug http://jira.codehaus.org/browse/JACKSON-288, but it said the bug should have been fixed in the version 1.6.2. I refer to lots of threads, like, Jersey JSON and Date How to convert Date(ActionScript 3) to java.util.Date through a xml? I tried version 1.12, 1.14, 1.17.1, all can't works in my side. @XmlRootElement(name="info") @XmlAccessorType(XmlAccessType.NONE) public class InfoVO { private int infoId; @XmlElement @XmlJavaTypeAdapter(DateAdapter.class) private Date createTime; /

Jersey with tomcat giving 404 error

人走茶凉 提交于 2019-12-11 19:07:45
问题 I am using Jersey with tomacat 6 and eclipse Juno. my file name is HelloWorldService : package com.mkyong.rest; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; @Path("/hello") public class HelloWorldService { @GET @Path("/{param}") public Response getMsg(@PathParam("param") String msg) { String output = "Jersey say : " + msg; return Response.status(200).entity(output).build(); } } Web.xml: <web-app id="WebApp_ID" version="2.4"

Java + Jersey list of entities in input of webservice

廉价感情. 提交于 2019-12-11 19:02:48
问题 I need to receive a list of JSON entity as input to my WS. Here my entity definition: @XmlRootElement public class ContactClass { public String action; public Long userId; public String phone; public String fbId; } here my WS function definition: @PUT @Path("/{userId}/adBook") public String synchAdBookContacts(@PathParam("userId") Long userId, ArrayList<ContactClass> contacts) Removing ArrayList<> It works fine, but I need an array of ContactClass as input. Can you help me please? Thank you!

Spring Web App - CannotLoadBeanClassException caused by Java.lang.ClassNotFoundException

青春壹個敷衍的年華 提交于 2019-12-11 18:31:30
问题 Iv been struggling with this for a while now an I have exhausted all my possible solutions so any help is greatly appreciated. This is a simple web app used to test Springs SimpleJdbcTemplate running on a web app, tho when deployed i get the following error message in the Tomcat Logs 10-Jan-2011 18:12:36 org.springframework.web.context.ContextLoader initWebApplicationContext SEVERE: Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class

Exception when deploying on glassfish: ArrayIndexOutOfBoundsException: 9578

谁说胖子不能爱 提交于 2019-12-11 18:28:22
问题 when I deploy my war file on tomcat it is ok but when I deploy it on glassfish it gives the exception, I searched but found no result how to solve this. java.lang.ArrayIndexOutOfBoundsException: 9578 at org.objectweb.asm.ClassReader.readClass(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:363) at com.sun.enterprise.v3.server

@FormParam case sensitivity in Java Jersey

我怕爱的太早我们不能终老 提交于 2019-12-11 18:23:30
问题 I am using Java with Jersey 1.16. Is the name of a @FormParam parameter case sensitive? Can I somehow force it to be NON case sensitive? (hopefully in some global way). 回答1: You could filter the requests: public class CaseFilter implements ContainerRequestFilter { @Override public ContainerRequest filter(ContainerRequest request) { for (Entry<String, List<String>> entry: request.getFormParameters().entrySet()) { request.getFormParameters().put(entry.getKey().toLowerCase(), entry.getValue());

rest with jersey struts2 spring3 not working

荒凉一梦 提交于 2019-12-11 18:04:37
问题 I am trying to expose webservice using jersey for a struts2 spring3 web application my web.xml <servlet> <servlet-name>Jersey REST Service</servlet-name> <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>com.vxl.appanalytix.service.impl</param-value> </init-param> <init-param> <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name> <param-value>true<