I am trying to use the tool and I have done what is reported as prerequisites :
1) I have hibernate.generate_statistics = true in my persistence.xml (see below my hibernateSessionFactory bean too)
2) I have declared the MBean in my persistence.xml :
<beanid="jmxExporter"class="org.springframework.jmx.export.MBeanExporter"><propertyname="beans"><map><entrykey="Hibernate:application=Statistics"value-ref="hibernateStatisticsBean"/></map></property></bean><beanid="hibernateStatisticsBean"class="org.hibernate.jmx.StatisticsService"><propertyname="statisticsEnabled"value="true"/><propertyname="sessionFactory"><!-- Uncomment the following when using Hibernate directly --><reflocal="hibernateSessionFactory"/></property></bean>
Where in the same file my hibernateSessionFactoryBean is declared like :
Hi, I have a similar problem, in my case I am using Hibernate 3.3.2 in JBoss 5.1. All numeric statistics are generated correctly and displayed without problems in the graphic monitor, but the String[] attributes not showed (getQueries, getSecondLevelCacheRegionNames, getCollectionRoleNames, getEntityNames), because this the result table is always empty.
The Hibernate MBean object have all numeric attributes populated, but the array attributes are showed in red with "unavaliable".
I implemented my own class StatisticService and registered properly. In debug mode, I realized that the String[] methods never are called, but the statistics lists are in the object with all informations, including the String arrays.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am trying to use the tool and I have done what is reported as prerequisites :
1) I have hibernate.generate_statistics = true in my persistence.xml (see below my hibernateSessionFactory bean too)
2) I have declared the MBean in my persistence.xml :
Where in the same file my hibernateSessionFactoryBean is declared like :
3) I execute the jar file like this:
java -jar hibernate-jconsole-1.0.7.jar -J-Dhibernate.classpath=/Developer/java/repository/org/hibernate/hibernate/3.2.1.ga/hibernate-3.2.1.ga.jar -J-Dhibernate.mbean=Hibernate:application=Statistics
I do see the Hibernate MBean in the MBeans Tab, but no matter what I do, the Tab "Hibernate Monitor" does not display any info, never.
I have tried various things but no luck. Can you please advise?
Last edit: Kirk M. 2014-01-20
Hi, I have a similar problem, in my case I am using Hibernate 3.3.2 in JBoss 5.1. All numeric statistics are generated correctly and displayed without problems in the graphic monitor, but the String[] attributes not showed (getQueries, getSecondLevelCacheRegionNames, getCollectionRoleNames, getEntityNames), because this the result table is always empty.
The Hibernate MBean object have all numeric attributes populated, but the array attributes are showed in red with "unavaliable".
I implemented my own class StatisticService and registered properly. In debug mode, I realized that the String[] methods never are called, but the statistics lists are in the object with all informations, including the String arrays.