简体   繁体   English

运行Arquillian Chameleon测试时Snakeyml异常

[英]Snakeyml exceptions when running Arquillian Chameleon tests

When running a test using Arquillian Chameleon in Windows, I get the following exception: 在Windows中使用Arquillian Chameleon运行测试时,出现以下异常:

java.lang.IllegalStateException: Could not setup chameleon container
Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.constructor.Constructor

How can I fix this? 我怎样才能解决这个问题?

I'm answering this one myself because it was a simple fix to an odd problem. 我自己回答这个问题,因为它是解决一个奇怪问题的简单方法。

I have Windows 10, and was running Maven from the WLS Bash shell. 我有Windows 10,并且从WLS Bash shell运行Maven。 Under bash, Maven worked great and the tests ran as expected. 在bash的推动下,Maven表现出色,并且测试按预期进行。 But when I ran the tests in Powershell or from an IDE like IntelliJ, I got that exception. 但是,当我在Powershell或IntelliJ之类的IDE中运行测试时,却遇到了异常。

The solution was to do a mvn clean , after which I could run the tests in Windows again. 解决的办法是执行mvn clean ,之后我可以再次在Windows中运行测试。 Obviously there is some incompatibility between files created under a Bash shell and those used in a Windows environment, so you can't just swap between the two. 显然,在Bash shell下创建的文件与Windows环境下使用的文件之间存在一些不兼容,因此您不能仅在两者之间进行交换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM