Giter Club home page Giter Club logo

jackson-jaxrs-providers's Introduction

Overview

This is a multi-module project that contains Jackson-based JAX-RS (*) providers for following data formats:

Providers implement JAX-RS MessageBodyReader and MessageBodyWriter handlers for specific data formats. They also contain SPI settings for auto-registration.

(*) NOTE! JAX-RS is the "old" API defined under javax.ws.rs; in 2019 or so, Oracle decided to force a forking of this into "Jakarta" variant under jakarta.ws.ws. As of 2021 most frameworks still use the old API but if you do need/want to use newer one, check out Jakarta-RS provider repo at jackson-jakarta-rs-providers

Status

Build Status Maven Central Javadoc Tidelift

Maven dependency

To use JAX-RS on Maven-based projects, use dependencies like:

<dependency>
  <groupId>com.fasterxml.jackson.jaxrs</groupId>
  <artifactId>jackson-jaxrs-json-provider</artifactId>
  <version>2.15.0</version>
</dependency>

(above is for JSON provider; modify appropriately for other providers)

Usage: registering providers

Due to auto-registration, it should be possible to simply add Maven dependency (or include jar if using other build systems) and let JAX-RS implementation discover provider. If this does not work you need to consult documentation of the JAX-RS implementation for details.

Here are some links that may help:

Usage: registering supporting datatypes module

Starting with Jackson 2.8, there is a small supporting datatype module, jackson-datatype-jaxrs (see under datatypes/). It will not be auto-registered automatically (unless user calls ObjectMapper.findAndRegisterModules()); instead, user has to register it by normal means:

ObjectMapper mapper = JsonMapper.builder() // or whichever format backend we have
    .addModule(new Jaxrs2TypesModule())
    .build();
// and then register mapper with JAX-RS provider(s)

and ensuring that configured mapper is used by JAX-RS providers.

It is possible that later versions of providers may offer additional ways to get datatype module registered.

Annotations on resources

In addition to annotation value classes, it is also possible to use a subset of Jackson annotations with provider.

Here is a short list of supported annotations that work with all formats:

  • @JsonView can be used to define active view for specific endpoint
  • @JsonRootName can be used to specify alternate rootname; most often used with XML, but possibly with JSON as well.
  • @JacksonAnnotationsInside meta-annotation may be used as a marker, to create "annotation bundles", similar to how they are used with value type annotations
  • com.fasterxml.jackson.jaxrs.annotation.JacksonFeatures can be used with all provid to enable/disable
    • SerializationFeature / DeserializationFeature for data-binding configuration
    • JsonParser.Feature / JsonGenerator.Feature for low(er) level Streaming read/write options

In addition there are format-specific annotations that may be used:

  • JSON has:
    • com.fasterxml.jackson.jaxrs.json.annotation.JSONP to define JSONP wrapping for serialized result

Module Considerations

The JSON/JAX-RS module has multiple names depending on the version in use. To enable modular usage, add the requires statement that pertains directly to the implementation you are using.

requires  javax.ws.rs.api; //Older libraries
requires  jakarta.ws.rs; //Newer libraries

Using Jakarta

Starting with Jackson 2.13, there is a fully separate set of providers for "Jakarta-RS", see: jackson-jakarta-rs-providers. They would be instead included with:

<dependency>
    <groupId>com.fasterxml.jackson.jakarta.rs</groupId>
    <artifactId>jackson-jakarta-rs-json-provider</artifactId>
</dependency>

NOTE! Jackson 2.12 has (just for that version), jakarta classifier variant of JAXB providers included here.

You may be able to use these variants by using dependency like:

<dependency>
    <groupId>com.fasterxml.jackson.jaxrs</groupId>
    <artifactId>jackson-jaxrs-json</artifactId>
    <version>2.12.6</version>
    <classifier>jakarta</classifier>
</dependency>

but this mechanism was removed from later versions.

Support

Community support

Jackson components are supported by the Jackson community through mailing lists, Gitter forum, Github issues. See Participation, Contributing for full details.

Enterprise support

Available as part of the Tidelift Subscription.

The maintainers of jackson-jaxrs-providers and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.


Other

For documentation, downloads links, check out Wiki

jackson-jaxrs-providers's People

Contributors

andrewluotechnologies avatar arianacai1997 avatar chenzhangg avatar cowtowncoder avatar cschneider avatar fenixcitizen avatar gedmarc avatar hildoye avatar jamezp avatar jhaber avatar joohyukkim avatar kdubb avatar kleinsch avatar larivact avatar larsp avatar mcculls avatar mtyurt avatar nanaokada avatar nicones avatar pjfanning avatar prb avatar rsprit avatar seanzhou1023 avatar spikhalskiy avatar splatch avatar stevenschlansker avatar tatu-at-salesforce avatar timothyjward avatar valery1707 avatar yeikel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jackson-jaxrs-providers's Issues

Support JAX-RS 2.0 in OSGi environment

Hi,

tested with version 2.3.0 of Jackson-JAXRS-JSON:

The Import-Package statements in the manifest expect javax.ws.rs.* with version [1.1.1,1.2) to be available. So version >= 2.0 does not work. Is it not supported? If I manually change the dependency it does work without any problems with Jersey 2 in my application.

Support `@JsonSerialize` for JAX-RS endpoints

Some Jackson annotations are already supported for JAX-RS endpoints (methods), but not all.

One that is not yet supported is @JsonSerialize. It might be easy enough to add support, since it would be known to affect handling of the return type.

Custom JSON object mapper for Dates (or other classes)

I have been looking for a way to serialize/deserialize my dates in my REST endpoints using simple UNIX EPOCH timestamps (default is timestamp in milliseconds: completely redundant!).

I could not find any example of how to do this with the JAX-RS providers but I found an SO which contains a (quite verbose) working example. As noted in the comment, the example leads to having two different providers at runtime: one 'discovered' by Jersey and the other one explicitly created.

I'd like to avoid this duplication as I'm sure it will lead to hard-to-fix bugs but I can't figure out how. Is there a way to do so? Thanks!

ContextResolver's don't work for ObjectMapper

readFrom() and writeTo() get their readers and writers from JsonEndpointConfig. The problem is that this JsonEndpointConfig is keyed based on the annotation set (which is usually empty), and not the type....So, it is impossible to have different ObjectMapper's per Java type using a ContextResolver.

support application/x-jackson-smile

Using Apache CXF we'd like a single endpoint to support application/x-jackson-smile and application/json (for backward compatibility). Cannot distinguish the JacksonJsonProvider using the smile object mapper, from the JacksonJsonProvider using the default json object mapper.

<bean id="jsonServerObjectMapper" class="org.codehaus.jackson.map.ObjectMapper" />
<bean id="smileServerObjectMapper" class="org.codehaus.jackson.map.ObjectMapper">
  <constructor-arg>
    <ref bean="smileFactory" />
  </constructor-arg>
</bean>

<bean id="jsonServerRestProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider">
  <constructor-arg>
    <ref bean="jsonServerObjectMapper"/>
  </constructor-arg>
</bean>
<bean id="smileServerRestProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider">
  <constructor-arg>
    <ref bean="smileServerObjectMapper"/>
  </constructor-arg>
</bean>

Integration with RESTeasy broken with 2.3

Looks like changes made in ProviderBase for 2.3 broke integration by RESTeasy, by removing call used by its jackson-based provider:

https://github.com/resteasy/Resteasy/blob/e30b28d6cdd2cdfaaa90e94c471ae88d6b813bbe/jaxrs/providers/jackson2/src/main/java/org/jboss/resteasy/plugins/providers/jackson/ResteasyJackson2Provider.java#L107

as reported by @tbroyer.

Beyond fixing the immediate issue, it would be great if we could figure out a way to add tests for downstream dependencies, simple sanity checks to at least ensure that up-to-date versions compile with new Jackson JAX-RS provider implementations (and better yet, work to some degree). Something like this actually works with Jersey, since there are small tests we use for integration tests.

json provider considers InputStream writable

The json provider tries to convert an inputstream to json.
Depending on the subclass this fails, or worse actually returns a json serialization of the inputstream object.

InputStream is an untouchable, but untouchables are only matched exactly instead of via isAssignableFrom().
As the IO untouchables are abstract this is likely a bug.

unwritableClasses are checked with isAssignableFrom(), but InputStream is not part of the default unwritableClasses.

@XmlElement type and @XmlJavaTypeAdapter annotations

Hi.

On one of my classes I got this annotation for JAXB:

@XmlElement(required = true, type = String.class, nillable = true)
public CustomObject getName()

in the package-info.java I defined an adapter to convert string to CustomObject and CustomObject to string

@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters({
  @javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(type = CustomObject.class, value = CustomObjectAdapter.class)
})

When i tried to get JSON string from object using:

objectMapper.writeValueAsString(myObject);

I get an exception:

Caused by: java.lang.IllegalArgumentException: Illegal concrete-type annotation for method 'getName': class 
java.lang.String not a super-type of (declared) class com.copmany.CustomObject

Full stack trace:

com.fasterxml.jackson.databind.JsonMappingException: Illegal concrete-type annotation for method 'getName': class java.lang.String not a super-type of (declared) class com.copmany.CustomObject
        at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1042)
        at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:445)
        at com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:599)
        at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:93)
        at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2811)
        at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2268)
        at com.copmany.EntryPoint.getString(EntryPoint.java:217)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:102)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:163)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:681)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1452)
        at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:248)
        at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:211)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1423)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:450)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:540)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1083)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:379)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1017)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:258)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:317)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:445)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:260)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:225)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
        at java.lang.Thread.run(Thread.java:780)
Caused by: java.lang.IllegalArgumentException: Illegal concrete-type annotation for method 'getName': class java.lang.String not a super-type of (declared) class com.copmany.CustomObject
        at com.fasterxml.jackson.databind.ser.PropertyBuilder.findSerializationType(PropertyBuilder.java:187)
        at com.fasterxml.jackson.databind.ser.PropertyBuilder.buildWriter(PropertyBuilder.java:80)
        at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._constructWriter(BeanSerializerFactory.java:758)
        at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:590)
        at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.constructBeanSerializer(BeanSerializerFactory.java:377)
        at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.findBeanSerializer(BeanSerializerFactory.java:272)
        at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:217)
        at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:152)
        at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1077)
        at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1037)
        ... 53 more

JsonView for reading

It looks like EndpointConfigBase.initReader intends for JsonView to be usable for parameters (for example, post POJO). This would allow a developer to use JsonView for deserializing as well as serializing. However, the JsonView annotation is not applicable to parameters (only methods and fields). I guess we need JsonViewParam (in the vein of QueryParam, PathParam)?

Let me know your thoughts. I can implement this if you think this makes sense.

Add CSV provider

Need to figure out how to configure aspects like whether first line is to be taken as schema. But otherwise should be relatively easy.

JacksonJsonProvider MessageBodyReader 'readFrom' returns null

(note: moved from https://github.com/FasterXML/jackson-jaxrs-json-provider/issues/27)


The readFrom() method in ProviderBase returns null when it encounters an empty stream. According to both the javadoc for MessageBodyReader, and JSR311, this is not allowed.

http://download.oracle.com/otndocs/jcp/jaxrs-1.1-mrel-eval-oth-JSpec/

In section 4.2.4:

When reading zero-length request entities, all implementation-supplied
MessageBodyReader implementations except the JAXB-related one MUST create a
corresponding Java object that represents zero-length data; they MUST NOT return
null. The implementation-supplied JAXB MessageBodyReader implementation MUST
throw a WebApplicationException with a client error response (HTTP 400) for zero-
length request entities.

And if creating an object representing the zero-length entity is impossible, the MessageBodyReader javadoc specifies that:

In case the entity input stream is empty, the reader
is expected to either return an instance representing a zero-length entity or throw
a {@link javax.ws.rs.core.NoContentException} in case no zero-length entity representation is
defined for the supported Java type.

Offending code in question on line 750:
ObjectReader reader = endpoint.getReader();
JsonParser jp = _createParser(reader, entityStream);

    // If null is returned, considered to be empty stream
    if (jp == null || jp.nextToken() == null) {
        return null;
    }

Ensure that XML module uses registered `XmlMapper` (not just `ObjectMapper`)

One possible problem with different backend format JAX-RS providers is that one can only register a single ObjectMapper via JAX-RS. By default it is reasonable to assume that it is probably right for formats other than JSON.

There are two basic approaches to resolve this problem:

  1. For formats that require custom ObjectMapper, such as XML (which requires XmlMapper), look up that mapper instead of default one.
  2. For formats that may use default ObjectMapper, verify that the backend format (as identified by ObjectMapper.getFactory()), and if not matching, construct a variation with proper factory instance.

Obviously additional tests are needed, both to verify default behavior, as well as ability to (re)configure mappers.

MessageBodyReader & Writer in META-INF/service issues...

Hi, I've recently ran into a problem trying to use ackson-jaxrs-json-provider 2.3.0 with Jersey 2.4.1. The problem has to do with the automatic scanning that Jersey does of META-INF/services which can't be disabled otherwise CDI stops functioning.

The problem is that if I want to create a custom ContextResolver (to configure some global Jackson options) that context resolver, and consequently the corresponding object mapper is completly ignored unless I remove the META-INF/services folder.

The issue came up a while ago in Jersey's list (see this post). I'm far from an expert but is it absolutely necessary to include these? can (as per the sugestion in the mentioned post) these two files (MessageBodyReader and MessageBodyWriter) be included in a seperate jar?

Support `@JsonFilter` for end points

Now that @JsonFilter annotation is applicable to properties (not just classes), it would make sense to allow its use for JAX-RS endpoints as well.

Add an option to append a linefeed after serialization

A user requested ability to add linefeed after serialized JSON Object; mostly to make it easier to see response via curl. This seems easy enough with a togglable feature.

One possible complications is that of linefeed to use (\r vs \n vs \r\n) -- using server's native linefeed may or may not make sense.

JacksonJsonProvider supports JSONP, but disallows application/javascript content type

(moved from https://github.com/FasterXML/jackson-jaxrs-xml-provider/issues/6)


For regular JSON responses one should use the application/json content type, but for JSONP application/javascript is generally preferred/recommended. Unfortunately JacksonJsonProvider#hasMatchingMediaType(MediaType) explicitly disallows the latter.

Since JacksonJsonProvider otherwise supports JSONP just fine, I'd like to ask for application/javascript support to be added.

2.4.x pom brings in wrong annotations jar

It appears as if the jackson-jaxrs-providers pom pulls in the wrong jackson annotations jar. Take a look at the following lines in the pom file:

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
<version.jackson.annotations>2.4.0</version.jackson.annotations>
<!-- core/databind should have same version; data formats, annotations may differ -->
<version.jackson.core>2.4.2</version.jackson.core>

The annotations version should be 2.4.2. When I build I get a few class not found exceptions. However, if I explicitly add the 2.4.2 annotations dependency everything seems to work fine.

Allow defining object to update via provider

(moved from [https://jira.codehaus.org/browse/JACKSON-681])

So, basically it might be useful to allow provider to specify Object instance to update, instead of creating a new one.
At first this can be as simple as just adding an overridable method for custom implementations.
And if we have better ideas, add more sophisticated configuration/handlers.

Strings are not written as-is ("untouchable"), but passed to JSON serializer adding quotes

(note: migrated from FasterXML/jackson-databind#342)


Looks like handling of java.lang.String for serialization is somehow not taking into account the "ontouchables" list, and is outputting JSON Strings, instead of raw content.

This was reported against 2.2, and verified with 2.3.0-rc1 as well. Submitter made clear that correct versions should be used, so hopefully this is not just a classpath/-loading issue.

A unit test needs to be added to ensure proper handling; same should be done for byte[].

EndpointAsBeanProperty -- logic bug?

Maybe I'm not thinking straight today, or maybe this class never gets used, but offhand the code below from com.fasterxml.jackson.jaxrs.util.EndpointAsBeanProperty looks as though the boolean needs to be inverted:

    boolean hasAnn = (annotations == null || annotations.length == 0);
    if (hasAnn) {
        _annotations = new AnnotationMap();
        for (Annotation a : annotations) {
            _annotations.add(a);
        }
    } else {
        _annotations = NO_ANNOTATIONS;
    }

(No, I wasn't actually trying to use the class, I just happened to read the code; don't ask why)

Support compact serialization of Link, deserialization

serialization of a Link seems too detailed. I realize that I can write a customer serializer, but I think that the default should be simpler like the uri, rel, title and type, and imho only if the values aren't null, certainly the attached uriBuilder should not have been included in the json output.

"link":{"uri":"http://127.0.0.1:8080/NornLM/activities/d1039a2c-e939-4f84-a790-9d8304fe62d2","uriBuilder":{"host":"127.0.0.1","scheme":"http","port":8080,"userInfo":null,"path":"/NornLM/activities/d1039a2c-e939-4f84-a790-9d8304fe62d2","query":null,"fragment":null,"pathParamNamesInDeclarationOrder":[]},"rel":"item","rels":["item"],"title":null,"params":{"rel":"item"},"type":null}

migrated from jackson-core#135

Unable to integrate with CDI due to no no-args constructor in ProviderBase class

HI, I was trying to in integrate the JacksonJaxbJsonProvider with RestEasy and CDI and the following exception was found because the ProviderBase class does not provide a no-arg constructor. This was working on the 2.1.4 release:

at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class com.fasterxml.jackson.jaxrs.base.ProviderBase is not proxyable because it has no no-args constructor - Managed Bean [class org.example.rest.service.ResteasyJackson2JaxbProvider] with qualifiers [@Any @default].
at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:214)
at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:184)
at org.jboss.weld.util.Proxies.getUnproxyableTypesExceptionInt(Proxies.java:195)
at org.jboss.weld.util.Proxies.getUnproxyableTypesException(Proxies.java:169)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:147)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:380)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
... 5 more

jackson-dataformat-xml 2.4.1 (ex 2.2.2) tests failure

hi,
have this problem, any ideas?
thanks
regards

org.codehaus.woodstox:woodstox-core-asl 4.2.0
java version "1.7.0_25"
OpenJDK Runtime Environment (fedora-2.3.10.4.fc19-i386)
OpenJDK Server VM (build 23.7-b01, mixed mode)
T E S T S

Running com.fasterxml.jackson.dataformat.xml.TestComplex
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.225 sec - in com.fasterxml.jackson.dataformat.xml.TestComplex
Running com.fasterxml.jackson.dataformat.xml.adapters.TestIssue47Attribute
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in com.fasterxml.jackson.dataformat.xml.adapters.TestIssue47Attribute
Running com.fasterxml.jackson.dataformat.xml.TestNamespaces
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.fasterxml.jackson.dataformat.xml.TestNamespaces
Running com.fasterxml.jackson.dataformat.xml.TestBinaryData
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in com.fasterxml.jackson.dataformat.xml.TestBinaryData
Running com.fasterxml.jackson.dataformat.xml.TestIndentation
Tests run: 4, Failures: 1, Errors: 3, Skipped: 0, Time elapsed: 0.021 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestIndentation
testSimpleStringBean(com.fasterxml.jackson.dataformat.xml.TestIndentation) Time elapsed: 0.008 sec <<< ERROR!
com.fasterxml.jackson.core.JsonGenerationException: Underlying Stax XMLStreamWriter (of type com.sun.xml.internal.stream.writers.XMLStreamWriterImpl) does not implement Stax2 API natively and is missing method 'writeRaw': this breaks functionality such as indentation that relies on it. You need to upgrade to using compliant Stax implementation like Woodstox or Aalto
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator._reportUnimplementedStax2(ToXmlGenerator.java:1025)
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeRaw(ToXmlGenerator.java:550)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter$Lf2SpacesIndenter.writeIndentation(DefaultXmlPrettyPrinter.java:483)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.writeStartObject(DefaultXmlPrettyPrinter.java:184)
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeStartObject(ToXmlGenerator.java:395)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:138)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:569)
at com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer.serializeFields(XmlBeanSerializer.java:158)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:142)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:118)
at com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider.serializeValue(XmlSerializerProvider.java:67)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2718)
at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2210)
at com.fasterxml.jackson.dataformat.xml.TestIndentation.testSimpleStringBean(TestIndentation.java:69)
testSimpleMap(com.fasterxml.jackson.dataformat.xml.TestIndentation) Time elapsed: 0.008 sec <<< ERROR!
com.fasterxml.jackson.databind.JsonMappingException: Not implemented (through reference chain: java.util.HashMap["a"])
at org.codehaus.stax2.ri.Stax2WriterAdapter.writeRaw(Stax2WriterAdapter.java:380)
at org.codehaus.stax2.ri.Stax2WriterAdapter.writeRaw(Stax2WriterAdapter.java:373)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter$Lf2SpacesIndenter.writeIndentation(DefaultXmlPrettyPrinter.java:470)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.writeLeafElement(DefaultXmlPrettyPrinter.java:254)
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeString(ToXmlGenerator.java:478)
at com.fasterxml.jackson.databind.ser.std.StringSerializer.serialize(StringSerializer.java:39)
at com.fasterxml.jackson.databind.ser.std.StringSerializer.serialize(StringSerializer.java:21)
at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:394)
at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:315)
at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:27)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:118)
at com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider.serializeValue(XmlSerializerProvider.java:67)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2718)
at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2210)
at com.fasterxml.jackson.dataformat.xml.TestIndentation.testSimpleMap(TestIndentation.java:98)
testWithAttr(com.fasterxml.jackson.dataformat.xml.TestIndentation) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<> but was:<>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestIndentation.testWithAttr(TestIndentation.java:116)
testSimpleIntBean(com.fasterxml.jackson.dataformat.xml.TestIndentation) Time elapsed: 0.003 sec <<< ERROR!
com.fasterxml.jackson.core.JsonGenerationException: Underlying Stax XMLStreamWriter (of type com.sun.xml.internal.stream.writers.XMLStreamWriterImpl) does not implement Stax2 API natively and is missing method 'writeRaw': this breaks functionality such as indentation that relies on it. You need to upgrade to using compliant Stax implementation like Woodstox or Aalto
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator._reportUnimplementedStax2(ToXmlGenerator.java:1025)
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeRaw(ToXmlGenerator.java:550)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter$Lf2SpacesIndenter.writeIndentation(DefaultXmlPrettyPrinter.java:483)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.writeStartObject(DefaultXmlPrettyPrinter.java:184)
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeStartObject(ToXmlGenerator.java:395)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:138)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:569)
at com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer.serializeFields(XmlBeanSerializer.java:158)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:142)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:118)
at com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider.serializeValue(XmlSerializerProvider.java:67)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2718)
at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2210)
at com.fasterxml.jackson.dataformat.xml.TestIndentation.testSimpleIntBean(TestIndentation.java:83)
Running com.fasterxml.jackson.dataformat.xml.TestXmlDeclaration
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestXmlDeclaration
testXml10Declaration(com.fasterxml.jackson.dataformat.xml.TestXmlDeclaration) Time elapsed: 0 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<123 but was:<123
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestXmlDeclaration.testXml10Declaration(TestXmlDeclaration.java:19)
testXml11Declaration(com.fasterxml.jackson.dataformat.xml.TestXmlDeclaration) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<abcd</...> but was:<abcd</...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestXmlDeclaration.testXml11Declaration(TestXmlDeclaration.java:27)
Running com.fasterxml.jackson.dataformat.xml.unwrapped.TestListRoundtrip
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.025 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.unwrapped.TestListRoundtrip
testParentListRoundtrip(com.fasterxml.jackson.dataformat.xml.unwrapped.TestListRoundtrip) Time elapsed: 0.011 sec <<< ERROR!
java.io.IOException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,50]
Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributePrefixUnbound?parent&zdef640558045:name&zdef640558045
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
at javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:88)
at org.codehaus.stax2.ri.Stax2ReaderAdapter.next(Stax2ReaderAdapter.java:129)
at com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream._collectUntilTag(XmlTokenStream.java:349)
at com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream._next(XmlTokenStream.java:312)
at com.fasterxml.jackson.dataformat.xml.deser.XmlTokenStream.next(XmlTokenStream.java:162)
at com.fasterxml.jackson.dataformat.xml.deser.FromXmlParser.nextToken(FromXmlParser.java:451)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:117)
at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:109)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2888)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)
at com.fasterxml.jackson.dataformat.xml.unwrapped.TestListRoundtrip.testParentListRoundtrip(TestListRoundtrip.java:109)
Running com.fasterxml.jackson.dataformat.xml.unwrapped.TestListDeserialization
Tests run: 5, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.019 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.unwrapped.TestListDeserialization
testWrappedList(com.fasterxml.jackson.dataformat.xml.unwrapped.TestListDeserialization) Time elapsed: 0.002 sec <<< ERROR!
com.fasterxml.jackson.databind.JsonMappingException: Not implemented (through reference chain: com.fasterxml.jackson.dataformat.xml.unwrapped.Person["name"])
at org.codehaus.stax2.ri.Stax2WriterAdapter.writeRaw(Stax2WriterAdapter.java:380)
at org.codehaus.stax2.ri.Stax2WriterAdapter.writeRaw(Stax2WriterAdapter.java:373)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter$Lf2SpacesIndenter.writeIndentation(DefaultXmlPrettyPrinter.java:470)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.writeLeafElement(DefaultXmlPrettyPrinter.java:254)
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeString(ToXmlGenerator.java:478)
at com.fasterxml.jackson.databind.ser.std.StringSerializer.serialize(StringSerializer.java:39)
at com.fasterxml.jackson.databind.ser.std.StringSerializer.serialize(StringSerializer.java:21)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:569)
at com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer.serializeFields(XmlBeanSerializer.java:158)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:142)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:118)
at com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider.serializeValue(XmlSerializerProvider.java:67)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2718)
at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2210)
at com.fasterxml.jackson.dataformat.xml.unwrapped.TestListDeserialization.testWrappedList(TestListDeserialization.java:93)
testWrappedListWithGetters(com.fasterxml.jackson.dataformat.xml.unwrapped.TestListDeserialization) Time elapsed: 0.004 sec <<< ERROR!
com.fasterxml.jackson.databind.JsonMappingException: Not implemented (through reference chain: com.fasterxml.jackson.dataformat.xml.unwrapped.PersonWithGetters["note"])
at org.codehaus.stax2.ri.Stax2WriterAdapter.writeRaw(Stax2WriterAdapter.java:380)
at org.codehaus.stax2.ri.Stax2WriterAdapter.writeRaw(Stax2WriterAdapter.java:373)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter$Lf2SpacesIndenter.writeIndentation(DefaultXmlPrettyPrinter.java:470)
at com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter.writeStartElement(DefaultXmlPrettyPrinter.java:228)
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.startWrappedValue(ToXmlGenerator.java:297)
at com.fasterxml.jackson.dataformat.xml.ser.XmlBeanPropertyWriter.serializeAsField(XmlBeanPropertyWriter.java:120)
at com.fasterxml.jackson.dataformat.xml.ser.XmlBeanSerializer.serializeFields(XmlBeanSerializer.java:158)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:142)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:118)
at com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider.serializeValue(XmlSerializerProvider.java:67)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2718)
at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2210)
at com.fasterxml.jackson.dataformat.xml.unwrapped.TestListDeserialization.testWrappedListWithGetters(TestListDeserialization.java:108)
Running com.fasterxml.jackson.dataformat.xml.unwrapped.TestListAnnotationSharing
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.unwrapped.TestListAnnotationSharing
testAnnotationSharing(com.fasterxml.jackson.dataformat.xml.unwrapped.TestListAnnotationSharing) Time elapsed: 0.005 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<1...> but was:<1...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.unwrapped.TestListAnnotationSharing.testAnnotationSharing(TestListAnnotationSharing.java:47)
Running com.fasterxml.jackson.dataformat.xml.unwrapped.TestNestedUnwrappedLists
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec - in com.fasterxml.jackson.dataformat.xml.unwrapped.TestNestedUnwrappedLists
Running com.fasterxml.jackson.dataformat.xml.unwrapped.TestIssue43
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in com.fasterxml.jackson.dataformat.xml.unwrapped.TestIssue43
Running com.fasterxml.jackson.dataformat.xml.unwrapped.TestListSerialization
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in com.fasterxml.jackson.dataformat.xml.unwrapped.TestListSerialization
Running com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped
Tests run: 4, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped
testWrappedLists(com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped) Time elapsed: 0.003 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<a</...> but was:<a</...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped.testWrappedLists(TestListsUnwrapped.java:55)
testUnwrappedLists(com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<c but was:<c
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped.testUnwrappedLists(TestListsUnwrapped.java:74)
testDefaultWrapping(com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<a<...> but was:<a<...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.unwrapped.TestListsUnwrapped.testDefaultWrapping(TestListsUnwrapped.java:94)
Running com.fasterxml.jackson.dataformat.xml.TestSerializerCustom
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in com.fasterxml.jackson.dataformat.xml.TestSerializerCustom
Running com.fasterxml.jackson.dataformat.xml.TestXmlParser
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec - in com.fasterxml.jackson.dataformat.xml.TestXmlParser
Running com.fasterxml.jackson.dataformat.xml.TestXmlGenerator
Tests run: 5, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestXmlGenerator
testSimpleAttribute(com.fasterxml.jackson.dataformat.xml.TestXmlGenerator) Time elapsed: 0 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<> but was:<>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestXmlGenerator.testSimpleAttribute(TestXmlGenerator.java:48)
testSecondLevelAttribute(com.fasterxml.jackson.dataformat.xml.TestXmlGenerator) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<> but was:<>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestXmlGenerator.testSecondLevelAttribute(TestXmlGenerator.java:70)
testWriteToFile(com.fasterxml.jackson.dataformat.xml.TestXmlGenerator) Time elapsed: 0.009 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<42 but was:<42
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestXmlGenerator.testWriteToFile(TestXmlGenerator.java:104)
Running com.fasterxml.jackson.dataformat.xml.TestPolymorphic
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestPolymorphic
testAsClassProperty(com.fasterxml.jackson.dataformat.xml.TestPolymorphic) Time elapsed: 0.007 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<...peWithClassProperty []_class="com.fasterxm...> but was:<...peWithClassProperty [xmlns="" ]_class="com.fasterxm...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestPolymorphic.testAsClassProperty(TestPolymorphic.java:76)
Running com.fasterxml.jackson.dataformat.xml.TestJDKSerializability
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestJDKSerializability
testMapper(com.fasterxml.jackson.dataformat.xml.TestJDKSerializability) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<23 but was:<23
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestJDKSerializability.testMapper(TestJDKSerializability.java:57)
testXmlFactory(com.fasterxml.jackson.dataformat.xml.TestJDKSerializability) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected: but was:
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestJDKSerializability.testXmlFactory(TestJDKSerializability.java:40)
Running com.fasterxml.jackson.dataformat.xml.TestSerialization
Tests run: 6, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestSerialization
testSimpleAttribute(com.fasterxml.jackson.dataformat.xml.TestSerialization) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<...ean attr="something"[/]>> but was:<...ean attr="something"[>>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerialization.testSimpleAttribute(TestSerialization.java:136)
testCustomSerializer(com.fasterxml.jackson.dataformat.xml.TestSerialization) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:custom:foo but was:custom:foo
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerialization.testCustomSerializer(TestSerialization.java:186)
testMap(com.fasterxml.jackson.dataformat.xml.TestSerialization) Time elapsed: 0.003 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<12...> but was:<12...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerialization.testMap(TestSerialization.java:165)
testSimpleNsElem(com.fasterxml.jackson.dataformat.xml.TestSerialization) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<<[wstxns1:text xmlns:wstxns1="http://foo">blah> but was:<<[zdef1747338104:text xmlns:zdef1747338104="http://foo">blah>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerialization.testSimpleNsElem(TestSerialization.java:151)
testRootName(com.fasterxml.jackson.dataformat.xml.TestSerialization) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<123<...> but was:<123<...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerialization.testRootName(TestSerialization.java:119)
Running com.fasterxml.jackson.dataformat.xml.TestVersions
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.071 sec - in com.fasterxml.jackson.dataformat.xml.TestVersions
Running com.fasterxml.jackson.dataformat.xml.TestStringValues
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in com.fasterxml.jackson.dataformat.xml.TestStringValues
Running com.fasterxml.jackson.dataformat.xml.TestSerializationAttr
Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestSerializationAttr
testSimpleNsAttr(com.fasterxml.jackson.dataformat.xml.TestSerializationAttr) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<> but was:<>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerializationAttr.testSimpleNsAttr(TestSerializationAttr.java:63)
testIssue6(com.fasterxml.jackson.dataformat.xml.TestSerializationAttr) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<> but was:<>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerializationAttr.testIssue6(TestSerializationAttr.java:79)
testIssue19(com.fasterxml.jackson.dataformat.xml.TestSerializationAttr) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<...p://root' id='abc'><[wstxns1:booleanA xmlns:wstxns1='http://my.ns'>true> but was:<...p://root' id='abc'><[zdef-1331779673:booleanA xmlns:zdef-1331779673='http://my.ns'>true>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerializationAttr.testIssue19(TestSerializationAttr.java:72)
Running com.fasterxml.jackson.dataformat.xml.TestTextValue
Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestTextValue
testSerializeAsText(com.fasterxml.jackson.dataformat.xml.TestTextValue) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<something but was:<something
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestTextValue.testSerializeAsText(TestTextValue.java:82)
testIssue66(com.fasterxml.jackson.dataformat.xml.TestTextValue) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<text but was:<text
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestTextValue.testIssue66(TestTextValue.java:146)
Running com.fasterxml.jackson.dataformat.xml.TestViews
Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestViews
testNullSuppression(com.fasterxml.jackson.dataformat.xml.TestViews) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<Bob but was:<Bob
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestViews.testNullSuppression(TestViews.java:110)
testIssue44(com.fasterxml.jackson.dataformat.xml.TestViews) Time elapsed: 0.003 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<...> but was:<...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestViews.testIssue44(TestViews.java:123)
Running com.fasterxml.jackson.dataformat.xml.TestXMLFormatDetection
Tests run: 8, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.018 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestXMLFormatDetection
testSimpleViaObjectReader(com.fasterxml.jackson.dataformat.xml.TestXMLFormatDetection) Time elapsed: 0.006 sec <<< ERROR!
java.lang.UnsupportedOperationException: Cannot create XMLStreamReader or XMLEventReader from a org.codehaus.stax2.io.Stax2ByteArraySource
at com.sun.xml.internal.stream.XMLInputFactoryImpl.jaxpSourcetoXMLInputSource(XMLInputFactoryImpl.java:300)
at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:143)
at com.fasterxml.jackson.dataformat.xml.XmlFactory._createJsonParser(XmlFactory.java:549)
at com.fasterxml.jackson.dataformat.xml.XmlFactory._createParser(XmlFactory.java:479)
at com.fasterxml.jackson.dataformat.xml.XmlFactory._createParser(XmlFactory.java:26)
at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:784)
at com.fasterxml.jackson.databind.deser.DataFormatReaders$Match.createParserWithMatch(DataFormatReaders.java:368)
at com.fasterxml.jackson.databind.ObjectReader._detectBindAndClose(ObjectReader.java:1415)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:844)
at com.fasterxml.jackson.dataformat.xml.TestXMLFormatDetection.testSimpleViaObjectReader(TestXMLFormatDetection.java:126)
testListViaObjectReader(com.fasterxml.jackson.dataformat.xml.TestXMLFormatDetection) Time elapsed: 0.006 sec <<< ERROR!
java.lang.UnsupportedOperationException: Cannot create XMLStreamReader or XMLEventReader from a org.codehaus.stax2.io.Stax2ByteArraySource
at com.sun.xml.internal.stream.XMLInputFactoryImpl.jaxpSourcetoXMLInputSource(XMLInputFactoryImpl.java:300)
at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:143)
at com.fasterxml.jackson.dataformat.xml.XmlFactory._createJsonParser(XmlFactory.java:549)
at com.fasterxml.jackson.dataformat.xml.XmlFactory._createParser(XmlFactory.java:479)
at com.fasterxml.jackson.dataformat.xml.XmlFactory._createParser(XmlFactory.java:26)
at com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:784)
at com.fasterxml.jackson.databind.deser.DataFormatReaders$Match.createParserWithMatch(DataFormatReaders.java:368)
at com.fasterxml.jackson.databind.ObjectReader._detectBindAndClose(ObjectReader.java:1415)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:844)
at com.fasterxml.jackson.dataformat.xml.TestXMLFormatDetection.testListViaObjectReader(TestXMLFormatDetection.java:142)
Running com.fasterxml.jackson.dataformat.xml.TestEnums
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in com.fasterxml.jackson.dataformat.xml.TestEnums
Running com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations
Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations
testPersonAsXml(com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations) Time elapsed: 0.008 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:< but was:<
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations.testPersonAsXml(TestWithJAXBAnnotations.java:162)
testSerializeAsAttr(com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<3 but was:<3
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations.testSerializeAsAttr(TestWithJAXBAnnotations.java:130)
testRootName(com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<text...> but was:<text...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations.testRootName(TestWithJAXBAnnotations.java:119)
testAsTextWithJAXB(com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<something but was:<something
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.jaxb.TestWithJAXBAnnotations.testAsTextWithJAXB(TestWithJAXBAnnotations.java:142)
Running com.fasterxml.jackson.dataformat.xml.jaxb.TestAttributes
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.jaxb.TestAttributes
testIssue6(com.fasterxml.jackson.dataformat.xml.jaxb.TestAttributes) Time elapsed: 0.003 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<> but was:<>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.jaxb.TestAttributes.testIssue6(TestAttributes.java:45)
Running com.fasterxml.jackson.dataformat.xml.jaxb.TestElementWrapper
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.jaxb.TestElementWrapper
testElementWrapper(com.fasterxml.jackson.dataformat.xml.jaxb.TestElementWrapper) Time elapsed: 0.003 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<JayJunior<...> but was:<JayJunior<...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.jaxb.TestElementWrapper.testElementWrapper(TestElementWrapper.java:63)
testNoElementWrapper(com.fasterxml.jackson.dataformat.xml.jaxb.TestElementWrapper) Time elapsed: 0.002 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<

Jay but was:<

Jay
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.jaxb.TestElementWrapper.testNoElementWrapper(TestElementWrapper.java:83)
Running com.fasterxml.jackson.dataformat.xml.TestDeserialization
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec - in com.fasterxml.jackson.dataformat.xml.TestDeserialization
Running com.fasterxml.jackson.dataformat.xml.TestXmlTokenStream
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in com.fasterxml.jackson.dataformat.xml.TestXmlTokenStream
Running com.fasterxml.jackson.dataformat.xml.TestSerializationManual
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec <<< FAILURE! - in com.fasterxml.jackson.dataformat.xml.TestSerializationManual
testIssue54(com.fasterxml.jackson.dataformat.xml.TestSerializationManual) Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<13...> but was:<13...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at com.fasterxml.jackson.dataformat.xml.TestSerializationManual.testIssue54(TestSerializationManual.java:52)
Results :
Failed tests:
TestIndentation.testWithAttr:116 expected:<> but was:<>
TestXmlDeclaration.testXml10Declaration:19 expected:<123 but was:<123
TestXmlDeclaration.testXml11Declaration:27 expected:<abcd</...> but was:<abcd</...>
TestListAnnotationSharing.testAnnotationSharing:47 expected:<1...> but was:<1...>
TestListsUnwrapped.testWrappedLists:55 expected:<a</...> but was:<a</...>
TestListsUnwrapped.testUnwrappedLists:74 expected:<c but was:<c
TestListsUnwrapped.testDefaultWrapping:94 expected:<a<...> but was:<a<...>
TestXmlGenerator.testSimpleAttribute:48 expected:<> but was:<>
TestXmlGenerator.testSecondLevelAttribute:70 expected:<> but was:<>
TestXmlGenerator.testWriteToFile:104 expected:<42 but was:<42
TestPolymorphic.testAsClassProperty:76 expected:<...peWithClassProperty []_class="com.fasterxm...> but was:<...peWithClassProperty [xmlns="" ]_class="com.fasterxm...>
TestJDKSerializability.testMapper:57 expected:<23 but was:<23
TestJDKSerializability.testXmlFactory:40 expected: but was:
TestSerialization.testSimpleAttribute:136 expected:<...ean attr="something"[/]>> but was:<...ean attr="something"[>>
TestSerialization.testCustomSerializer:186 expected:custom:foo but was:custom:foo
TestSerialization.testMap:165 expected:<12...> but was:<12...>
TestSerialization.testSimpleNsElem:151 expected:<<[wstxns1:text xmlns:wstxns1="http://foo">blah> but was:<<[zdef1747338104:text xmlns:zdef1747338104="http://foo">blah>
TestSerialization.testRootName:119 expected:<123<...> but was:<123<...>
TestSerializationAttr.testSimpleNsAttr:63 expected:<> but was:<>
TestSerializationAttr.testIssue6:79 expected:<> but was:<>
TestSerializationAttr.testIssue19:72 expected:<...p://root' id='abc'><[wstxns1:booleanA xmlns:wstxns1='http://my.ns'>true> but was:<...p://root' id='abc'><[zdef-1331779673:booleanA xmlns:zdef-1331779673='http://my.ns'>true>
TestTextValue.testSerializeAsText:82 expected:<something but was:<something
TestTextValue.testIssue66:146 expected:<text but was:<text
TestViews.testNullSuppression:110 expected:<Bob but was:<Bob
TestViews.testIssue44:123 expected:<...> but was:<...>
TestWithJAXBAnnotations.testPersonAsXml:162 expected:< but was:<
TestWithJAXBAnnotations.testSerializeAsAttr:130 expected:<3 but was:<3
TestWithJAXBAnnotations.testRootName:119 expected:<text...> but was:<text...>
TestWithJAXBAnnotations.testAsTextWithJAXB:142 expected:<something but was:<something
TestAttributes.testIssue6:45 expected:<> but was:<>
TestElementWrapper.testElementWrapper:63 expected:<JayJunior<...> but was:<JayJunior<...>
TestElementWrapper.testNoElementWrapper:83 expected:<

Jay but was:<

Jay
TestSerializationManual.testIssue54:52 expected:<13...> but was:<13...>
Tests in error:
TestIndentation.testSimpleStringBean:69 ? JsonGeneration Underlying Stax XMLSt...
TestIndentation.testSimpleMap:98 ? JsonMapping Not implemented (through refere...
TestIndentation.testSimpleIntBean:83 ? JsonGeneration Underlying Stax XMLStrea...
TestListRoundtrip.testParentListRoundtrip:109 ? IO javax.xml.stream.XMLStreamE...
TestListDeserialization.testWrappedList:93 ? JsonMapping Not implemented (thro...
TestListDeserialization.testWrappedListWithGetters:108 ? JsonMapping Not imple...
TestXMLFormatDetection.testSimpleViaObjectReader:126 ? UnsupportedOperation Ca...
TestXMLFormatDetection.testListViaObjectReader:142 ? UnsupportedOperation Cann...
Tests run: 99, Failures: 33, Errors: 8, Skipped: 0
[ERROR] There are test failures.

ExceptionMappers should be implemented by the users not by the library

Your exception mappers for json pasing and json mapping are shadowing my exception mappers which I use to produce an structured json error response, this kind of error handling should be done by the application that is using your library, otherwise you force the rest apis to follow your response messaging convention. I am using jersey 2.10 and my exception mappers are never picked up but yours com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper and com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper.

Trying to write END_DOCUMENT when document has no root (ie. trying to output empty document).


org.glassfish.jersey.server.internal.process.MappableException: java.io.IOException: javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when document has no root (ie. trying to output empty document).
at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:96) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1005) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:515) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:362) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:386) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:243) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330) ~[jersey-container-grizzly2-http-2.2.jar:na]
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:211) ~[grizzly-http-server-2.3.5.jar:2.3.5]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) [grizzly-framework-2.3.5.jar:2.3.5]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) [grizzly-framework-2.3.5.jar:2.3.5]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_03]
Caused by: java.io.IOException: javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when document has no root (ie. trying to output empty document).
at com.fasterxml.jackson.dataformat.xml.util.StaxUtil.throwXmlAsIOException(StaxUtil.java:24) ~[jackson-dataformat-xml-2.2.2.jar:2.2.2]
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.close(ToXmlGenerator.java:986) ~[jackson-dataformat-xml-2.2.2.jar:2.2.2]
at com.fasterxml.jackson.jaxrs.base.ProviderBase.writeTo(ProviderBase.java:487) ~[jackson-jaxrs-base-2.2.2.jar:2.2.2]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:194) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.filter.LoggingFilter.aroundWriteTo(LoggingFilter.java:268) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.server.mvc.internal.TemplateMethodInterceptor.aroundWriteTo(TemplateMethodInterceptor.java:78) ~[jersey-mvc-2.2.jar:na]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:103) ~[jersey-server-2.2.jar:na]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139) ~[jersey-common-2.2.jar:na]
at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:88) ~[jersey-server-2.2.jar:na]
... 19 common frames omitted
Caused by: javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when document has no root (ie. trying to output empty document).
at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1522) ~[woodstox-core-asl-4.2.0.jar:4.2.0]
at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1551) ~[woodstox-core-asl-4.2.0.jar:4.2.0]
at com.ctc.wstx.sw.BaseStreamWriter._finishDocument(BaseStreamWriter.java:1377) ~[woodstox-core-asl-4.2.0.jar:4.2.0]
at com.ctc.wstx.sw.BaseStreamWriter.close(BaseStreamWriter.java:247) ~[woodstox-core-asl-4.2.0.jar:4.2.0]
at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.close(ToXmlGenerator.java:983) ~[jackson-dataformat-xml-2.2.2.jar:2.2.2]

... 29 common frames omitted

@GET
@Path("/test")
public static List<Test> list() {

    List<Test> result = Lists.newArrayList();
    result.add(newTest());
    result.add(newTest());
    result.add(newTest());
    result.add(newTest());

    return result;
}

public static Test newTest() {
    Test bean = new Test();
    bean.age = 22;
    bean.attr = "test models";
    return bean;
}

@Entity
public class Test extends Model {

  @Id
  public UUID id;

  @NotBlank
  public String attr;

  @NotNull
  public Integer age;

  @JsonIgnore
  public static Finder<UUID, Test> finder = new Finder(UUID.class, Test.class);
 }

Add docs about JsonView annotation of Jersey resources

JSON views are an amazing feature of Jackson. I've always wondered: How can I tell Jersey to use a specific JSON view for a resource method? I don't always want to write

return mapper.writerWithView(Views.Public.class).writeValueAsBytes(result);

at the end of each JAX-RS resource method. I've just discovered that you can simply annotate a Jersey method with @JsonView directly like this:

@JsonView(Views.Public.class)
@GET
@Produces(MediaType.APPLICATION_JSON + ";charset=UTF-8")
public List<Object> getElements() {
    ...
    return someResultList;
}

So, the solution is great and really simple but it is not documented anywhere. I'm not the only one who missed this in the documents (see the comments for this answer: http://stackoverflow.com/a/11351116/454825 ). A short note on the old wiki here would help: http://wiki.fasterxml.com/JacksonJsonViews

Add support for `@JsonIgnoreType` for endpoints

Dropwizard JAX-RS provider seems to add special handling to make anything annotated with @JsonIgnoreType (that is, any endpoint annotated) to be considered "untouchable", that is, not to be processed using Jackson ObjectMapper. This makes sense in that it allows marker for certain kinds of specific classes that Jackson can not and should not handle, instead deferring to some other processing component.

Add support for javax.annotation.security data filtering

Jersey provides means to filter data based on user roles, which is something very useful when designing REST services. However, they don't support this feature for Jackson (besides, they are still using v 1.9).

I was wondering if it was possible to add this as a provider feature. I know I could use JsonViews, but I feel like using standard annotations will turn out to be more portable.

Missing OSGI import

missing in <osgi.import> in base/pom.xml :
, com.fasterxml.jackson.databind.cfg

Remove `@Provider` annotation from `JsonParseExceptionMapper` and `JsonMappingExceptionMapper`

Currently jackson's json provider package (com.fasterxml.jackson.jaxrs.json) includes ExceptionMappers for JsonMappingException and JsonParseException.

This may cause unpredictable behaviour if the application also has an ExceptionMapper for either JsonMappingException or JsonParseException and includes in the registration the com.fasterxml.jackson.jaxrs.json package (where the Json and Jaxb providers are located). The result is that depending on which class gets registered first it will be the one used by jersey. From what I can gather the order by which they get picked up is random, sometimes the app's mappers get used, other times it's the jackson ones.

I understand the reasoning behind the inclusion of these mappers, but I think their registration as provider should at least be configurable (maybe as a feature?). It could also be a good idea to put them in another package to avoid people registering the com.fasterxml.jackson.jaxrs.json package and "accidentally" also registering the mappers.

Add support for JsonViews on inputs to JAX-RS consumers

A JAX-RS endpoint may be annotated with @JSONVIEW(PublicView.class) so that when the result object is serialised the View is applied so only the specified properties are included.

There is currently no way to specify a View to use when deserialising the inputs. It would be good to be able to do this so a particular endpoint can only accept and set certain properties.

I agree with Tatu below - a parameter annotation of @JSONVIEW would be ideal for consistency and context; if that cannot work then a method annotation @JsonRequestView is good too.

Please document the expected behaviour when no annotation is provided for an input; currently it accepts/populates all properties that have a @JSONVIEW annotation regardless of the View classes they reference.

From Tatu on jackson-user: https://groups.google.com/forum/#!topic/jackson-user/r8Tzt36tpk0

Technically speaking Jackson can apply JSON View for deserialization too, but you are right this is not connected by Jackson JAX-RS provider.
The question is how this should be indicated. If JAX-RS passes annotations for actual parameter, we could do:

@JSONVIEW(ViewForResponse.class)
public ResponseValue method(@JSONVIEW(ViewForRequest.class) InputValue value) { /.... }

but I am not 100% sure if this is how things work (it might be that only method-annotations are passed; or perhaps combination of method and parameter ones).

If this does not work, it'd be necessary to add a new annotation type for Jackson JAX-RS provider (@JsonRequestView?).
This should be easy enough to do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.