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

Single quotes in concept name fail ETL #87

Closed
vinayvenu opened this issue Feb 2, 2024 · 3 comments
Closed

Single quotes in concept name fail ETL #87

vinayvenu opened this issue Feb 2, 2024 · 3 comments
Assignees
Labels
bug Something isn't working user reported

Comments

@vinayvenu
Copy link
Member

To reproduce

  • Add a concept with a single quote
  • Run ETL

Issue happens during media table migration

       at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
        at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1538)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431)
        at org.avniproject.etl.repository.sync.MediaTableSyncAction.lambda$syncNewerRows$3(MediaTableSyncAction.java:110)
        at org.avniproject.etl.repository.JdbcContextWrapper.wrap(JdbcContextWrapper.java:33)
        at org.avniproject.etl.repository.JdbcContextWrapper.wrapInOrgContext(JdbcContextWrapper.java:21)
        at org.avniproject.etl.repository.JdbcContextWrapper.runInOrgContext(JdbcContextWrapper.java:10)
        at org.avniproject.etl.repository.sync.MediaTableSyncAction.syncNewerRows(MediaTableSyncAction.java:109)
        at org.avniproject.etl.repository.sync.MediaTableSyncAction.insertData(MediaTableSyncAction.java:58)
        at org.avniproject.etl.repository.sync.MediaTableSyncAction.lambda$perform$0(MediaTableSyncAction.java:52)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.avniproject.etl.repository.sync.MediaTableSyncAction.lambda$perform$1(MediaTableSyncAction.java:51)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.avniproject.etl.repository.sync.MediaTableSyncAction.perform(MediaTableSyncAction.java:49)
        at jdk.internal.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:702)
        at org.avniproject.etl.repository.sync.MediaTableSyncAction$$SpringCGLIB$$0.perform(<generated>)
        at org.avniproject.etl.repository.sync.EntityRepository.lambda$saveEntities$0(EntityRepository.java:41)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.avniproject.etl.repository.sync.EntityRepository.saveEntities(EntityRepository.java:40)
        at jdk.internal.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:391)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:702)
        at org.avniproject.etl.repository.sync.EntityRepository$$SpringCGLIB$$0.saveEntities(<generated>)
        at org.avniproject.etl.service.SyncService.migrateTable(SyncService.java:48)
        at org.avniproject.etl.service.SyncService.lambda$sync$0(SyncService.java:39)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.avniproject.etl.service.SyncService.sync(SyncService.java:39)
        at jdk.internal.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:391)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:702)
        at org.avniproject.etl.service.SyncService$$SpringCGLIB$$0.sync(<generated>)
        at org.avniproject.etl.service.EtlService.runFor(EtlService.java:54)
        at org.avniproject.etl.service.EtlService.runFor(EtlService.java:35)
        at org.avniproject.etl.scheduler.EtlJob.execute(EtlJob.java:27)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
@github-project-automation github-project-automation bot moved this to New Issues in Avni Product Feb 2, 2024
@vinayvenu vinayvenu moved this from New Issues to Analysis Complete in Avni Product Feb 2, 2024
@vinayvenu vinayvenu added bug Something isn't working user reported labels Feb 2, 2024
vedfordev added a commit to vedfordev/avni-etl that referenced this issue Apr 13, 2024
@vinayvenu
Copy link
Member Author

@vedfordev did you check if this works in the media server as well? Try searching for media using the /media/search endpoint

@vinayvenu vinayvenu moved this from Analysis Complete to QA Ready in Avni Product Apr 13, 2024
@vedfordev
Copy link
Contributor

@vinayvenu try with below post call. Something missing in post call

{
    "imageConcepts": [
        {
            "dataType": "Image",
            "uuid": "8c38d12c-f283-4536-a4d7-3ab6b977bab5",
            "name": "School's Photo"
        }
    ],
    "addresses" : [ {"addressLevelType" : "base", "addressLevelIds" : [2] }]
}

@vinayvenu vinayvenu moved this from QA Ready to In QA in Avni Product May 3, 2024
@vinayvenu vinayvenu moved this from In QA to Done in Avni Product May 3, 2024
@vinayvenu
Copy link
Member Author

etl-test organisation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user reported
Projects
Archived in project
Development

No branches or pull requests

2 participants