I hit a bug in Idea 2016.1.2 that I wanted to share in case anyone else is hitting the same issue. I was trying to stand up a new Spring Boot project last week and when I what try to launch the app through the IDE the embedded tomcat server would throw an exception.
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at com.chooseenergy.auth.AuthApplication.main(AuthApplication.java:14) [classes/:na]Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:185) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:158) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
... 8 common frames omitted
The weird thing was if I ran the maven spring-boot:run plugin the app ran perfectly. I did all sorts of things with no luck to work around it. I starting worrying about it, thinking if I can’t find a solution to this, it is going to be hard to sell using Spring Boot for our Microservices in my new role as we can’t even properly debug them. Finally after no luck I opened a bug against Idea over here. As is often the case, just the simple act of reporting the bug gets me thinking about possibilities and I solved the issue before I heard back from JetBrains. It turns out that the provided scope is broken in Idea and by default the
spring-boot-starter-tomcat is marked scope provided in the generated maven pom file from the Spring Boot Initializer. As soon as I removed the provided scope Idea got happy. Jetbrains later updated the ticket as a duplicate of a bug with provided scope not working. So if you see that stack trace in Idea try removing the provided scope to work around it.
This is sort of old news now, but I haven’t had a chance to weigh in yet so I figured I would type my thoughts up anyway. On September 3rd Jetbrains announced a new licensing model. As you can imagine people immediately went crazy on twitter and 15 years of developer goodwill went up in smoke. What is the issue with the new model, the biggest problem with it is that they are moving from a perpetual model where you own that version of the IDE to a rental model ala Adobe where if you stop paying your tools stop working. Even more infuriating they came out like this was doing a favor for their developers and making it cheaper. In reality it only really makes it cheaper if you are say a consulting shop that is often switching between say pycharm, webstorm and idea. Then you can save some money over the cost of 3 perpetual licenses. For pretty much everyone else it is much worse.
As soon as they saw all of this blowing up they quickly came up with another response. In the comments of the 2 articles they argued that they were giving a lower price to the current customers with a perpetual license. That isn’t exactly true. If I am a customer that as soon as my license expires I renew it can be true for a year at least as they are only guaranteeing that license price for the first year. So assuming they kept the new lower price it would be an $89 a year update to IDEA instead of $99 the current price. But for new customers the renewal is $119 for a promotional price before January and then it goes to $149 a year which is much more expensive than the current model ($199 for a personal license and $99 for an upgrade).
Another way this fails vs the current model is if I buy a license and then say an upgrade for a few years and then I am short on money I can continue to use my old version without updates as long as I want. In the new model as soon as I stop paying the software is gone. So it really does feel like owning a license to that version of the software vs renting the software.
We switched to Idea at work a little over a year ago. In that time I fell in love with that product. It really is the best IDE I have ever used. I was such a fan that when they had the save 20% sale for the 20 years of Java I decided to buy a personal license to mess around with at home. In my home use case I don’t use the tool a ton. A couple of times a month I will use it to play around with an idea I have or to experiment with some idea or technology that I may use in the future at work. But given that I make no money with it at home and it is just something to toy with I have the option when it expires to not renew for a few years and just use the tool as I do now. Unfortunately with the new licensing model Jetbrains takes that away from me. If I don’t keep paying for it monthly I don’t get to use it. I can’t justify a monthly bill for what is effectively something I just play around with when I am bored. If there is no perpetual model going forward I will use the license I have now until it doesn’t work for me anymore (probably when Java 9 comes out next year) and then I will go back to Netbeans.
Thinking about it at a professional level, at this point I was ready to advocate for the environment in any company I was working for. I truly believe their tools are better. But at the same time I don’t want to see a business I am working for held hostage by their tools. It feels like a cross between dealing with Adobe (for their monthly subscriptions) and Oracle who would allegedly threaten businesses with a license audit if one believes what they read on the internet. So on the one hand I am tempted to say we should immediately upgrade our licenses at work before the switch so we can kick the can down the road for another year before we have to make a decision on it. And on the other hand that sort of feels like rewarding them for the betrayal to the developers when they get all those license fees for everyone trying to keep their perpetual license a bit longer. Will I recommend that we stay on it if our only choice is subscription? Given what I have seen so often with corporate budgets being frozen for a period of time I would have a hard time recommending a tool that may stop working for us because we are in a spending freeze.
So I am not sure what to do, what I can say is if they don’t have a perpetual model they have probably lost me as a customer forever.
I came across this blog post today which is the best thing I have read. Basically it is just a short cut list for the best different navigation features in IntelliJ. I didn’t know most of these and they are huge time savers so I wanted to share in case people missed the original post which was amazing.