java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Daksh
, 1 year ago
Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
via userecho.com by Unknown author, 1 year ago
Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
via GitHub by justdave
, 1 year ago
Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
via Stack Overflow by Ash
, 5 months ago
Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
via GitHub by ashutoshgohil
, 2 months ago
Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
via GitHub by ashutoshgohil
, 4 months ago
Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
at java.util.Calendar.setTime(Calendar.java:1197)
at java.text.SimpleDateFormat.formatImpl(SimpleDateFormat.java:527)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:829)
at java.text.DateFormat.format(DateFormat.java:314)
at com.daksh.tmdbsample.data.model.Movie.a(Unknown Source)
at com.daksh.tmdbsample.databinding.MovieDetailBinding.b(Unknown Source)
at android.databinding.ViewDataBinding.a(Unknown Source)
at android.databinding.ViewDataBinding$6.run(Unknown Source)
at android.databinding.ViewDataBinding$5.onViewAttachedToWindow(Unknown Source)
at android.view.View.dispatchAttachedToWindow(View.java:14535)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2836)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1372)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1115)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6023)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)

Users with the same issue

36 times, 1 year ago
2 times, 1 year ago
2 times, 7 months ago
Once, 9 months ago
Once, 9 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.