Index: pom.xml =================================================================== --- pom.xml (revision 238581) +++ pom.xml (working copy) @@ -10,7 +10,7 @@ 2.0.8 - 1.7.5 + 2.0.2 - org.codehaus.jackson - jackson-mapper-asl + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + true + + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + true + + + + com.fasterxml.jackson.core + jackson-databind ${jackson.version} true Index: src/test/java/com/googlecode/jsonrpc4j/JsonRpcErrorsTest.java =================================================================== --- src/test/java/com/googlecode/jsonrpc4j/JsonRpcErrorsTest.java (revision 238581) +++ src/test/java/com/googlecode/jsonrpc4j/JsonRpcErrorsTest.java (working copy) @@ -1,15 +1,17 @@ package com.googlecode.jsonrpc4j; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import java.io.ByteArrayOutputStream; -import org.codehaus.jackson.JsonNode; -import org.codehaus.jackson.map.ObjectMapper; import org.junit.Before; import org.junit.Test; import org.springframework.core.io.ClassPathResource; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + /** * For testing the @JsonRpcErrors and @JsonRpcError annotations * @@ -44,7 +46,7 @@ JsonNode error = json.get("error"); assertNotNull(error); - assertEquals(0, error.get("code").getIntValue()); + assertEquals(0, error.get("code").intValue()); } @Test @@ -57,12 +59,12 @@ JsonNode error = json.get("error"); assertNotNull(error); - assertEquals(1234, error.get("code").getIntValue()); - assertEquals(null, error.get("message").getTextValue()); + assertEquals(1234, error.get("code").intValue()); + assertEquals(null, error.get("message").textValue()); assertNotNull(error.get("data")); JsonNode data = error.get("data"); - assertEquals(null, data.get("message").getTextValue()); - assertEquals(TestException.class.getName(), data.get("exceptionTypeName").getTextValue()); + assertEquals(null, data.get("message").textValue()); + assertEquals(TestException.class.getName(), data.get("exceptionTypeName").textValue()); } @Test @@ -75,12 +77,12 @@ JsonNode error = json.get("error"); assertNotNull(error); - assertEquals(-5678, error.get("code").getIntValue()); - assertEquals("The message", error.get("message").getTextValue()); + assertEquals(-5678, error.get("code").intValue()); + assertEquals("The message", error.get("message").textValue()); assertNotNull(error.get("data")); JsonNode data = error.get("data"); - assertEquals("The message", data.get("message").getTextValue()); - assertEquals(TestException.class.getName(), data.get("exceptionTypeName").getTextValue()); + assertEquals("The message", data.get("message").textValue()); + assertEquals(TestException.class.getName(), data.get("exceptionTypeName").textValue()); } @Test @@ -93,12 +95,12 @@ JsonNode error = json.get("error"); assertNotNull(error); - assertEquals(1234, error.get("code").getIntValue()); - assertEquals(testExceptionWithMessage.getMessage(), error.get("message").getTextValue()); + assertEquals(1234, error.get("code").intValue()); + assertEquals(testExceptionWithMessage.getMessage(), error.get("message").textValue()); assertNotNull(error.get("data")); JsonNode data = error.get("data"); - assertEquals(testExceptionWithMessage.getMessage(), data.get("message").getTextValue()); - assertEquals(TestException.class.getName(), data.get("exceptionTypeName").getTextValue()); + assertEquals(testExceptionWithMessage.getMessage(), data.get("message").textValue()); + assertEquals(TestException.class.getName(), data.get("exceptionTypeName").textValue()); } private interface ServiceInterfaceWithoutAnnotation { Index: src/test/java/com/googlecode/jsonrpc4j/JsonRpcServerTest.java =================================================================== --- src/test/java/com/googlecode/jsonrpc4j/JsonRpcServerTest.java (revision 238581) +++ src/test/java/com/googlecode/jsonrpc4j/JsonRpcServerTest.java (working copy) @@ -1,15 +1,16 @@ package com.googlecode.jsonrpc4j; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; import java.io.ByteArrayOutputStream; -import org.codehaus.jackson.JsonNode; -import org.codehaus.jackson.map.ObjectMapper; import org.junit.Before; import org.junit.Test; import org.springframework.core.io.ClassPathResource; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + /** * Tests for JsonRpcServer * @@ -54,7 +55,7 @@ JsonNode json = mapper.readTree(response); // Invalid parameters - assertEquals(-32602, json.get("error").get("code").getIntValue()); + assertEquals(-32602, json.get("error").get("code").intValue()); } @Test @@ -64,7 +65,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("success", json.get("result").getTextValue()); + assertEquals("success", json.get("result").textValue()); } @Test @@ -75,7 +76,7 @@ JsonNode json = mapper.readTree(response); // Invalid parameters - assertEquals(-32602, json.get("error").get("code").getIntValue()); + assertEquals(-32602, json.get("error").get("code").intValue()); } @Test @@ -87,7 +88,7 @@ JsonNode json = mapper.readTree(response); // Invalid parameters - assertEquals("success", json.get("result").getTextValue()); + assertEquals("success", json.get("result").textValue()); } @Test @@ -98,7 +99,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("success", json.get("result").getTextValue()); + assertEquals("success", json.get("result").textValue()); } @Test @@ -109,7 +110,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("success", json.get("result").getTextValue()); + assertEquals("success", json.get("result").textValue()); } @Test @@ -119,7 +120,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("noParam", json.get("result").getTextValue()); + assertEquals("noParam", json.get("result").textValue()); } @Test @@ -129,7 +130,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1", json.get("result").getTextValue()); + assertEquals("stringParam1", json.get("result").textValue()); } @Test @@ -139,7 +140,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("intParam1", json.get("result").getTextValue()); + assertEquals("intParam1", json.get("result").textValue()); } @Test @@ -149,7 +150,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1, stringParam2", json.get("result").getTextValue()); + assertEquals("stringParam1, stringParam2", json.get("result").textValue()); } @Test @@ -159,7 +160,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("intParam1, intParam2", json.get("result").getTextValue()); + assertEquals("intParam1, intParam2", json.get("result").textValue()); } @Test @@ -170,7 +171,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1, stringParam2", json.get("result").getTextValue()); + assertEquals("stringParam1, stringParam2", json.get("result").textValue()); } @Test @@ -181,7 +182,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1, stringParam2", json.get("result").getTextValue()); + assertEquals("stringParam1, stringParam2", json.get("result").textValue()); } @@ -198,7 +199,7 @@ JsonNode json = mapper.readTree(response); // Invalid parameters - assertEquals(-32602, json.get("error").get("code").getIntValue()); + assertEquals(-32602, json.get("error").get("code").intValue()); } @Test @@ -208,7 +209,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("success", json.get("result").getTextValue()); + assertEquals("success", json.get("result").textValue()); } @Test @@ -219,7 +220,7 @@ JsonNode json = mapper.readTree(response); // Method not found - assertEquals(-32602, json.get("error").get("code").getIntValue()); + assertEquals(-32602, json.get("error").get("code").intValue()); } @Test @@ -231,7 +232,7 @@ JsonNode json = mapper.readTree(response); // Invalid parameters - assertEquals(-32602, json.get("error").get("code").getIntValue()); + assertEquals(-32602, json.get("error").get("code").intValue()); } @Test @@ -242,7 +243,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("success", json.get("result").getTextValue()); + assertEquals("success", json.get("result").textValue()); } @Test @@ -253,7 +254,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("success", json.get("result").getTextValue()); + assertEquals("success", json.get("result").textValue()); } @Test @@ -263,7 +264,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("noParam", json.get("result").getTextValue()); + assertEquals("noParam", json.get("result").textValue()); } @Test @@ -273,7 +274,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1", json.get("result").getTextValue()); + assertEquals("stringParam1", json.get("result").textValue()); } @Test @@ -283,7 +284,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("intParam1", json.get("result").getTextValue()); + assertEquals("intParam1", json.get("result").textValue()); } @Test @@ -293,7 +294,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1, stringParam2", json.get("result").getTextValue()); + assertEquals("stringParam1, stringParam2", json.get("result").textValue()); } @Test @@ -303,7 +304,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("intParam1, intParam2", json.get("result").getTextValue()); + assertEquals("intParam1, intParam2", json.get("result").textValue()); } @Test @@ -314,7 +315,7 @@ JsonNode json = mapper.readTree(response); // Invalid parameters - assertEquals(-32602, json.get("error").get("code").getIntValue()); + assertEquals(-32602, json.get("error").get("code").intValue()); } @Test @@ -325,7 +326,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1, stringParam2", json.get("result").getTextValue()); + assertEquals("stringParam1, stringParam2", json.get("result").textValue()); } @Test @@ -336,7 +337,7 @@ JsonNode json = mapper.readTree(response); // Invalid parameters - assertEquals(-32602, json.get("error").get("code").getIntValue()); + assertEquals(-32602, json.get("error").get("code").intValue()); } @Test @@ -347,7 +348,7 @@ String response = baos.toString(JSON_ENCODING); JsonNode json = mapper.readTree(response); - assertEquals("stringParam1, null", json.get("result").getTextValue()); + assertEquals("stringParam1, null", json.get("result").textValue()); } Index: src/test/java/com/googlecode/jsonrpc4j/JsonRpcClientTest.java =================================================================== --- src/test/java/com/googlecode/jsonrpc4j/JsonRpcClientTest.java (revision 238581) +++ src/test/java/com/googlecode/jsonrpc4j/JsonRpcClientTest.java (working copy) @@ -1,18 +1,21 @@ package com.googlecode.jsonrpc4j; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.codehaus.jackson.JsonNode; -import org.codehaus.jackson.JsonProcessingException; import org.junit.After; import org.junit.Before; import org.junit.Test; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; + public class JsonRpcClientTest { private ByteArrayOutputStream baos; @@ -56,8 +59,8 @@ assertTrue(node.has("params")); assertTrue(node.get("params").isArray()); - assertEquals(1, node.get("params").get(0).getIntValue()); - assertEquals(2, node.get("params").get(1).getIntValue()); + assertEquals(1, node.get("params").get(0).intValue()); + assertEquals(2, node.get("params").get(1).intValue()); } @Test @@ -71,8 +74,8 @@ assertTrue(node.has("params")); assertTrue(node.get("params").isObject()); - assertEquals("Guvna", node.get("params").get("hello").getTextValue()); - assertEquals(1, node.get("params").get("x").getIntValue()); + assertEquals("Guvna", node.get("params").get("hello").textValue()); + assertEquals(1, node.get("params").get("x").intValue()); } } Index: src/main/java/com/googlecode/jsonrpc4j/JsonRpcServer.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/JsonRpcServer.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/JsonRpcServer.java (working copy) @@ -24,13 +24,14 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.codehaus.jackson.JsonNode; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.type.TypeFactory; -import org.codehaus.jackson.node.ArrayNode; -import org.codehaus.jackson.node.NullNode; -import org.codehaus.jackson.node.ObjectNode; - +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.NullNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.type.TypeFactory; import com.googlecode.jsonrpc4j.ErrorResolver.JsonError; /** @@ -314,9 +315,9 @@ JsonNode paramsNode = node.get("params"); // get node values - String jsonRpc = (jsonPrcNode!=null && !jsonPrcNode.isNull()) ? jsonPrcNode.getValueAsText() : "2.0"; - String methodName = (methodNode!=null && !methodNode.isNull()) ? methodNode.getValueAsText() : null; - String id = (idNode!=null && !idNode.isNull()) ? idNode.getValueAsText() : null; + String jsonRpc = (jsonPrcNode!=null && !jsonPrcNode.isNull()) ? jsonPrcNode.asText() : "2.0"; + String methodName = (methodNode!=null && !methodNode.isNull()) ? methodNode.asText() : null; + String id = (idNode!=null && !idNode.isNull()) ? idNode.asText() : null; // find methods Set methods = new HashSet(); @@ -429,9 +430,11 @@ // convert the parameters Object[] convertedParams = new Object[params.size()]; Type[] parameterTypes = m.getGenericParameterTypes(); + for (int i=0; i fieldNames = new HashSet(); - Iterator itr=paramsNode.getFieldNames(); + Iterator itr=paramsNode.fieldNames(); while (itr.hasNext()) { fieldNames.add(itr.next()); } Index: src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java (working copy) @@ -10,10 +10,12 @@ import java.util.logging.Level; import java.util.logging.Logger; -import org.codehaus.jackson.JsonNode; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.type.TypeFactory; -import org.codehaus.jackson.node.ObjectNode; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.type.TypeFactory; /** * A JSON-RPC client. @@ -273,8 +275,11 @@ "Server returned result but returnType is null"); return null; } - return mapper.readValue( - jsonObject.get("result"), TypeFactory.type(returnType)); + + JsonParser returnJsonParser = mapper.treeAsTokens(jsonObject.get("result")); + JavaType returnJavaType = TypeFactory.defaultInstance().constructType(returnType); + + return mapper.readValue(returnJsonParser, returnJavaType); } // no return type Index: src/main/java/com/googlecode/jsonrpc4j/JsonRpcHttpClient.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/JsonRpcHttpClient.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/JsonRpcHttpClient.java (working copy) @@ -10,7 +10,7 @@ import java.util.Map; import java.util.Map.Entry; -import org.codehaus.jackson.map.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectMapper; /** * A JSON-RPC client that uses the HTTP protocol. Index: src/main/java/com/googlecode/jsonrpc4j/AnnotationsErrorResolver.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/AnnotationsErrorResolver.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/AnnotationsErrorResolver.java (working copy) @@ -3,8 +3,7 @@ import java.lang.reflect.Method; import java.util.List; -import org.codehaus.jackson.JsonNode; - +import com.fasterxml.jackson.databind.JsonNode; import com.googlecode.jsonrpc4j.DefaultErrorResolver.ErrorData; /** Index: src/main/java/com/googlecode/jsonrpc4j/MultipleErrorResolver.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/MultipleErrorResolver.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/MultipleErrorResolver.java (working copy) @@ -4,7 +4,7 @@ import java.util.LinkedList; import java.util.List; -import org.codehaus.jackson.JsonNode; +import com.fasterxml.jackson.databind.JsonNode; /** * {@link ErrorResolver} that supports the use Index: src/main/java/com/googlecode/jsonrpc4j/JsonRpcClientException.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/JsonRpcClientException.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/JsonRpcClientException.java (working copy) @@ -1,6 +1,6 @@ package com.googlecode.jsonrpc4j; -import org.codehaus.jackson.JsonNode; +import com.fasterxml.jackson.databind.JsonNode; /** * Unchecked Exception thrown by a JSON-RPC client when Index: src/main/java/com/googlecode/jsonrpc4j/DefaultErrorResolver.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/DefaultErrorResolver.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/DefaultErrorResolver.java (working copy) @@ -3,7 +3,7 @@ import java.lang.reflect.Method; import java.util.List; -import org.codehaus.jackson.JsonNode; +import com.fasterxml.jackson.databind.JsonNode; /** * An {@link ErrorResolver} that puts type information into the Index: src/main/java/com/googlecode/jsonrpc4j/ExceptionResolver.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/ExceptionResolver.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/ExceptionResolver.java (working copy) @@ -1,6 +1,6 @@ package com.googlecode.jsonrpc4j; -import org.codehaus.jackson.node.ObjectNode; +import com.fasterxml.jackson.databind.node.ObjectNode; /** * Resolves client {@link Throwable}s from server Index: src/main/java/com/googlecode/jsonrpc4j/spring/AbstractJsonServiceExporter.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/spring/AbstractJsonServiceExporter.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/spring/AbstractJsonServiceExporter.java (working copy) @@ -1,12 +1,12 @@ package com.googlecode.jsonrpc4j.spring; -import org.codehaus.jackson.map.ObjectMapper; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.remoting.support.RemoteExporter; +import com.fasterxml.jackson.databind.ObjectMapper; import com.googlecode.jsonrpc4j.ErrorResolver; import com.googlecode.jsonrpc4j.JsonRpcServer; @@ -43,7 +43,7 @@ /** * {@inheritDoc} */ - public final void afterPropertiesSet() + public void afterPropertiesSet() throws Exception { // find the ObjectMapper Index: src/main/java/com/googlecode/jsonrpc4j/spring/AbstractCompositeJsonServiceExporter.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/spring/AbstractCompositeJsonServiceExporter.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/spring/AbstractCompositeJsonServiceExporter.java (working copy) @@ -1,11 +1,11 @@ package com.googlecode.jsonrpc4j.spring; -import org.codehaus.jackson.map.ObjectMapper; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; +import com.fasterxml.jackson.databind.ObjectMapper; import com.googlecode.jsonrpc4j.ErrorResolver; import com.googlecode.jsonrpc4j.JsonRpcServer; import com.googlecode.jsonrpc4j.ProxyUtil; Index: src/main/java/com/googlecode/jsonrpc4j/spring/JsonProxyFactoryBean.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/spring/JsonProxyFactoryBean.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/spring/JsonProxyFactoryBean.java (working copy) @@ -8,7 +8,6 @@ import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; -import org.codehaus.jackson.map.ObjectMapper; import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.FactoryBean; @@ -17,8 +16,9 @@ import org.springframework.context.ApplicationContextAware; import org.springframework.remoting.support.UrlBasedRemoteAccessor; -import com.googlecode.jsonrpc4j.JsonRpcHttpClient; +import com.fasterxml.jackson.databind.ObjectMapper; import com.googlecode.jsonrpc4j.JsonRpcClient.RequestListener; +import com.googlecode.jsonrpc4j.JsonRpcHttpClient; /** * {@link FactoryBean} for creating a {@link UrlBasedRemoteAccessor} Index: src/main/java/com/googlecode/jsonrpc4j/MultipleExceptionResolver.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/MultipleExceptionResolver.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/MultipleExceptionResolver.java (working copy) @@ -3,7 +3,7 @@ import java.util.LinkedList; import java.util.List; -import org.codehaus.jackson.node.ObjectNode; +import com.fasterxml.jackson.databind.node.ObjectNode; /** * {@link ExceptionResolver} that supports the use Index: src/main/java/com/googlecode/jsonrpc4j/ErrorResolver.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/ErrorResolver.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/ErrorResolver.java (working copy) @@ -3,7 +3,7 @@ import java.lang.reflect.Method; import java.util.List; -import org.codehaus.jackson.JsonNode; +import com.fasterxml.jackson.databind.JsonNode; /** * Resolves {@link Throwable}s thrown by JSON-RPC services. Index: src/main/java/com/googlecode/jsonrpc4j/DefaultExceptionResolver.java =================================================================== --- src/main/java/com/googlecode/jsonrpc4j/DefaultExceptionResolver.java (revision 238581) +++ src/main/java/com/googlecode/jsonrpc4j/DefaultExceptionResolver.java (working copy) @@ -5,7 +5,7 @@ import java.util.logging.Level; import java.util.logging.Logger; -import org.codehaus.jackson.node.ObjectNode; +import com.fasterxml.jackson.databind.node.ObjectNode; /** * Default implementation of the {@link ExceptionResolver} @@ -48,9 +48,9 @@ } // get values - String exceptionTypeName = dataObject.get("exceptionTypeName").getValueAsText(); + String exceptionTypeName = dataObject.get("exceptionTypeName").asText(); String message = dataObject.has("message") && dataObject.get("message").isTextual() - ? dataObject.get("message").getValueAsText() : null; + ? dataObject.get("message").asText() : null; // create it Throwable ret = null; @@ -77,8 +77,8 @@ */ private JsonRpcClientException createJsonRpcClientException(ObjectNode errorObject) { return new JsonRpcClientException( - errorObject.get("code").getValueAsInt(), - errorObject.get("message").getValueAsText(), + errorObject.get("code").asInt(), + errorObject.get("message").asText(), errorObject.get("data")); }