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

4.x: Mongo Database example - Some endpoints do not work #8128

Closed
tvallin opened this issue Dec 11, 2023 · 0 comments · Fixed by #8130
Closed

4.x: Mongo Database example - Some endpoints do not work #8128

tvallin opened this issue Dec 11, 2023 · 0 comments · Fixed by #8130
Assignees
Labels
4.x Version 4.x DB client Helidon DB Client examples
Milestone

Comments

@tvallin
Copy link
Member

tvallin commented Dec 11, 2023

Environment Details

  • Helidon Version: 4.x
  • Helidon SE or Helidon MP
  • JDK version: 21
  • OS:
  • Docker version (if applicable):

Problem Description

Exception thrown when exercising the application.

Steps to reproduce

cd examples/dbclient/mongodb
mvn clean install
docker run --rm --name mongo -p 27017:27017 mongo
java -jar target/helidon-examples-dbclient-mongodb.jar
curl -i -X PUT -H 'Content-type: application/json' -d '{"name":"Squirtle","type":"water"}' http://localhost:8079/db

Stacktrace:

io.helidon.http.RequestException: Index 5 out of bounds for length 5
	at io.helidon.http.RequestException$Builder.build(RequestException.java:139)
	at io.helidon.webserver.http.ErrorHandlers.unhandledError(ErrorHandlers.java:202)
	at io.helidon.webserver.http.ErrorHandlers.lambda$handleError$1(ErrorHandlers.java:182)
	at java.base/java.util.Optional.ifPresentOrElse(Optional.java:198)
	at io.helidon.webserver.http.ErrorHandlers.handleError(ErrorHandlers.java:181)
	at io.helidon.webserver.http.ErrorHandlers.runWithErrorHandling(ErrorHandlers.java:118)
	at io.helidon.webserver.http.Filters$FilterChainImpl.proceed(Filters.java:121)
	at io.helidon.webserver.observe.metrics.MetricsFeature.lambda$configureVendorMetrics$2(MetricsFeature.java:90)
	at io.helidon.webserver.http.Filters$FilterChainImpl.proceed(Filters.java:119)
	at io.helidon.common.context.Contexts.runInContext(Contexts.java:117)
	at io.helidon.webserver.observe.tracing.TracingObserver$TracingFilter.filter(TracingObserver.java:233)
	at io.helidon.webserver.http.Filters$FilterChainImpl.proceed(Filters.java:119)
	at io.helidon.webserver.http.Filters.executeFilters(Filters.java:87)
	at io.helidon.webserver.http.Filters.lambda$filter$0(Filters.java:83)
	at io.helidon.webserver.http.ErrorHandlers.runWithErrorHandling(ErrorHandlers.java:75)
	at io.helidon.webserver.http.Filters.filter(Filters.java:83)
	at io.helidon.webserver.http.HttpRouting.route(HttpRouting.java:109)
	at io.helidon.webserver.http1.Http1Connection.route(Http1Connection.java:414)
	at io.helidon.webserver.http1.Http1Connection.handle(Http1Connection.java:187)
	at io.helidon.webserver.ConnectionHandler.run(ConnectionHandler.java:165)
	at io.helidon.common.task.InterruptableTask.call(InterruptableTask.java:47)
	at io.helidon.webserver.ThreadPerTaskExecutor$ThreadBoundFuture.run(ThreadPerTaskExecutor.java:239)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:311)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5
	at io.helidon.dbclient.mongodb.StatementParsers$NamedParser.convert(StatementParsers.java:458)
	at io.helidon.dbclient.mongodb.MongoDbStatement.prepareStatement(MongoDbStatement.java:113)
	at io.helidon.dbclient.mongodb.MongoDbStatementDml.lambda$execute$2(MongoDbStatementDml.java:56)
	at io.helidon.dbclient.DbStatementBase.doExecute(DbStatementBase.java:97)
	at io.helidon.dbclient.mongodb.MongoDbStatementDml.execute(MongoDbStatementDml.java:55)
	at io.helidon.examples.dbclient.common.AbstractPokemonService.insertPokemon(AbstractPokemonService.java:93)
	at io.helidon.webserver.http.Handler.lambda$create$6(Handler.java:123)
	at io.helidon.webserver.http.HttpRouting$RoutingExecutor.doRoute(HttpRouting.java:668)
	at io.helidon.webserver.http.HttpRouting$RoutingExecutor.call(HttpRouting.java:627)
	at io.helidon.webserver.http.HttpRouting$RoutingExecutor.call(HttpRouting.java:605)
	at io.helidon.webserver.http.ErrorHandlers.runWithErrorHandling(ErrorHandlers.java:75)
@tvallin tvallin added examples DB client Helidon DB Client 4.x Version 4.x labels Dec 11, 2023
@tvallin tvallin self-assigned this Dec 11, 2023
@tvallin tvallin changed the title 4.x: Mongo Database example - Some endpoint does not work 4.x: Mongo Database example - Some endpoints do not work Dec 11, 2023
@m0mus m0mus added this to the 4.0.2 milestone Dec 14, 2023
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x DB client Helidon DB Client examples
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants