cancel
Showing results for 
Search instead for 
Did you mean: 

JUnit Unable to open schema file

johnbilay
New Contributor II

Dear experts

We have an issue with Jtest in our snaps development.
While running Junit testing it seems that I cannot open a specific schema file which is called com-snalogic-snap-template_2 and I cannot find this file in the project. We tried Jtest with the example snaps’ Jtest classes as well. Then I got the same error as shown below:
Any idea on how to solve this issue?

2018-11-20 15:13:44 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/tesWe have an issue with Jtest in our snaps development.
Firstly, My Junit testing is just fine, as I can run Jtest to other non-snaplogic maven projects. It seems like that I cannot open a specific schema file which is called com-snalogic-snap-template_2 and I cannot find this file in the project. We tried Jtest with the example snaps’ Jtest classes as well. Then I got the same error as shown below:
So you may be have an idea of how to solve this issue?

2018-11-20 15:13:44 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)

error_junit
t/resources/schema/com-snaplogic-snap-template_2.schema
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2207)

Kind regards
JB

4 REPLIES 4

aanderson
New Contributor II

I ended up copying the .schema files in the schema directory of the .m2\repository\com\snaplogic\tools\snappack-installer\4.9.0.M1\snappack-installer-4.9.0.M1.jar archive to the directory the test runner complains about the missing files, jschema/src/test/resources/schema, where jschema is at the base directory where the pom.xml file is located. After copying these files over my JUnit test cases ran with the SnapTestRunner ran successfully. Hopefully in the next SnapLogic release this issue will be fixed and the schema files will be loaded through the classpath like what was probably intended.

robin
Former Employee

@aanderson @johnbilay do you have $SL_ROOT defined?

aanderson
New Contributor II

Hi @robin , I am performing my snappack development and JUnit testing on an external laptop with the hopes of building the snappack and deploying to the GroundPlex through the manager application. I don’t have direct network access to the GroundPlex which is necessary to perform local development on it.

ayush_vipul
New Contributor III

Hi @robin

I am getting this issue.

can you suggest me a solution.

regards
Ayush