This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

JDBC Trace is STILL not visible in Spring Insight 1.5.1.SR2 (20110705095346)Page Title Module

All this is 10 mins job and insight comes up, my web app is deployed BUT we still can't see the JDBC stack.

I would request the insight team that before they suggest anything, please do ccheck how many folks have raised this issue and please do not suggest the same old moving jars, commenting -Daspectj.overweaving=true etc etc

I had the same issue. When I published my app to the SpringSource tc Server v2.1 (in eclipse – i.e. STS) JDBC tracing was not showing up in insight – I only got the http GET information as Gary described. I tested both a basic JDBC connection with mysql J connector, as well as JNDI using Tomcat 7 jdbc-pool (not the commons-dbcp).

The issue is not really related to JNDI, but actually related to the location of the jars. Jars which are not packaged with the webapp are processed slightly differently than those in tcserver-instance/lib (the usual location of JDBC drivers for use in JNDI).

Spring Insight uses AspectJ to weave the classes available inside your WAR to collect metrics about the applications execution. Since only classes inside the WAR are woven, if a class is provided from the server's lib directory or the JRE, it will not be woven.

For your situation, any class that makes calls to java.sql.Statement or PreparedStatment, need to be located inside the WAR in order for the Insight instrumentation to collect the SQL query.

You mentioned previously that you are using datanucleus with JDO. I don't see any of the datanucleus JARs in the list you provided.

In general, if all the dependencies are inside the WAR, everything will pickup automatically.

My solution
I placed the JARs in the WEB-INF/lib folder of my project. i.e. physically drag and drop the jar file from your desktop into the WEB-INF/lib folder in Package Explorer. This will force eclipse to include the JARs in the WAR file as it publishes it to the SpringSource tc server.