5 Replies Last post: Mar 21, 2010 10:53 PM by Simon Knott  
Mark Vedder Novice 412 posts since
Dec 10, 2003
Currently Being Moderated

Mar 19, 2010 7:31 PM

Thank you JetBrains & IntelliJ IDEA: you just saved me hours of frustration

I've been using IDEA of 6 years now. Even so, I am still amazed and appreciative of the little touches in it. One such feature just saved me what would have likely been hours, if not a full day, of frustration. And it is a seemingly simple feature that would likely not even get discussed in a typical battle of the IDE's discussion.

 

I added a Servlet definition to my web app and ran it in my local Tomcat through IDEA. I received a ClassNotFoundExcpetion. But thanks to IDEA's extra little touch, I was able to quickly see why the class was not found:

 

Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/generic/GenericBeanFactoryAccessor
     at org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.determineUrlsForHandler(DefaultAnnotationHandlerMapping.java:113) [spring-webmvc-2.5.6.SEC01.jar:2.5.6.SEC01]
     at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:79) [spring-webmvc-2.5.6.SEC01.jar:2.5.6.SEC01]
     at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:57) [spring-webmvc-2.5.6.SEC01.jar:2.5.6.SEC01]
     at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119) [spring-context-3.0.1.RELEASE.jar:3.0.1.RELEASE]
     at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:71) [spring-web-3.0.1.RELEASE.jar:3.0.1.RELEASE]
     at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) [spring-context-3.0.1.RELEASE.jar:3.0.1.RELEASE]
     at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:99) [spring-context-3.0.1.RELEASE.jar:3.0.1.RELEASE]
     at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:82) [spring-context-3.0.1.RELEASE.jar:3.0.1.RELEASE]
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394) [spring-beans-3.0.1.RELEASE.jar:3.0.1.RELEASE]
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1396) [spring-beans-3.0.1.RELEASE.jar:3.0.1.RELEASE]
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) [spring-beans-3.0.1.RELEASE.jar:3.0.1.RELEASE]

 

Without IDEA's feature added notation of what libraries the various classes in the stack trace were coming from, I would not have so easily noticed that a spring 2.5.6 jar was being pulled into my spring 3.0.1 based project. With a standard stack trace, I would have been trying to figure out why the missing class was not being found in the spring-beans-3.0.1.RELEASE.jar which was clearly in my class path. But upon seeing that 2.5.6 library notated, a quick look at the maven dependency tree allowed me to add an <exclude> element to the dependency declaration for another library to stop it from pulling in the 2.5.6 jar (Maven was not auto detecting this since Spring significantly reworked their distribution files in Spring 3 and there is no spring-webmvc jar in Spring 3). Thanks to IDEA, I solved an issue in 5 minutes that would have likely frustrated me for hours otherwise.

 

When people ask me why I am willing to pay for IntelliJ IDEA when there are a couple of free alternatives, I will add this anecdote to the list of many I tell. In a matter of minutes today, IDEA paid for itself a dozen times over. Thanks IDEA. Thanks JetBrains. And thanks to the JetBrains developer that thought up this feature. 

Simon Knott Novice 447 posts since
Sep 9, 2002
Currently Being Moderated
Mar 20, 2010 1:08 AM in response to: Mark Vedder
Re: Thank you JetBrains & IntelliJ IDEA: you just saved me hours of frustration

Woah, what release of Idea are you using? I'm not seeing that extra detail and it's an awesome feature!

Cristian Vasile Mocanu Newbie 16 posts since
Feb 12, 2009
Currently Being Moderated
Mar 21, 2010 1:52 AM in response to: Mark Vedder
Re: Thank you JetBrains & IntelliJ IDEA: you just saved me hours of frustration

IntelliJ is indeed very productive.

 

But that looks like a slf4j/logback stacktrace and it probably has nothing to do with IntelliJ...

Simon Knott Novice 447 posts since
Sep 9, 2002
Currently Being Moderated
Mar 21, 2010 10:53 PM in response to: Mark Vedder
Re: Thank you JetBrains & IntelliJ IDEA: you just saved me hours of frustration

It was still really useful to me, if that helps I'll be checking out LogBack on Monday...

More Like This

  • Retrieving data ...