Using a Karate standalone error is produced when trying to use internal java class
See original GitHub issueWhen executing karate standalone as a mock server error is produced when trying to load internal Java class:
Caused by: com.intuit.karate.KarateException: js failed:
>>>>
01: Java.type('example.QueueUtils')
<<<<
org.graalvm.polyglot.PolyglotException: TypeError: Access to host class example.QueueUtils is not allowed or does not exist.
- <js>.:program(Unnamed:1)
mock.feature:4
This is on latest Karate version 1.1.0.
I am reporting it after trying to use the suggested solution from @ptrthomas :
https://stackoverflow.com/questions/58398742/unable-to-use-readclasspath-when-running-tests-with-standalone-karate-jar/58398958#58398958 and still receiving the same error.
Execution command from inside ‘example’ folder: java -cp karate.jar:. com.intuit.karate.Main "$@" -m mock.feature
I am adding reproducible example for the behavior (the Karate jar file is not include so the size of the archive can stay low). example.zip
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
problems when loading custom compiled JAVA class ... - GitHub
Hi, I am working on the server side karate, and I have problems when dealing with the java class. With in the "karate/karate-demo/src/test/java/ ......
Read more >karate framework graphql error on standalone [duplicate]
I have a simple graphql which works well in the maven build but getting error when executed as a feature file with the...
Read more >Karate | Test Automation Made Simple.
And you don't need to create additional Java classes for any of the payloads that you need to work with. Index. Start, Maven...
Read more >Eclipse IDE: Create and Run Your First Java Project
This Step By Step Tutorial Explains How to Create a New Java Project and Run It as a Java Application in the Eclipse...
Read more >Tutorial: Debug your first Java application | IntelliJ IDEA ...
You have created and run your Java application. Let's imagine you have discovered that it functions not the way you expected.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ChavdarEmilovPagoNxt it gets complicated when you mix java, that’s all. many teams are using karate mocks without maven because normally you need only one or two text files. I suggest work with someone who knows Java and Maven well. it is possible to even start karate mocks on a common server for everyone to use, but figuring out how to do that is up to you. maybe Docker is something else you should consider.
@ptrthomas thank you! I maybe check it in the future but it is not necessary for the project at this time and there are other priorities…