I'am currently evaluating Broadleafcommerce for a to be developed webshop application. Our own developments are done with MySQL, hibernate, Spring, GraniteDS and Flexbuilder. Occasionally we use JSF2.0 facelets with Icefaces libraries as well. We deploy on glassfish 3.1 app server. We use Netbeans 6.9 IDE for development and testing (in place deployment on glassfish).
I downloaded ecommerce.zip which contains Broadleaf SNAPSHOT 1.5.0.M4. I managed to deploy the 'site' project after having changed the dependencies for MySQL and changing the applicationcontext.xml.
Now I'am trying to deploy 'site-admin' application. The first problem I got was in the web.xml. Glassfish complained that webAppRootKey="bl.Admin.root" was already used in another application ('site' application). So I changed it to some arbitrary value.
Now I'am facing another problem (excerpt from glassfish logfile)
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateExporter' defined in resource loaded from byte array: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.hibernate.jmx.StatisticsService@53fb88] with key 'org.broadleafcommerce:name=hibernate.statistics-broadleaf'; nested exception is javax.management.InstanceAlreadyExistsException: org.broadleafcommerce:name=hibernate.statistics-broadleaf. Please see server.log for more details.
I searched the full M4 distribution and found that hibernateExporter was defined in :
./core/BroadleafCommerceFramework/src/main/resources/bl-framework-applicationContext-test.xml: <bean id="hibernateExporter" class="org.springframework.jmx.export.MBeanExporter">
./core/BroadleafCommerceProfile/src/main/resources/bl-profile-applicationContext-persistence.xml: <bean id="hibernateExporter" class="org.springframework.jmx.export.MBeanExporter" depends-on="entityManagerFactory">
So effectively it is defined twice but both BroadleafCommerceFramework and BroadleafCommerceProfile are dependencies of the site-admin.
Can I simply remove the bean definition from one of this files and rebuild ?
Thank you for helping me out