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

return value of "java.util.List.get(int)" is nullNetwork error (500)! #593

Open
afconlab opened this issue May 2, 2024 · 6 comments
Open

Comments

@afconlab
Copy link

afconlab commented May 2, 2024

I can't add a stop to a shape on trip pattern.
I have the error below

**INFO  2024-05-02T18:17:08.164 [qtp290910207-22] c.c.gtfs.loader.JdbcTableWriter(JdbcTableWriter.java:741) Deleted 0 pattern_stops
ERROR 2024-05-02T18:17:08.167 [qtp290910207-22] c.c.gtfs.loader.JdbcTableWriter(JdbcTableWriter.java:248) Error updating patterns entity
java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.isNull()" because the return value of "java.util.List.get(int)" is null
	at com.conveyal.gtfs.loader.JdbcTableWriter.updateLinkedFields(JdbcTableWriter.java:344)
	at com.conveyal.gtfs.loader.JdbcTableWriter.updateChildTable(JdbcTableWriter.java:635)
	at com.conveyal.gtfs.loader.JdbcTableWriter.update(JdbcTableWriter.java:194)
	at com.conveyal.datatools.editor.controllers.api.EditorController.update(EditorController.java:499)
	at com.conveyal.datatools.editor.controllers.api.EditorController.createOrUpdate(EditorController.java:479)
	at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
	at spark.http.matching.Routes.execute(Routes.java:61)
	at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:134)
	at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1598)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:840)
java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.isNull()" because the return value of "java.util.List.get(int)" is null
	at com.conveyal.gtfs.loader.JdbcTableWriter.updateLinkedFields(JdbcTableWriter.java:344)
	at com.conveyal.gtfs.loader.JdbcTableWriter.updateChildTable(JdbcTableWriter.java:635)
	at com.conveyal.gtfs.loader.JdbcTableWriter.update(JdbcTableWriter.java:194)
	at com.conveyal.datatools.editor.controllers.api.EditorController.update(EditorController.java:499)
	at com.conveyal.datatools.editor.controllers.api.EditorController.createOrUpdate(EditorController.java:479)
	at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
	at spark.http.matching.Routes.execute(Routes.java:61)
	at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:134)
	at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1598)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:840)
INFO  2024-05-02T18:17:08.174 [qtp290910207-22] c.c.d.common.utils.SparkUtils(SparkUtils.java:136) Halting with status code 500.  Error message: An error was encountered while trying to save to the database
ERROR 2024-05-02T18:17:08.174 [qtp290910207-22] c.c.d.common.utils.SparkUtils(SparkUtils.java:139) An error was encountered while trying to save to the database
WARN  2024-05-02T18:17:08.175 [qtp290910207-22] c.c.d.manager.utils.ErrorUtils(ErrorUtils.java:64) Bugsnag not configured to report errors!
INFO  2024-05-02T18:17:08.175 [qtp290910207-22] c.c.d.common.utils.SparkUtils(SparkUtils.java:243) res (500) [email protected] PUT: http://localhost:9966/api/editor/secure/pattern/1?feedId=08eb4bf1-524b-4776-99ef-ffa8ff5e1dc8&sessionId=node08kkegaxs89321q9513kv1w83e1 
{
  "result" : "ERR",
  "message" : "An error was encountered while trying to save to the database",
  "code" : 500,
  "detail" : "Cannot invoke \"com.fasterxml.jackson.databind.JsonNode.isNull()\" because the return value of \"java.util.List.get(int)\" is null"
}
INFO  2024-05-02T18:17:08.175 [qtp290910207-22] c.c.d.e.c.api.EditorController(EditorController.java:489) Update operation took 49 msec**

**

@miles-grant-ibigroup
Copy link
Contributor

Does this only happen when you try to delete a stop from a pattern?

@afconlab
Copy link
Author

afconlab commented May 3, 2024

No, even if I add a stop,
I don't have errors on mongodb or psql logs , I added a local instance of graphopper , but I still have the issue.
I will start a new install from scratch today

@afconlab
Copy link
Author

afconlab commented May 5, 2024

Does anyone else has this issue?I don't know where I'm wrong

@miles-grant-ibigroup
Copy link
Contributor

Something might be wrong with your database. Check that you are attempting to write to an empty Postgres database

@afconlab
Copy link
Author

afconlab commented May 7, 2024

official documentation says that :

Once PostgreSQL is installed and the service has been started, create the database for instance by using the CLI createdb:
$ createdb gtfs_storage_db
So I created database
image
image

but I have the same error with all of them

I just notice some warning when I create a feed
image
where I'am wrong ?

@afconlab
Copy link
Author

afconlab commented May 7, 2024

i became crazy
event with

postgres user with password defined
bindip -> listen_addresses = '*'
IPv4 local connections: -> host    all             all             0.0.0.0/0            md5
port allowed -> sudo ufw allow 5432/tcp
postgres  -> sudo systemctl restart postgresql

only stop integration on trip patterns does'nt work
the issue still the same
{"result":"ERR","message":"Authorization header is missing.","code":401,"detail":null}
I can delete stop from a uploaded feed

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

No branches or pull requests

2 participants