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
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
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
My maven project has the following dependencies:
all of them are in the lib dir of MyWebappCode:> 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
in webapp-lib, there is:
Do you mean that jdbc file? And I should move it to my webapp?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
Cheers,
Jan
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.
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
Here it is:
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".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
My jdbc driver "postgresql_jts" is defnetly only in the postgis-jdbc-jts jar.
Thanks, Jan
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
@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
@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.
Please give our new 1.0.0.RELEASE a spin -- this should work fine on all platforms.