You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting up Lamassu, occasionally ClassCastExceptions get logged which are apparently caused by SpringBoot's devtools classloading (see e.g. this stackoverflow thread):
java.lang.ClassCastException: null
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:564)
at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:591)
at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:689)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765)
at org.entur.gbfs.GbfsSubscriptionManager.lambda$update$0(GbfsSubscriptionManager.java:68)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.ClassCastException: class org.entur.lamassu.model.entities.Vehicle cannot be cast to class org.entur.lamassu.model.entities.Vehicle (org.entur.lamassu.model.entities.Vehicle is in unnamed module of loader 'app'; org.entur.lamassu.model.entities.Vehicle is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @5185ac30)
at org.entur.lamassu.leader.entityupdater.VehiclesUpdater.lambda$addOrUpdateVehicles$4(VehiclesUpdater.java:140)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at org.entur.lamassu.leader.entityupdater.VehiclesUpdater.addOrUpdateVehicles(VehiclesUpdater.java:138)
at org.entur.lamassu.leader.entityupdater.EntityCachesUpdater.updateEntityCaches(EntityCachesUpdater.java:46)
at org.entur.lamassu.leader.FeedUpdater.receiveUpdate(FeedUpdater.java:133)
at org.entur.lamassu.leader.FeedUpdater.lambda$createSubscription$1(FeedUpdater.java:113)
at org.entur.gbfs.GbfsSubscription.update(GbfsSubscription.java:104)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMap.java:3612)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
... 5 common frames omitted
I'm unsure about the impact of this exception, but for production deployments devtools should explicitly not be packaged. Another option would be to disable devtools restart by adding spring.devtools.restart.enabled = false to application.properties.
The text was updated successfully, but these errors were encountered:
Consequence of this error seems to be, that caches are cleared, it seems to me. As this seems to happen only in dev mode with spring devtools enabled, that would not impact production.
When starting up Lamassu, occasionally ClassCastExceptions get logged which are apparently caused by SpringBoot's devtools classloading (see e.g. this stackoverflow thread):
I'm unsure about the impact of this exception, but for production deployments devtools should explicitly not be packaged. Another option would be to disable devtools restart by adding
spring.devtools.restart.enabled = false
toapplication.properties
.The text was updated successfully, but these errors were encountered: