Skip to content

500 while importing (Probably with meta) #3000

Open
@JanCizmar

Description

@JanCizmar

Describe the bug
org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : io.tolgee.model.dataImport.ImportKey.keyMeta -> io.tolgee.model.key.KeyMeta

To Reproduce
Don't know how to reproduce, but there should be enough info in Sentry

Expected behavior
Should import successfully.

Stack trace

org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : io.tolgee.model.dataImport.ImportKey.keyMeta -> io.tolgee.model.key.KeyMeta
    at org.hibernate.engine.spi.CascadingActions$8.noCascade(CascadingActions.java:372)
    at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:173)
    at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:169)
    at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:152)
    at org.hibernate.event.internal.AbstractFlushingEventListener.preFlush(AbstractFlushingEventListener.java:102)
    at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoPreFlush(DefaultAutoFlushEventListener.java:103)
    at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
    at org.hibernate.internal.SessionImpl.autoPreFlush(SessionImpl.java:1387)
    at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.withCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:322)
    at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.performList(ConcreteSqmSelectQueryPlan.java:302)
    at org.hibernate.query.sqm.internal.QuerySqmImpl.doList(QuerySqmImpl.java:526)
    at org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:423)
    at org.hibernate.query.Query.getResultList(Query.java:120)
    at org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:129)
    at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:92)
    at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:152)
    at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:140)
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:170)
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:158)
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:169)
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:148)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
    at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:70)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:379)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
    at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:136)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
    at org.springframework.data.repository.core.support.MethodInvocationValidator.invoke(MethodInvocationValidator.java:95)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)
    at jdk.proxy2.$Proxy331.getAllByProjectId
    at io.tolgee.service.key.KeyService.getAll(KeyService.kt:57)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke(Method.java:580)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:355)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:716)
    at io.tolgee.service.key.KeyService$$SpringCGLIB$$1.getAll(<generated>)
    at io.tolgee.service.dataImport.ImportDataManager.existingKeys_delegate$lambda$15(ImportDataManager.kt:85)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at io.tolgee.service.dataImport.ImportDataManager.getExistingKeys(ImportDataManager.kt:84)
    at io.tolgee.service.dataImport.CoreImportFilesProcessor.shouldImportKey(CoreImportFilesProcessor.kt:327)
    at io.tolgee.service.dataImport.CoreImportFilesProcessor.processTranslations(CoreImportFilesProcessor.kt:313)
    at io.tolgee.service.dataImport.CoreImportFilesProcessor.processResult(CoreImportFilesProcessor.kt:169)
    at io.tolgee.service.dataImport.CoreImportFilesProcessor.processFile(CoreImportFilesProcessor.kt:108)
    at io.tolgee.service.dataImport.CoreImportFilesProcessor.processFileOrArchive(CoreImportFilesProcessor.kt:90)
    at io.tolgee.service.dataImport.CoreImportFilesProcessor.processFilesRecursive(CoreImportFilesProcessor.kt:72)
    at io.tolgee.service.dataImport.CoreImportFilesProcessor.processFiles(CoreImportFilesProcessor.kt:64)
    at io.tolgee.service.dataImport.ImportService.addFiles(ImportService.kt:102)

Versions and environment

  • Tolgee Platform version: [e.g. 3.111.0]
  • Environment: Cloud

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghotWe want to do this right now!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions