Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when undeploying app with JPA and StdDateFormat #491

Closed
1 task done
ikeyat opened this issue Feb 17, 2016 · 6 comments
Closed
1 task done

NPE when undeploying app with JPA and StdDateFormat #491

ikeyat opened this issue Feb 17, 2016 · 6 comments

Comments

@ikeyat
Copy link
Contributor

ikeyat commented Feb 17, 2016

Description

When undeploying application that is using both JPA and Jackson libraries, a following exception is thrown.

Destroy method on bean with name 'com.fasterxml.jackson.databind.util.StdDateFormat#ec5c69d' threw 
java.lang.NullPointerException: null
    at java.text.DateFormat.hashCode(DateFormat.java:739) ~[na:1.8.0_45]
    at java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106) ~[na:1.8.0_45]
    at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097) ~[na:1.8.0_45]
    at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessBeforeDestruction(PersistenceAnnotationBeanPostProcessor.java:374) 
...

The cause seems to be a bug of StdDateFormat in Jackson.
FasterXML/jackson-databind#1130

In TERASOLUNA Framework, when implementing REST service we usually creat StdDateFormat as a bean as seen here.
https://terasolunaorg.github.io/guideline/5.0.1.RELEASE/ja/ArchitectureInDetail/REST.html#restful-web-servicespring-mvc

Possible Solutions

Import improved Jackson.

Affects Version/s

  • 5.1.0
  • 5.0.2
  • 1.0.4

Fix Version/s

  • 5.3.0

Issue Links

@ikeyat ikeyat changed the title NullPointerException when undeploying app with both JPA and Jackson's StdDateFormat NPE when undeploying app with both JPA and Jackson's StdDateFormatPE Feb 17, 2016
@ikeyat ikeyat changed the title NPE when undeploying app with both JPA and Jackson's StdDateFormatPE NPE when undeploying app with JPA and StdDateFormat Feb 17, 2016
@kazuki43zoo
Copy link
Contributor

This issue will fix at Jackson 2.7.2.

@ikeyat
Copy link
Contributor Author

ikeyat commented Jun 2, 2016

The version of jackson cannot be imported to 5.2.x line.
This exception is not so critical and the condition is rare so we postpone to 5.3.0+ release.

@sasakitsy sasakitsy modified the milestones: 2017 winter, 2016 summer Aug 3, 2016
@yoshikawaa
Copy link
Contributor

@sasakitsy
Spring IO Platform Athenes applyed. Jackson version is 2.8.4.

@kazuki43zoo
Copy link
Contributor

@sasakitsy Please assign a verifier for this fix.

@kazuki43zoo
Copy link
Contributor

@sasakitsy

Please assign a verifier for this fix.

@bttakehirah
Copy link

Confirmed the error, and the problem was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants