Hi guys, we've been working with Dremio as data so...
# gooddata-cn
g
Hi guys, we've been working with Dremio as data source, today when I try to drag a table to the canvas in the LDM editor, it throws an error. I'll leave the stack trace in thread. Do you have any tips?
Copy code
{"logtag":"F","log":{"ts":"2023-10-02 08:39:06.176","level":"ERROR","logger":"org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler","thread":"DefaultDispatcher-worker-1","traceId":"ce432cc8b1cfd36c","spanId":"ce432cc8b1cfd36c","userId":"ed634010-6b67-44f1-b3a8-184bd8fb2f52","orgId":"<redacted>","msg":"[92c30501-536]  500 Server Error for HTTP POST \"/api/v1/actions/dataSources/dd8bb06e-7dbf-4795-9a48-b4ce29cd5bd9/generateLogicalModel\"","exc":"java.lang.NullPointerException
	at com.gooddata.tiger.metadata.service.ldm.model.Grain.makeGrain(Grain.kt:32)
	Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below: 
Error has been observed at the following site(s):
	*__checkpoint ⇢ Handler com.gooddata.tiger.metadata.controller.DataSourceActionsController#generateLogicalModel(String, GenerateLdmRequest, Continuation) [DispatcherHandler]
	*__checkpoint ⇢ com.gooddata.tiger.tracing.TracingWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.tiger.oapi.validator.OpenApiRequestValidatorFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.tiger.license.reactive.LicenseCheckFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.tiger.httplogging.LogbookContextFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.oauth2.server.AppLoginWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.oauth2.server.UserContextWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.oauth2.server.PostLogoutNotAllowedWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.oauth2.client.web.server.OAuth2AuthorizationCodeGrantWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.authentication.AuthenticationWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.oauth2.client.web.server.authentication.OAuth2LoginAuthenticationWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.oauth2.client.web.server.OAuth2AuthorizationRequestRedirectWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.oauth2.client.web.server.OAuth2AuthorizationRequestRedirectWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.web.cors.reactive.CorsWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.oauth2.server.OrganizationWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.cloud.sleuth.instrument.web.TraceWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ com.gooddata.tiger.httplogging.LogbookWritingFilter [DefaultWebFilterChain]
	*__checkpoint ⇢ HTTP POST \"/api/v1/actions/dataSources/dd8bb06e-7dbf-4795-9a48-b4ce29cd5bd9/generateLogicalModel\" [ExceptionHandlingWebHandler]
Original Stack Trace:
		at com.gooddata.tiger.metadata.service.ldm.model.Grain.makeGrain(Grain.kt:32)
		at com.gooddata.tiger.metadata.service.ldm.LdmService.makeDatasets(LdmService.kt:172)
		at com.gooddata.tiger.metadata.service.ldm.LdmService.generateLogicalModel(LdmService.kt:68)
		at com.gooddata.tiger.metadata.service.DataSourceService$generateLogicalModel$2.invokeSuspend(DataSourceService.kt:146)
		at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
		at kotlinx.coroutines.UndispatchedCoroutine.afterResume(Builders.common.kt:214)
		at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
		at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
		at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
		at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
		at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
		at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
		at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
"},"container":"metadata-api"}
j
Hi, we are looking into this behavior and are checking the expected functionality and error. We will follow up with more details as soon as possible.
g
We’ve actually traced the problem, it was due to naming conventions, the culprit:
gr__field__name
Having two underscores after the separator apparently breaks the generate LDM endpoint
j
You are right. In your case, you also use
gr
prefix, which is used by the generateLdm endpoint for creating primary key. But, we expect the double underscore only once in this case. Anyway, we should not return status 500 with NullPointerException! (this is funny, because we use Kotlin, where such exceptions are extremely rare). @Joseph Heun please, create an internal Jira for preventing such error.
1
r
Internal Issue already exists @Jan Soubusta
👍 1