当我运行Junit测试并且失败时,如果堆栈超长,Intellij总是用“... x更多”将其剪掉。如何让IntelliJ显示整个堆栈跟踪?
Caused by: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:38)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:526)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:257)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 54 more
Process finished with exit code 255
答案 0 :(得分:1)
我认为,“ ... x更多”消息仅在您具有由上一个异常包装的异常时出现。这意味着初始异常的后x行与异常导致的x行丢失相同。它与IntelliJ无关。 jvm避免重复跟踪信息,因为它不提供新信息。