Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: no jdbc analysis with spring+jdo+postgres?

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    24

    Default no jdbc analysis with spring+jdo+postgres?

    Hi,

    What does spring insight need in order to display the jdbc response times? I can find the transaction / service method calls but I cannot inspect the jdbc times. My app uses spring 3, postgresql and jdo (datanucleus).

    Cheers,

    Jan

  2. #2
    Join Date
    Feb 2008
    Location
    Nashua, NH
    Posts
    78

    Default

    This is a fairly common issue. Odds are the JDBC driver your using is located in the server's lib directory. Try moving it into the webapp's lib directory.

    While running with a JDBC driver inside a WAR is not recommended for a production application, it's ok at development time. We're looking to address this issue in an upcoming release.
    Scott Andrews

    Software Engineer, Web Products Team
    SpringSource

  3. #3
    Join Date
    Nov 2009
    Posts
    24

    Red face

    My maven project has the following dependencies:
    Code:
    > mvn dependency:tree | grep jdbc
    [INFO] |  |  |  |  +-org.springframework:org.springframework.jdbc:jar:3.0.0.RELEASE:compile
    [INFO] |  |  |  +- org.postgis:postgis-jdbc:jar:1.1.5:compile
    [INFO] |  |  |  +- org.postgis:postgis-jdbc-jts:jar:1.4.1komoot:compile
    [INFO] |     |  |  +- org.geotools:gt-jdbc:jar:2.6.0:compile
    [INFO] |     |  +- postgresql:postgresql:jar:8.3-603.jdbc3:compile
    all of them are in the lib dir of MyWebapp

    in webapp-lib, there is:
    Code:
    # ls
    insight-jdbc-1.0.0-SNAPSHOT.jar  insight-springcore-1.0.0-SNAPSHOT.jar  insight-springtx-1.0.0-SNAPSHOT.jar  insight-springweb-1.0.0-SNAPSHOT.jar  spring_insight_collection-1.0.0-SNAPSHOT.jar
    Do you mean that jdbc file? And I should move it to my webapp?

    Cheers,

    Jan

  4. #4
    Join Date
    Nov 2009
    Posts
    24

    Question

    Ok, I have to adjust my previously made observations. Indeed, Spring insight can inspect JDBC calls - but not mine. Only the "startup jdbc calls" made by datanucleus are recorded. Mine, however, are not available. See the attached screenshot.

    EDIT: Link to the image

    Do I need special annotations or how does it work with spring? I use the
    org.springframework.orm.jdo.TransactionAwarePersis tenceManagerFactoryProxy which wraps the org.datanucleus.jdo.JDOPersistenceManagerFactory in case this matters.

    Cheers,

    Jan
    Last edited by jtheuer; Jan 29th, 2010 at 06:12 AM.

  5. #5
    Join Date
    Feb 2008
    Location
    Nashua, NH
    Posts
    78

    Default

    You shouldn't need to do anything special. It's a good sign that you see some of the initial queries, that means Insight is up and running properly and it's able to detect something.

    Just for my own sanity, can you confirm that the DataNucleus and JDBC jars are located in the WAR (ie. WEB-INF/lib)?
    Scott Andrews

    Software Engineer, Web Products Team
    SpringSource

  6. #6
    Join Date
    Nov 2009
    Posts
    24

    Default

    Quote Originally Posted by sandrews View Post
    Just for my own sanity, can you confirm that the DataNucleus and JDBC jars are located in the WAR (ie. WEB-INF/lib)?
    Here it is:
    Code:
    gt-jdbc-2.6.0.jar
    insight-jdbc-1.0.0-SNAPSHOT.jar
    org.springframework.jdbc-3.0.0.RELEASE.jar
    postgis-jdbc-1.1.5.jar
    postgis-jdbc-jts-1.4.1.jar
    postgresql-8.3-603.jdbc3.jar
    How does insight work? I'm nor sure if for example the gt-jdbc-2.6.0.jar should be in the classpath, I don't really need it, it is just one of the "transitive dependencies".
    My jdbc driver "postgresql_jts" is defnetly only in the postgis-jdbc-jts jar.

    Thanks, Jan

  7. #7
    Join Date
    Feb 2005
    Posts
    13

    Thumbs up JDBC Analysis with JDBC Driver located in servers lib directory

    Quote Originally Posted by sandrews View Post
    This is a fairly common issue. Odds are the JDBC driver your using is located in the server's lib directory. Try moving it into the webapp's lib directory.

    While running with a JDBC driver inside a WAR is not recommended for a production application, it's ok at development time. We're looking to address this issue in an upcoming release.
    Hello,
    would be great if it will be possible to use JDBC driver located in the server's lib directory. Because I canīt use JNDI lookup when moving the JDBC driver to the webapp's lib directory and have to provide a different dataSource config in Spring-ApplicationContext.

    Is there a roadmap when you plan to provide this feature?

    Best reagards
    Saemmy

  8. #8
    Join Date
    Feb 2008
    Location
    Nashua, NH
    Posts
    78

    Default

    @saemmy

    Have you tried Milestone 3? It supports JDBC drivers in the server lib. Let us know if you still have issues.
    Scott Andrews

    Software Engineer, Web Products Team
    SpringSource

  9. #9
    Join Date
    Feb 2005
    Posts
    13

    Default

    @sandrews

    Yes, I tried Spring Insight 1.0.0.M3.SR02 but nothing changed. I copied oracle10g.jar into tcServers\lib and in my webapp I use Hibernate and JNDI to access the datasource.

    The analysis of SQL is still missing.

  10. #10
    Join Date
    Oct 2009
    Posts
    55

    Default

    Please give our new 1.0.0.RELEASE a spin -- this should work fine on all platforms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •