Eclipse STS Trivial Configuration
Lately i was using eclipse STS to develop some information system, after a long time using netbeans, using STS is so much painful for me.
Yes eclipse STS fan boy can hate me, hatters gonna hate after all … 😛
In netbeans some trivial things like deployment process using eclipse, synchronized source in tomcat, auto deploy, maven configuration, and another deployment issues in tomcat, are never occur when i was using netbeans
That kinds of trivial thing some time are so painful, you must configure it so you will have good sleep at night.😀 , in the netbeans this kind of configurations are the default configuration, and i can say that netbean have improve so much than STS, it more easier develop using netbeans😛. You can focus on development rather get confused by configure your IDE to behave like you want to.
this are some STS issue that sometime occur when i was using it for development.
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4909) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
this error occur because your maven dependency or your libs that manage by maven didnt included in tomcat deployment. here the solution :
right click in your project, properties – deployment assembly : add java build path entries – maven dependencies – finish.
refresh your poject, re-build , clean your tomcat resources to make sure it will deploy your new source (right click in tomcat server – clean), after that run your project in tomcat server.
another error is un-synchronized source in your tomcat server when you trying to deploy it. i spent more than an hours facing this kind of issue, i try to clean the project using maven, clean – build project in STS, rebuild and clean tomcat resources for many times.
this probably occur because STS didnt refresh the resources in workspace and tomcat when the project rebuild in STS or netbeans.
the solution you must configure STS to automatically refresh the resources, go to preferences – workspace : checklist this options :
- build automatically
- refresh using native hooks or pooling
- refresh on access
- save automatically before build
and another tricks is when you have many resources file like CSS or java script you must configure STS memory more than the default memory, just change memory size in STS.ini in your STS installation location :