Announcement Announcement Module
Collapse
No announcement yet.
Spring Insight outside of tc server? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Insight outside of tc server?

    Spring Insight looks incredible. We're using the Spring stack but not running on tc server. Should it be possible for me to explicitly pass the right jvm parameters to add SI instrumentation on WebSphere 6.1 (jdk 1.5 based)?

    Thanks,

    Stu

  • #2
    You won't be able to use it outside of tc Server for the time being. We rely on Tomcat's classloader for a few of our tricks.

    Comment


    • #3
      Thanks for the quick response. It saved me from wasting time trying to get it to work.

      Is that something you see SI moving towards at some point in the future, or is the vision that this would be a part of the value of using tc?

      Comment


      • #4
        I wouldn't rule it out in the future, as we want people who are writing Spring applications to have this valuable tool irrespective of how it's deployed. However, at this time we are focusing our energy on the Tomcat container -- specifically tc Server. As you can imagine, it makes our death matrix much smaller which allows us to move much more quickly.

        Are you not able to try your app out on tc Server? What ties you to websphere?

        Comment


        • #5
          Makes sense, and you guys are certainly moving quickly.

          The apps I'm interested in for this are EARs, fairly integration-heavy with plenty of JNDI stuff configured in WebSphere already. Ideally we'd be able to just run them on tc, but I suspect this would be quite a bit of work in reality.

          Comment


          • #6
            Any plans for Spring Insight profiling OSGi-based apps?

            We've generally been using Jamon with Spring-injected timing aspects for high level performance data. We're looking seriously at OSGi for future apps, and I suspect that approach will hit problems, as I think Jamon holds it's data within a single classloader. Works great in JEE, but what about when there are many bundles and each with it's own classloader? I need to dig to see if this is really a problem, but that's my hunch.

            SI looks like it holds timing info in it's own WAR, and gathers data in the target by instrumenting bytecode within the same JVM. ...currently moot point since tc isn't OSGi based, but if it were, would this approach work to capture timings in OSGi apps?

            Apologies if this is a dumb question. I'm still trying to sort out all of the implications of OSGi.

            Comment


            • #7
              What about Spring Insight on vanilla tomcat

              Originally posted by jtravis View Post
              I wouldn't rule it out in the future, as we want people who are writing Spring applications to have this valuable tool irrespective of how it's deployed. However, at this time we are focusing our energy on the Tomcat container -- specifically tc Server. As you can imagine, it makes our death matrix much smaller which allows us to move much more quickly.

              Are you not able to try your app out on tc Server? What ties you to websphere?
              Hey Jon,

              Just wondering if its a possibility to use Insight on plain vanilla Tomcat. Considering tc is using Tomcat and as you mentioned earlier you are using the Tomcat classloader is there a way to deploy Insight in standard Tomcat.
              My app uses JDK 1.6 and Tomcat 6.x

              Thanks

              - Kam

              Comment


              • #8
                Yes, it would be possible to run Insight with vanilla Tomcat, as tc Server is pretty much just that with some additional niceties. Does tc not fit your needs?

                Comment


                • #9
                  Tc fits my need as Dev but not for production/commercial use. Right now our production stack is all tomcat and/or approaching tomcat as part of our migration effort to make it consistent operational environment across the board.

                  And that is the reason for asking. Considering that you have said yes, what do I need to do to get Insight running on Tomcat 6.x.

                  Comment


                  • #10
                    There are a few things that the Insight tc Server template does that you'll need to replicate in Tomcat:
                    - context.xml -- You will need to use the same configuration as we use (namely changing the valve and adding the weaving classloader)
                    - setenv.sh -- To get weaving information from the items in tomcat's /lib directory, you'll need to use our standard classloader.
                    - lib/* -- We have a variety of libs that must be in the tomcat top-level classloader to properly process traces.

                    Obviously the plugin and configuration for insight exists in insight/*, so you'll need all that as well. Let me know how it works out for you.

                    Comment


                    • #11
                      Is it now possible to install/deploy Insight on a simple Tomcat 5.5.x or a simple Tomcat 6.x.x? Also outside a TcServer...
                      I've done few tests with the Insight.war, *.jar and the context.xml but I've again some issues to view the localhost:8080/insight page...

                      Thanks in advance,

                      Comment


                      • #12
                        Finally, I've succeeded to install Insight into a Apache tomcat 6.0.20, to do this, follows these steps:
                        1. Copy of *.jar from the tc server lib folder to the original tomcat lib folder, WARNING do not overwrite the .jar from the original tomcat
                        2. Copy the web.xml from tc server conf folder to the original tomcat conf folder, overwrite can be permit
                        3. Copy the context.xml from tc server conf folder to the original tomcat conf folder, overwrite can be permit
                        4. Copy the folder: webapps-lib from tc server to the original tomcat root folder

                        Good luck

                        Comment


                        • #13
                          Hello, i have tried to do the steps you have described. Unfortunately i have some problem. Maybe you can help me.

                          So i have done this steps :

                          I have done the step 1 to 3 without any problems.
                          I had some problems with step 4 because there is no webapps-lib folder in tc server so i supposed you talked about the lib folder in the insight instance of tc.

                          But i receive an error :

                          Code:
                          INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
                          01-Apr-2011 22:36:53 org.apache.catalina.loader.WebappLoader start
                          SEVERE: LifecycleException
                          java.lang.NullPointerException
                                  at java.io.File.<init>(File.java:222)
                                  at com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader.readInsightConfig(TomcatWeavingInsightClassLoader.java:67)
                                  at com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader.start(TomcatWeavingInsightClassLoader.java:50)
                                  at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:656)
                                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4303)
                                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
                                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
                                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
                                  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
                                  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
                                  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
                                  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
                                  at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
                                  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
                                  at org.apache.catalina.core.StandardService.start(StandardService.java:516)
                                  at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
                                  at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
                                  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
                          01-Apr-2011 22:36:53 org.apache.catalina.core.ContainerBase addChildInternal
                          SEVERE: ContainerBase.addChild: start:
                          LifecycleException:  start: :  java.lang.NullPointerException
                                  at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:676)
                                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4303)
                                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
                                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
                                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
                                  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
                                  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
                                  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
                                  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
                                  at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
                                  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
                                  at org.apache.catalina.core.StandardService.start(StandardService.java:516)
                                  at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
                                  at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
                                  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
                          01-Apr-2011 22:36:53 org.apache.catalina.startup.HostConfig deployDescriptor
                          SEVERE: Error deploying configuration descriptor host-manager.xml
                          java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException:  start: :  java.lang.NullPointerException
                                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:795)
                                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
                                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
                                  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
                                  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
                                  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
                                  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
                                  at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
                                  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
                                  at org.apache.catalina.core.StandardService.start(StandardService.java:516)
                                  at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
                                  at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
                                  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
                          01-Apr-2011 22:36:53 org.apache.catalina.loader.WebappLoader start
                          SEVERE: LifecycleException
                          java.lang.NullPointerException
                                  at java.io.File.<init>(File.java:222)
                                  at com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader.readInsightConfig(TomcatWeavingInsightClassLoader.java:67)
                                  at com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader.start(TomcatWeavingInsightClassLoader.java:50)
                                  at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:656)
                                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4303)
                                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
                                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
                                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
                                  at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
                                  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
                                  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
                                  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
                                  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
                                  at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
                                  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
                                  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
                                  at org.apache.catalina.core.StandardService.start(StandardService.java:516)
                                  at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
                                  at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
                                  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
                          01-Apr-2011 22:36:54 org.apache.catalina.core.ContainerBase addChildInternal
                          SEVERE: ContainerBase.addChild: start:
                          Any ideas?

                          Thx.

                          Comment


                          • #14
                            The tc-server-6.0.20.C from springsource has a folder webapps-lib, that's mandatory.
                            Without this folder has its jars, that's not possible to launch Tomcat with Insight inside
                            Otherwise, download once again the tc server from the springsource website and retry...

                            Keep me in touch,

                            Comment


                            • #15
                              Hi,
                              Are you able to see JDBC level drill downs when you deploy insight in normal tomcat ?

                              cheers !
                              gary

                              Comment

                              Working...
                              X