Announcement Announcement Module
No announcement yet.
JDBC Trace is STILL not visible in Spring Insight 1.5.1.SR2 (20110705095346) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBC Trace is STILL not visible in Spring Insight 1.5.1.SR2 (20110705095346)

    This is a long time issue and is just not getting resolved. I am still not able to see JDBC trace when I drill down.

    I did this -

    1) Downloaded the latest vfabric-tc-server-developer-2.6.1.RELEASE
    2) Configured it in STS
    3) Configured insight

    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

    it does not work !


  • #2
    I could finally do this (now except for 'go to source' option) but I must say that if at some place you folks could put the instruction better it would be so nice.

    not sure if anyone is following this thread but i got my hints from -

    1) youtube vidoes on spring insight
    2) some suggestions on JIRA
    3) I read old threads once again

    if any one is interested , I can tell step by step stuff of how I could so that. let me know.

    - gary


    • #3
      hey Gary, it would be very helpful for me if you post detailed instructions on how to "enable" this.

      My application is implemented with Ibatis and have tried many things without sucess.




      • #4
        Dude, bad forum etiquette. Don’t post "I solved it!" and then never tell anyone your solution. Very frustrating for us posterity folk.

        That being said...

        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).

        STS tc server version 2.9.0.M1 (with Eclipse 3.7.1)
        Insight version 1.5.1.SR2
        JDK 1.7.0_02
        Latest MySQL
        Running on Win2008

        I did get it working after many frustrating hours of research. The key was JAR placement. More details at bottom...

        Here are the key links of information I found (based on Gary's hint suggestion above):

        Youtube video: SpringSource Spring Insight 1.0 Demo

        This post on Spring's JIRA sight:
        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).
        This post from this forum: no jdbc analysis with spring+jdo+postgres?
        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.

        For JDBC
        • mysql-connector-java-5.1.18-bin.jar
        For JNDI (using tomcat 7 jdbc-pool)
        • tomcat-jdbc.jar (found in C:\home\tcserver\vfabric-tc-server-developer-2.6.3.RELEASE\tomcat-7.0.23.A.RELEASE\lib)
        • mysql-connector-java-5.1.18-bin.jar

        For JNDI, I also placed my context.xml config in the META-INF folder. not sure if this matters.

        I did not have to make any other special configurations within my project.
        After I placed the JAR files within the WEB-INF/lib folder, JDBC traces in insight started working.

        As for the 'go to source' option, I noticed that it only worked if I used Eclipse's internal web browser. Using Chrome, the 'go to source' links did not show up.

        I hope this helps people that run into this same issue.



        • #5
          I had the same prolem with no JDBC trace shown in detail. Filter only has Web.

          My war file includes the ojdbc.jar and all the dao classes. And the TC Server with Insight is 2.7 version. I can only see the http request and response in the detail. I don't see JDBC trace.

          Anyone has any suggestions?



          • #6

            What's your Spring Insight version? and what JDK are you on?