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

Harriesh
New Contributor III

Harriesh
New Contributor III

I am getting build error .

so i updated <japi.version>4.9.0.M1</japi.version> , after that I am getting the same error

del
Contributor III

Harriesh, I recommend starting over. Rename your .m2 folder and your SNAP_HOME folder and reinstall. Also, make sure you follow the install instructions precisely at http://developer.snaplogic.com/#snap-maven-archetype (including versions numbers) . Initially, I made the mistake of trying to version-up the Maven Archetype Plugin version to 3+ and it messed me up; so I learned I needed to follow the documentation exact and install the recommended version 2.4 to resolve.

I hope this helpsโ€ฆ

@robin made an update to the DemoSnapPack.


Diane Miller
Community Manager

Hi Dmiller,
I would like to learn how to develop the custom snaps or adding some functionality in the existing snap. How do I learn from the basic as beginner to Snap Logic Developer.
Regards
Kumar