Bug 1094937 - [WFK] (6.4.0) Jackson libraries are Private but should be Public
Summary: [WFK] (6.4.0) Jackson libraries are Private but should be Public
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: RESTEasy
Version: 6.3.0
Hardware: All
OS: All
unspecified
urgent
Target Milestone: DR8
: EAP 6.4.0
Assignee: Marek Novotny
QA Contact: Katerina Odabasi
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-06 17:23 UTC by Joshua Wilson
Modified: 2016-02-05 08:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-25 16:18:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1158078 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker JBEAP-65 0 Major Closed Jackson libs are Private, should be Public 2018-06-18 10:23:59 UTC
Red Hat Issue Tracker WFLY-3937 0 Major Resolved Jackson libs are Private, should be Public 2016-09-29 08:55:04 UTC

Internal Links: 1158078

Description Joshua Wilson 2014-05-06 17:23:55 UTC
Description of problem:

The following libraries have their module.xml files set to private:

    org.codehaus.jackson.jackson-core-asl
    org.codehaus.jackson.jackson-mapper-asl
    org.codehaus.jackson.jackson-jaxrs
    org.codehaus.jackson.jackson-xc

After talking with Bill Burke, these should be public.

While these modules are private, the use of them creates WARNings in the stack trace. As long as these are private there is a danger to devs using them. 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 sgilda 2014-05-06 17:27:36 UTC
This following quickstart uses this API, meaning customers may use it too. The sooner the API is made public, the better.

https://github.com/jboss-developer/jboss-wfk-quickstarts/tree/2.6.x-develop/contacts-mobile-basic

Comment 2 Dimitris Andreadis 2014-05-06 17:31:05 UTC
Can you please provide some more details on the usual usecase of needing access to those libraries?

Comment 3 Joshua Wilson 2014-05-06 17:44:57 UTC
Sure, when adding a date (not a timestamp) in HTML/JavaScript and persisting it in a database over a REST API (we are using RESTEasy) the date gets turned into a timestamp and the date then gets shifted depending on the users timezone.  To fix this we need to create a Jackson config Provider.  This requires these classes. 

If we use external references then the Provider gets confused because there are now 2 of them and the fix does not work.  So we either need these private modules made public or we need to use libraries from Maven Central. We can not mix the two.

This can be seen in the code that Sande reference above.

Comment 4 Vineet Reynolds 2014-05-06 22:00:56 UTC
To add to Joshua's comment, the typical use case is to access Jackson APIs like ObjectMapper in a Java EE application; this could be for various reasons like:

* configuring the ObjectMapper for customizing serialization behavior like choosing the date format, omitting null properties in JSON etc.,

* adding custom JSON serializers and deserializers using Jackson APIs (JsonSerializer and JsonDeserializer); the MessageBodyReader and MessageBodyWriter APIs from JAX-RS 1.1 are limited in this case, since we still need to use a JSON library like Jackson to serialize to JSON).

* and, if I recall correctly, referencing Jackson annotations like @JsonIgnore in a Java EE 6 app, requires adding the jackson-core-asl module to the deployment.

All of these would require declaring a dependency on the Jackson modules - jackson-core-asl, jackson-mapper-asl.

I'm not sure if the jackson-jaxrs and jackson-xc modules should be public, but I'd assume there would be usecases where users may write classes that extend the classes within them, in their apps.

Comment 5 Marek Novotny 2014-05-07 07:08:38 UTC
we also asked Bill Burke and he wrote:
<citation>
jackson modules aren't private.  If they are, then their module.xml definition should be changed. 
</citation>

Comment 6 Weinan Li 2014-06-25 12:10:21 UTC
This should be EAP source code changes. Assigning it to Stuart.

Comment 9 Marek Novotny 2014-10-08 14:28:16 UTC
I created PR for WF and it is now merged into master. So could anybody ack it for EAP 6.3.x too?

Comment 11 Kabir Khan 2014-11-04 15:41:44 UTC
Following discussions on the PM call, it was decided that these modules should not be made public. Instead users wanting to do things like in https://github.com/jboss-developer/jboss-wfk-quickstarts/blob/2.7.x-develop/contacts-mobile-basic/src/main/java/org/jboss/quickstarts/wfk/util/JacksonConfig.java will see the warning, but a KB entry will be created to outline in what cases this is ok.



PR https://github.com/jbossas/jboss-eap/pull/1876 reverts the original https://github.com/jbossas/jboss-eap/pull/1815.

Comment 12 Kabir Khan 2014-11-25 16:18:42 UTC
Closing, see comment #11

Comment 13 JBoss JIRA Server 2016-02-05 08:43:48 UTC
Bartosz Baranowski <bbaranow> updated the status of jira JBEAP-65 to Closed


Note You need to log in before you can comment on or make changes to this bug.