11 Replies Latest reply on Nov 18, 2008 4:42 PM by Isaac Peel

    monitoring hibernate demo

    mazz Master

      I just uploaded a new flash demo that illustrates how you can use the Jopr Hibernate plugin to monitor Hibernate, even if its running in a standalone J2SE virtual machine (that is, not running in JBossAS or other app server).

      https://docs.jbosson.redhat.com/confluence/display/JON2/Demo-MonitoringHibernate

      Today, you can do this Hibernate monitoring if Hibernate is running in Tomcat or JBossAS (Jopr v2.1). But if you want to try the functionality of monitoring Hibernate in a J2SE app, you have to build from source - I just checked in some enhancements to RHQ and Jopr to enable this feature. It will be available in Jopr 2.2.

        • 2. Re: monitoring hibernate demo
          Chris Morgan Newbie

          Also added this link to the demonstration sticky at the top of the forum. Thanks!

          CM

          • 3. Re: monitoring hibernate demo
            Isaac Peel Newbie

            I've taken the time and built the rhq project and now have the plugin installed in my server. When I try to add the additional classpath entries I keep getting the following message "Target Unreachable, 'additionalClassPathEntries' returned null "

            After reading the code a bit I'm a little confused. It seems the addResource method in ManuallyAddChildResourceUIBean never gets called because JSF thinks 'additionalClassPathEntries' is null. Although I'm familiar with JSF I'm not 100% sure what the onc:config tag is doing. It seems like it's building out the form from a configuration in the afore mentioned UIBean. I'm really trying to get this Hibernate monitoring demo working any hints?

            • 4. Re: monitoring hibernate demo
              mazz Master

              I'm assuming you did a full rebuild of RHQ core since things were added to it to support this - in addition, a new Jopr build also needs to be built due to the changes to the hibernate plugin (it sounds like you did this - but I just want to explicitly be clear about this - since the current Jopr GA release won't support this. Its only implemented today in /trunk.

              Anyway...

              The onc:config looks at a configuration definition and builds the form based on that definition. In this case, the configuration definition comes from the JMX plugin's plugin-configuration definition where the new "additionalClassPathEntries" is defined:

              <c:simple-property name="additionalClassPathEntries"
              required="false" type="string" description="Comma-separated list of
              directories and filenames that contain resources and classes needed to
              communicate with the JMX Server and its MBeans. If you specify
              'some/directory/*.jar', all jars found in the given directory will be
              added."/>


              Can you provide more information on the error you are getting? required="false" is defined here, so null should be acceptable. What steps do you do and where does the error show up? (anything in agent logs? server logs? UI error messages?)

              • 5. Re: monitoring hibernate demo
                mazz Master

                Also, I'm curious if, after you rebuilt everything, if you kept your old database schema/data intact?

                Its possible that upgrading the hibernate/jmx plugin didn't fully update the metadata. This would be important to know - its something we would have to fix.

                If you "mvn -Ddbsetup" in your modules/core/dbutils source code working directory, that will completely erase the data in your DB and ensure you db schema is up to date (do this when your server is shutdown). Then re-run the server/agent and see what you get.

                • 6. Re: monitoring hibernate demo
                  Isaac Peel Newbie

                  I'll take a look at that plugin configuration definition and then get back do you. The only other message that I get other than the one that I posted is this.

                  11:20:15,048 ERROR [STDERR] Nov 18, 2008 11:20:15 AM javax.faces.component.UIInput updateModel
                  SEVERE: Target Unreachable, 'additionalClassPathEntries' returned null


                  The steps to reop are the exact steps in your demo. I'm using the same helloworld.jar from your demo. I've got the jar running with jmxremote enabled and have entered a bunch of people and things. The only difference I see is that you're using windows and I'm using linux.

                  I don't see anything in the log as far as a stack trace goes. I have downloaded and built both the RHQ and Jopr from SVN. I'll update and rebuild because you're saying code was committed today.

                  • 7. Re: monitoring hibernate demo
                    Isaac Peel Newbie

                     

                    "mazz" wrote:
                    Also, I'm curious if, after you rebuilt everything, if you kept your old database schema/data intact?

                    Its possible that upgrading the hibernate/jmx plugin didn't fully update the metadata. This would be important to know - its something we would have to fix.

                    If you "mvn -Ddbsetup" in your modules/core/dbutils source code working directory, that will completely erase the data in your DB and ensure you db schema is up to date (do this when your server is shutdown). Then re-run the server/agent and see what you get.



                    I wiped my entire database and rebuild it before using the RHQ server that I built.

                    • 8. Re: monitoring hibernate demo
                      mazz Master

                       

                      because you're saying code was committed today.


                      I didn't mean to imply that. Nothing was committed recently for this stuff - I only meant to say I checked in fixes AFTER the current 2.1.0.GA was released. This code hasn't changed since I made that demo. So if you checked out and built the source recently, it should be good.

                      I doubt the platform (Windows vs. Linux) would make a difference.

                      • 9. Re: monitoring hibernate demo
                        mazz Master

                        I just ran some tests really quick to make sure nothing was checked in recently that might have broke the config editor stuff. Looks OK. I tried entering empty text with the unset button unchecked, I had the unset button checked and I had the unset button unchecked with a filepath. I used Firefox 3.

                        What browser are you using and what is your browser's locale?

                        • 10. Re: monitoring hibernate demo
                          Isaac Peel Newbie

                          I'm using firefox 3.0.4 the locale is en-US

                          I'm not leaving the value blank for the additional classpath entries, I'm pointing it to the needed jar files.

                          • 11. Re: monitoring hibernate demo
                            Isaac Peel Newbie

                            I've finally gotten the additional classpath portion working. Turns out that the server was somehow referencing .class files that were in my trash bin (~/.share/Trash). It was really strange, I've never seen anything like that happen before.