When I run a Junit test and it fails, if the stacktace is super long, Intellij always cuts it off a the end with "... x More". How can I make IntelliJ show the entire stacktrace?
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
on the Test Runner toolbar. If you haven't run any tests yet, and the tool window with the Test Runner toolbar is not available, press Ctrl+Shift+A and type Import Tests from File . In the dialog that opens, select the . xml file with test results and click Open.
Just use new Throwable(). printStackTrace() method and it will print complete stack trace from where a method is called, into the console.
I think, the "... x more" message occurs only when you have exceptions which are wrapped by the previous exception. it means that the last x lines of the initial exception are the same as x lines missing in the caused by exception. It has nothing todo with IntelliJ. The jvm avoids repeating the trace info, as it does not provide new info.
see also this answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With