15

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
HappyCoder86
  • 2,267
  • 3
  • 25
  • 40
  • 3
    I think it is not a problem with IntelliJ but a "feature" of the JVM. Consult [this answer](http://stackoverflow.com/a/4548624/1350762) for more information. – maba Jun 20 '13 at 17:14
  • Perhaps you can handle exceptions in a special way - does JUnit provide a way to do this? – vikingsteve Jun 21 '13 at 07:01
  • Put a breakpoint on the Exception and run the test in Debug mode? – vikingsteve Oct 02 '17 at 12:19
  • Possible duplicate of [Print full call stack on printStackTrace()?](https://stackoverflow.com/questions/1043378/print-full-call-stack-on-printstacktrace) – Cypher Dec 28 '18 at 00:48

1 Answers1

2

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

hce
  • 1,107
  • 9
  • 25