Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-690

Resolve issues with class loading during integration tests execution

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      CP: ready for planning, eHoldings Sprint 94, eHoldings Sprint 95
    • Story Points:
      3
    • Development Team:
      Spitfire

      Description

      Integration tests have revealed issues with class loading in couple of RMB modules.

      Observable issues with tests caused by the above problem

      cql2pgjson:
      com.fasterxml.jackson.databind.JsonMappingException: org.folio.cql2pgjson.util.SqlUtil
      SEVERE: No schema.json found                                                                                                                                  
      com.fasterxml.jackson.databind.JsonMappingException: org.folio.cql2pgjson.util.SqlUtil                                                                        
       at [Source: (String)"{                                                                                                                                       
        "tables": [                                                                                                                                                 
          {                                                                                                                                                         
            "tableName": "users",                                                                                                                                   
            "withAuditing": false,                                                                                                                                  
            "ginIndex": [                                                                                                                                           
              {                                                                                                                                                     
                "fieldName": "name",                                                                                                                                
                "tOps": "ADD",                                                                                                                                      
                "caseSensitive": false,                                                                                                                             
                "removeAccents": true                                                                                                                               
              },                                                                                                                                                    
              {                                                                                                                                                     
                "fieldName": "contactInformation.phone",                                                                                                            
                "tOps": "ADD",                                                                                                                                      
                "caseSensitive": false,                                                                                                                             
                "removeAccents": true,                                                                                                                              
                "arraySubfield": "number",                                                                                                                          
                "arrayModifiers": ["type"]                                                                                                                          
              }                                                                                                                                                     
            ],                                                                                                                                                      
            "fullT"[truncated 2305 chars]; line: 4, column: 20] (through reference chain: org.folio.rest.persist.ddlgen.Schema["tables"]->java.util.ArrayList[0]->or
      	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:278)                                                                 
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:611)                                                    
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:599)                                                    
      	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:143)                                                     
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)                                                     
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)                                                            
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)                                            
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)                                            
      	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)                                             
      	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)                                                     
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)                                                     
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)                                                            
      	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)                                                                    
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3205)                                                                           
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3173)                                                                           
      	at cql2pgjson@30.3.0-SNAPSHOT/org.folio.cql2pgjson.CQL2PgJSON.loadDbSchema(CQL2PgJSON.java:177)                                                            
      	at cql2pgjson@30.3.0-SNAPSHOT/org.folio.cql2pgjson.CQL2PgJSON.doInit(CQL2PgJSON.java:208)                                                                  
      	at cql2pgjson@30.3.0-SNAPSHOT/org.folio.cql2pgjson.CQL2PgJSON.<init>(CQL2PgJSON.java:95)                                                                   
      	at cql2pgjson@30.3.0-SNAPSHOT/org.folio.cql2pgjson.ForeignKeyGenerationIT.cqla(ForeignKeyGenerationIT.java:33)                                             
      	at cql2pgjson@30.3.0-SNAPSHOT/org.folio.cql2pgjson.ForeignKeyGenerationIT.searchTableaByTablebWild1(ForeignKeyGenerationIT.java:115)                       
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                          
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)                                                        
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)                                                                                              
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)                                                                    
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)                                                                     
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)                                                                      
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)                                                                       
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)                                                                                        
      	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)                                                                    
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)                                                                                           
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)                                                                      
      	at junitparams.JUnitParamsRunner.runChild(JUnitParamsRunner.java:449)                                                                                      
      	at junitparams.JUnitParamsRunner.runChild(JUnitParamsRunner.java:393)                                                                                      
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)                                                                                             
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)                                                                                         
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)                                                                                       
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)                                                                                         
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)                                                                                        
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)                                                                           
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)                                                                             
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)                                                                                        
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)                                                                                               
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:364)                                                                        
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272)                                                               
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:237)                                                                 
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:158)                                                                         
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)                                                                 
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)                                                                            
      	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)                                                                                
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)                                                                               
      Caused by: java.lang.ClassNotFoundException: org.folio.cql2pgjson.util.SqlUtil                                                                                
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)                                                                 
      	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)                                                              
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)                                                                                         
      	at org.folio.rest.persist.ddlgen.Table.setTableName(Table.java:56)                                                                                         
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                          
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)                                                        
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)                                                                                              
      	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:141)                                                     
      	... 47 more                                                                                                                                                
      
      
      domain-models-runtime:
      TestEngine with ID 'junit-jupiter' failed to discover tests
      # Created at 2020-08-10T19:42:01.555
      org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
      	at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:189)
      	at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:168)
      	at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:124)
      	at org.apache.maven.surefire.junitplatform.TestPlanScannerFilter.accept(TestPlanScannerFilter.java:56)
      	at org.apache.maven.surefire.api.util.DefaultScanResult.applyFilter(DefaultScanResult.java:102)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.scanClasspath(JUnitPlatformProvider.java:147)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
      	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
      Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'org.folio.rest.impl.TenantAPIIT'] resolution failed
      	at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
      	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:102)
      	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
      	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
      	at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:45)
      	at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)
      	at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:181)
      	... 10 more
      Caused by: java.lang.NoClassDefFoundError: org/folio/rest/jaxrs/model/TenantAttributes
      	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
      	at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3191)
      	at java.base/java.lang.Class.getMethods(Class.java:1904)
      	at org.junit.platform.commons.util.ReflectionUtils.getDefaultMethods(ReflectionUtils.java:1436)
      	at org.junit.platform.commons.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:1409)
      	at org.junit.platform.commons.util.ReflectionUtils.findMethod(ReflectionUtils.java:1287)
      	at org.junit.platform.commons.util.ReflectionUtils.isMethodPresent(ReflectionUtils.java:1188)
      	at org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests.hasTestOrTestFactoryOrTestTemplateMethods(IsTestClassWithTests.java:50)
      	at org.junit.jupiter.engine.discovery.predicates.IsTestClassWithTests.test(IsTestClassWithTests.java:46)
      	at org.junit.jupiter.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:67)
      	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
      	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
      	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
      	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
      	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
      	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)
      	... 15 more
      Caused by: java.lang.ClassNotFoundException: org.folio.rest.jaxrs.model.TenantAttributes
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
      	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      	... 39 more
      
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dmtkachenko Dmytro Tkachenko
                Reporter:
                dmtkachenko Dmytro Tkachenko
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases