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

net.twisterrob.travel.statushistory.controller.IndexControllerIntegrationTest instantiates datastore #66

Open
TWiStErRob opened this issue Jan 9, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@TWiStErRob
Copy link
Owner

2024-01-09T09:42:46,890 ERROR [qtp1760763936-72] io.micronaut.http.server.RouteExecutor(RouteExecutor.java:274) Unexpected error occurred: Error instantiating bean of type  [net.twisterrob.travel.statushistory.infrastructure.DatastoreStatusHistoryDataSource]

Message: A project ID is required for this service but could not be determined from the builder or the environment.  Please set a project ID using the builder.
Path Taken: new LineStatusHistoryController(HistoryUseCase useCase,StaticData staticData) --> new LineStatusHistoryController([HistoryUseCase useCase],StaticData staticData) --> Dependencies.historyUseCase([StatusHistoryDataSource statusHistoryDataSource],StatusDataSource statusDataSource,FeedParser feedParser) --> new DatastoreStatusHistoryDataSource([Datastore datastore])
io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type  [net.twisterrob.travel.statushistory.infrastructure.DatastoreStatusHistoryDataSource]

Message: A project ID is required for this service but could not be determined from the builder or the environment.  Please set a project ID using the builder.
Path Taken: new LineStatusHistoryController(HistoryUseCase useCase,StaticData staticData) --> new LineStatusHistoryController([HistoryUseCase useCase],StaticData staticData) --> Dependencies.historyUseCase([StatusHistoryDataSource statusHistoryDataSource],StatusDataSource statusDataSource,FeedParser feedParser) --> new DatastoreStatusHistoryDataSource([Datastore datastore])
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2324)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2279)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2291)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3054)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:2956)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2917)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2730)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1729)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at net.twisterrob.travel.statushistory.infrastructure.$DatastoreStatusHistoryDataSource$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2309)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2279)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2291)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3054)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2944)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2730)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1729)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at net.twisterrob.travel.statushistory.di.$Dependencies$HistoryUseCase1$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2309)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2279)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2291)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3054)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2944)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2730)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1729)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at net.twisterrob.travel.statushistory.controller.$LineStatusHistoryController$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2309)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2279)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2291)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3054)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:2956)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2917)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2891)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1695)
	at io.micronaut.context.DefaultBeanContext$BeanContextExecutionHandle.getTarget(DefaultBeanContext.java:4247)
	at io.micronaut.context.DefaultBeanContext$BeanContextUnsafeExecutionHandle.invokeUnsafe(DefaultBeanContext.java:4214)
	at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:228)
	at io.micronaut.http.context.ServerRequestContext.with(ServerRequestContext.java:74)
	at io.micronaut.http.server.RouteExecutor.executeRouteAndConvertBody(RouteExecutor.java:480)
	at io.micronaut.http.server.RouteExecutor.callRoute(RouteExecutor.java:470)
	at io.micronaut.http.server.RequestLifecycle.lambda$normalFlow$2(RequestLifecycle.java:146)
	at io.micronaut.core.execution.ImperativeExecutionFlowImpl.flatMap(ImperativeExecutionFlowImpl.java:72)
	at io.micronaut.http.server.RequestLifecycle.lambda$normalFlow$4(RequestLifecycle.java:146)
	at io.micronaut.http.server.RequestLifecycle.lambda$runWithFilters$14(RequestLifecycle.java:264)
	at io.micronaut.http.filter.TerminalFilter.processRequestFilter(TerminalFilter.java:58)
	at io.micronaut.http.filter.FilterRunner.filterRequest0(FilterRunner.java:153)
	at io.micronaut.http.filter.FilterRunner.filterRequest0(FilterRunner.java:153)
	at io.micronaut.http.filter.FilterRunner.lambda$filterRequest0$2(FilterRunner.java:153)
	at io.micronaut.http.filter.AroundLegacyFilter$FilterChainImpl.proceed(AroundLegacyFilter.java:109)
	at io.micronaut.views.ViewsFilter.doFilter(ViewsFilter.java:133)
	at io.micronaut.http.filter.HttpServerFilter.doFilter(HttpServerFilter.java:48)
	at io.micronaut.http.filter.AroundLegacyFilter.processRequestFilter(AroundLegacyFilter.java:62)
	at io.micronaut.http.filter.FilterRunner.filterRequest0(FilterRunner.java:153)
	at io.micronaut.http.filter.FilterRunner.filterRequest0(FilterRunner.java:153)
	at io.micronaut.http.filter.FilterRunner.lambda$filterRequest0$2(FilterRunner.java:153)
	at io.micronaut.core.execution.ImperativeExecutionFlowImpl.flatMap(ImperativeExecutionFlowImpl.java:72)
	at io.micronaut.http.filter.MethodFilter.processRequestFilter(MethodFilter.java:263)
	at io.micronaut.http.filter.FilterRunner.filterRequest0(FilterRunner.java:153)
	at io.micronaut.http.filter.FilterRunner.filterRequest(FilterRunner.java:137)
	at io.micronaut.http.filter.FilterRunner.run(FilterRunner.java:132)
	at io.micronaut.http.server.RequestLifecycle.runWithFilters(RequestLifecycle.java:281)
	at io.micronaut.http.server.RequestLifecycle.normalFlow(RequestLifecycle.java:143)
	at io.micronaut.servlet.http.ServletHttpHandler$ServletRequestLifecycle.handleNormal(ServletHttpHandler.java:507)
	at io.micronaut.servlet.http.ServletHttpHandler.lambda$service$5(ServletHttpHandler.java:212)
	at io.micronaut.servlet.engine.DefaultServletHttpRequest.lambda$executeAsync$1(DefaultServletHttpRequest.java:176)
	at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1466)
	at org.eclipse.jetty.server.AsyncContextState$1.run(AsyncContextState.java:148)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: A project ID is required for this service but could not be determined from the builder or the environment.  Please set a project ID using the builder.
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
	at com.google.cloud.ServiceOptions.<init>(ServiceOptions.java:304)
	at com.google.cloud.datastore.DatastoreOptions.<init>(DatastoreOptions.java:108)
	at com.google.cloud.datastore.DatastoreOptions.<init>(DatastoreOptions.java:36)
	at com.google.cloud.datastore.DatastoreOptions$Builder.build(DatastoreOptions.java:91)
	at com.google.cloud.datastore.DatastoreOptions.getDefaultInstance(DatastoreOptions.java:165)
	at net.twisterrob.travel.statushistory.di.Dependencies.datastore(Dependencies.kt:31)
	at net.twisterrob.travel.statushistory.di.$Dependencies$Datastore0$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2309)
	... 80 more
@TWiStErRob TWiStErRob added the bug Something isn't working label Jan 9, 2024
@TWiStErRob TWiStErRob added this to the v1.1.0 milestone Jan 9, 2024
@TWiStErRob TWiStErRob modified the milestones: v1.1.0, v1.2.0 May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant