cancel
Showing results for 
Search instead for 
Did you mean: 

Building the old custom snap

Harriesh
New Contributor III

I was not able to build the old custom snap , So I used the latest POM from demosnap and build the custom snap .

Now the build ran successfully . But all tests are failing with the same reason .

2018-08-07 15:31:49 ERROR SchemaRegistry:115 a- Unable to get schema: com-snaplogic-snap-template_2
com.google.common.util.concurrent.UncheckedExecutionException: com.snaplogic.api.ExecutionException: Unable to open schema file: ./jschema/src/test/resources/schema/com-snaplogic-snap-template_2.schema
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2207)
at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
at com.snaplogic.schema.validator2.SchemaRegistry.lookup(SchemaRegistry.java:105)
at com.snaplogic.data.model.SnapDataFactory.loadSchema(SnapDataFactory.java:223)
at com.snaplogic.data.model.SnapDataFactory.loadSchema(SnapDataFactory.java:231)
at com.snaplogic.data.model.SnapDataFactory.createSnapDefinitionData(SnapDataFactory.java:116)
at com.snaplogic.snap.schema.SchemaService.describe(SchemaService.java:106)
at com.snaplogic.snap.test.harness.SnapExecutor.initFixtures(SnapExecutor.java:279)
at com.snaplogic.snap.test.harness.SnapExecutor.(SnapExecutor.java:253)
at com.snaplogic.snap.test.harness.SnapTestRunner.withSnapExecutor(SnapTestRunner.java:200)
at com.snaplogic.snap.test.harness.SnapTestRunner.methodBlock(SnapTestRunner.java:192)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: com.snaplogic.api.ExecutionException: Unable to open schema file: ./jschema/src/test/resources/schema/com-snaplogic-snap-template_2.schema
at com.snaplogic.snap.schema.TestSchemaSource.lookupSchema(TestSchemaSource.java:56)
at com.snaplogic.schema.validator2.SchemaRegistry$1.load(SchemaRegistry.java:64)
at com.snaplogic.schema.validator2.SchemaRegistry$1.load(SchemaRegistry.java:61)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
… 32 more
Caused by: java.io.FileNotFoundException: .\jschema\src\test\resources\schema\com-snaplogic-snap-template_2.schema (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:93)
at com.snaplogic.snap.schema.TestSchemaSource.lookupSchema(TestSchemaSource.java:53)
… 38 more

And I can see logs , the schemas are generated but in the different location,

[WARNING] Run mvn clean before packaging. Directory still exist and may contain stale data: C:\Applications\REACT4\snaplogic-snappack\target\schema
[INFO] Initializing e-lang version: {initTime=2018-08-07T10:01:30.006Z, langVersion=4.0-tahoerc12}
[INFO] Found lint com.snaplogic.expression.methods.object.HasOwnProperty.INVALID_VALUE; ordinal=0
[INFO] Found lint com.snaplogic.expression.methods.object.HasOwnProperty.NULL_VALUE; ordinal=1
[INFO] Found lint com.snaplogic.expression.methods.date.DateMethod.JSON_FORMAT_ARG; ordinal=2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2
[INFO] Successfully compiled schema: com-snaplogic-snap-template_2

12 REPLIES 12

dmiller
Former Employee

Development recommends that you try:

mvn -U clean install


Diane Miller

chenry
Former Employee

Thanks @dmiller ! Yes, the -U should force the update of your dependencies. It could be that either the Snappack Installer dependency that you have in your local repository is not compatible, or platform dependencies, or (very likely due to what I now see in the Stack trace) the Platform Jschema dependency may be incompatible. If you build with -U and force all of the dependencies to be analyzed, and re-downloaded, that should hopefully resolve the issue.

Thanks all,
-Charlie

Harriesh
New Contributor III

I still getting the same issue. I am attaching the POM pom.zip (3.2 KB)

Harriesh
New Contributor III

If I get a custom snap which is working fine. I can use that as well. The code for demosnap looks like old dependencies.