Closed jSantiago318 closed 4 years ago
After running the program again. This exception keeps logging into the core.log. The vehicle is currently in a route, the auto-assigner is not registering any routes near.
java.lang.NullPointerException: null at org.transitclock.ipc.data.IpcSchedTimes.<init>(IpcSchedTimes.java:45) ~[transitclockCore-2.0.0-SNAPSHOT.jar:na] at org.transitclock.ipc.data.IpcTrip.<init>(IpcTrip.java:79) ~[transitclockCore-2.0.0-SNAPSHOT.jar:na] at org.transitclock.ipc.data.IpcBlock.<init>(IpcBlock.java:60) ~[transitclockCore-2.0.0-SNAPSHOT.jar:na] at org.transitclock.ipc.servers.ConfigServer.getBlocks(ConfigServer.java:244) ~[transitclockCore-2.0.0-SNAPSHOT.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_262] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_262] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_262] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_262] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) ~[na:1.8.0_262] at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[na:1.8.0_262] at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[na:1.8.0_262] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_262] at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[na:1.8.0_262] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) ~[na:1.8.0_262] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) ~[na:1.8.0_262] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) ~[na:1.8.0_262] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_262] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) ~[na:1.8.0_262] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_262] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_262] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_262] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303) ~[na:1.8.0_262] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279) ~[na:1.8.0_262] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164) ~[na:1.8.0_262] at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:235) ~[na:1.8.0_262] at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:180) ~[na:1.8.0_262] at com.sun.proxy.$Proxy78.getBlocks(Unknown Source) ~[na:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_262] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_262] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_262] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_262] at org.transitclock.ipc.rmi.RmiCallInvocationHandler.lowLevelInvoke(RmiCallInvocationHandler.java:356) ~[transitclockCore-2.0.0-SNAPSHOT.jar:na] at org.transitclock.ipc.rmi.RmiCallInvocationHandler.invokeIfNotTooMuchConcurrentAccess(RmiCallInvocationHandler.java:332) ~[transitclockCore-2.0.0-SNAPSHOT.jar:na] at org.transitclock.ipc.rmi.RmiCallInvocationHandler.invoke(RmiCallInvocationHandler.java:238) ~[transitclockCore-2.0.0-SNAPSHOT.jar:na] at com.sun.proxy.$Proxy78.getBlocks(Unknown Source) ~[na:na] at org.transitclock.api.rootResources.TransitimeApi.getBlocksTerse(TransitimeApi.java:952) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_262] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_262] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_262] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_262] at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.24.1.jar:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.24.1.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.24.1.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.24.1.jar:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.24.1.jar:na] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.24.1.jar:na] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.24.1.jar:na] at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [jersey-container-servlet-core-2.24.1.jar:na] at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [jersey-container-servlet-core-2.24.1.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [jersey-container-servlet-core-2.24.1.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [jersey-container-servlet-core-2.24.1.jar:na] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [jersey-container-servlet-core-2.24.1.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.43] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.43] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.43] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.43] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.43] at org.transitclock.servlet.swagger.ApiOriginFilter.doFilter(ApiOriginFilter.java:32) [classes/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.43] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.43] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.43] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [catalina.jar:8.0.43] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [catalina.jar:8.0.43] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.43] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.43] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [catalina.jar:8.0.43] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.43] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) [catalina.jar:8.0.43] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132) [tomcat-coyote.jar:8.0.43] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote.jar:8.0.43] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533) [tomcat-coyote.jar:8.0.43] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489) [tomcat-coyote.jar:8.0.43] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_262] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_262] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.43] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_262]
Do you know how to run core in eclipse or some other IDE?
The line causing the NPE is this.
Long departureEpoch = Core.getInstance().getTime().getEpochTime(trip.getScheduleTime(0).getTime(), avlTime);`
I would like to know if the trip is null or if trip.getScheduleTime(0) returns null?
If you want me to look further I will need your GTFS and access to your traccar instance.
I didn't mention I am running transit clock using docker. Even if I am using traccar is it preferable to run the instance using eclipse ?
No, it is not preferable to run in Eclipse. I was just wondering if you could so we could get more info on the NPE. As I mentioned you could alternatively give me access to your GTFS file and your traccar instance so I can look at what is causing this issue.
I sent you the GTFS file, thank you for the help
Hello, This is everything I have done.
This is the error shown
java.lang.NullPointerException: null at org.transitclock.core.RealTimeSchedAdhProcessor.generateEffectiveScheduleDifference(RealTimeSchedAdhProcessor.java:185) ~[Core.jar:na] at org.transitclock.core.PredictionGeneratorDefaultImpl.generate(PredictionGeneratorDefaultImpl.java:423) ~[Core.jar:na] at org.transitclock.core.MatchProcessor.processPredictions(MatchProcessor.java:80) ~[Core.jar:na] at org.transitclock.core.MatchProcessor.generateResultsOfMatch(MatchProcessor.java:200) ~[Core.jar:na] at org.transitclock.core.AvlProcessor.lowLevelProcessAvlReport(AvlProcessor.java:1425) ~[Core.jar:na] at org.transitclock.core.AvlProcessor.processAvlReport(AvlProcessor.java:1619) ~[Core.jar:na] at org.transitclock.avl.AvlClient.run(AvlClient.java:163) ~[Core.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_262] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_262] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_262] at org.transitclock.utils.threading.NamedThread.run(NamedThread.java:100) [Core.jar:na]