PDA

View Full Version : Running tc-Server/Spring Insight with Sysdeo Tomcat plugin in Eclipse



akm
Aug 12th, 2010, 03:50 PM
Hi,

I was able to deploy a servlet based application in tcServer and see Spring Insight in action and it was super cool (to see JDBC level drill downs with SQL).

Now, I am trying to configure tcServer (springsource-tc-server-developer-2.0.2.SR01) to work with Sysdeo Tomcat plugin that I use in Eclipse. I am able to start the app and see HTTP req/response details in the Insight dashboard, but I don't get JDBC/SQL call details.

While comparing the two log files, I noticed that standalone tcServer log has these lines in the beginning -


28-Jun-2010 11:55:26.506 INFO com.springsource.insight.tcserver.WeavingHelper.fi ndRepositoriesForClassPath
file:/Users/springsource_tomcat/springsource-tc-server-developer/spring-insight-instance/insight/collection-plugins/insight-collection-1.0.0.M3.jar:
aspects will be woven into the main Tomcat classloader
28-Jun-2010 11:55:26.508 INFO com.springsource.insight.tcserver.WeavingHelper.fi ndRepositoriesForClassPath
file:/Users/springsource_tomcat/springsource-tc-server-developer/spring-insight-instance/insight/collection-plugins/insight-plugin-jdbc-1.0.0.M3.jar:
aspects will be woven into the main Tomcat classloader
28-Jun-2010 11:55:27.237 INFO com.springsource.tcserver.security.PropertyDecoder .<init> tcServer property decoder has been initialized.
28-Jun-2010 11:55:27.737 INFO com.springsource.tcserver.serviceability.rmi.JmxSo cketListener.init Started up JMX registry on 127.0.0.1:6969


but the log for tc-Server started with Sysdeo plugin doesn't have first two WeavingHelper messages.



Aug 12, 2010 4:08:30 PM com.springsource.tcserver.security.PropertyDecoder <init>
INFO: tcServer property decoder has been initialized.
Aug 12, 2010 4:08:31 PM com.springsource.tcserver.serviceability.rmi.JmxSo cketListener init
INFO: Started up JMX registry on 127.0.0.1:6969


Is it because insight-bootstrap-tcserver-1.0.0.M3.jar seems to tweak/override org/apache/catalina/loader/StandardClassLoader.class and with DevLoader.jar that Sysdeo plugin uses, it is no longer effective?

Or is there a configuration/file that I am missing?

Thanks
Abhay

jtravis
Aug 12th, 2010, 03:58 PM
Your assessment is correct. Insight overrides the StandardClassLoader from Tomcat to weave things outside of the webapp classloader.

Getting that loader in your classpath would probably end up fixing this for you.

On another note, have you tried STS for doing Tomcat development? It is basically Eclipse + a bunch of nice Spring integration (including Insight). It has capabilities for starting / stopping tomcat, debugging it, etc.

akm
Aug 13th, 2010, 08:08 AM
Thanks! I was able to get insight-bootstrap-tcserver-1.0.0.M3.jar to load before other stuff and now I do see those two lines in the log. However, I still don't get JDBC call drill-downs. Is there a way to produce more logs and see what is going on?

About STS, I have used it in other projects and it works fine. However, when you have many Eclipse projects rolling up to the main-application, I couldn't figure out a way to configure it so that it picks up the right classpath from projects in my workspace. If there is a way to achieve this, I'd be more than happy to use it.

Thanks again!