question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException at when adding Statistics Entry

See original GitHub issue

The following error was observed when adding a statistics entry;


java.lang.NullPointerException: null

        at io.github.jhipster.online.service.StatisticsService.addEntry (StatisticsService.java:84)
        at io.github.jhipster.online.service.StatisticsService$$FastClassBySpringCGLIB$$b9a077f6.invoke (<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke (MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint (CglibAopProxy.java:769)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed (CglibAopProxy.java:747)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction (TransactionAspectSupport.java:366)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke (TransactionInterceptor.java:99)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed (CglibAopProxy.java:747)
        at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0 (AsyncExecutionInterceptor.java:115)
        at java.util.concurrent.FutureTask.run (Unknown Source)
        at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1 (ExceptionHandlingAsyncTaskExecutor.java:78)
        at java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
        at java.lang.Thread.run (Unknown Source)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pascalgrimaudcommented, Sep 3, 2020

You should look at the last release code, instead of master branch

Then, the NPE in JH Online should be fixed, it shouldn’t happen at all, no matter what the code from generator-jhipster is

0reactions
SudharakaPcommented, Nov 22, 2020

Apart from this occurrence, I didn’t see this at all recently and I think this is an isolated incident where probably caused by a corrupted (or manually changed) .yo-rc.json file which doesn’t contain the generator-version string. I don’t think we should do anything further than throwing the error since having no generator-version means we cannot log it as a valid stat entry. Therefore I am closing this issue. 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Inserting data to database: NullPointerException error
1 Answer 1 ... You conn variable is null. You are initializing it in your method CreateResultSet() , which seems to be never...
Read more >
Java NullPointerException - Detect, Fix, and Best Practices
This is one of the most common occurrences of java.lang.NullPointerException because it's the caller who is passing the null argument. The below ...
Read more >
How to deal with NullPointerException in Java with Examples
NullPointerException has outlined scenario when it could occur: 1) When you call the instance method on a null object. you won't get a...
Read more >
Null Pointer Exception In Java - GeeksforGeeks
NullPointerException is a RuntimeException. In Java, a special null value can be assigned to an object reference. NullPointerException is thrown ...
Read more >
What Is NullPointerException In Java & How To Avoid It
NullPointerException in Java is a runtime exception. Java assigns a special null value to an object reference. When a program tries to use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found