当我在使用 H2 数据库的 NetBeans 中运行或调试单元测试时,我得到一个 StackOverflowError:
...
Caused by: java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.h2.command.Command.executeUpdate(Command.java:230)
at org.h2.command.CommandList.update(CommandList.java:44)
at org.h2.command.CommandList.executeRemaining(CommandList.java:39)
at org.h2.command.CommandList.update(CommandList.java:45)
at org.h2.command.CommandList.executeRemaining(CommandList.java:39)
at org.h2.command.CommandList.update(CommandList.java:45)
at org.h2.command.CommandList.executeRemaining(CommandList.java:39)
at org.h2.command.CommandList.update(CommandList.java:45)
at org.h2.command.CommandList.executeRemaining(CommandList.java:39)
at org.h2.command.CommandList.update(CommandList.java:45)
at org.h2.command.CommandList.executeRemaining(CommandList.java:39)
at org.h2.command.CommandList.update(CommandList.java:45)
at org.h2.command.CommandList.executeRemaining(CommandList.java:39)
at org.h2.command.CommandList.update(CommandList.java:45)
at org.h2.command.CommandList.executeRemaining(CommandList.java:39)
... ETC
当我从 ant 运行完整的单元测试时,我没有问题。从 IntelliJ 运行单个单元测试也可以正常工作。
帮助表示赞赏。请不要回答“切换到 IntelliJ”之类的问题,我想继续使用我最喜欢的 IDE。