简体   繁体   中英

Cannot run junit tests in IntelliJ

I am trying to run some junit tests within Intellij 14 on Windows 7. I have run these tests before, many many times, without issue.

Yesterday, I started getting the error on SOME tests only:

java.lang.SecurityException: sealing violation: package xxx is sealed

I cannot google up a satisfactory answer to this. I initially thought it was something odd that suddenly went wrong in intellij 15, so I reverted back to 14 (cleaned up the settings folder too) but same issue.

Same tests, run from Linux using an ant script and the same jar file run just fine.

What does this error mean and what must I do to fix it?

It sounds like you could have a class that is being packed into multiple jar. Do you have a production jar and maybe a test jar which share some class between them?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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