Hi,
as described in
https://forum.hibernate.org/viewtopic.php?f=9&t=1006796 I'd like to use Hibernate Search in concert with Hibernate Core 3.2.4 which is included in JBossPortal 2.7.2/JBoss 4.2.3.
I'm now at a point to follow the recommendation from hardy.ferentschik to upgrade Hibernate to 3.5.5. But it seems, that there are many incompatibilities.
I tried the following:
- Replacement of libraries antlr, cglib, commons-collections, dom4j, ejb3-persistence, hibernate3, hibernate-annotations, hibernate-entitymanager, javassist, jbosscache-core-3.2.1.GA, jboss-cache-jdk50, jboss-hibernate by
- ... libraries hibernate3, hibernate-jpa-2.0-api-1.0.0.Final, jbosscache-core-3.2.1.GA, jta-1.1, antlr-2.7.6, dom4j-1.6.1, javassist-3.9.0.GA, cglib-2.2, commons-collections-3.1, slf4j-api-1.5.8, slf4j-log4j12-1.5.8 (Hibernate distribution 3.5.5) in %JBOSS_HOME%\server\<config>\lib.
- Changed
Code:
mbean code="org.jboss.cache.TreeCache"
to
Code:
mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
in ejb3-clustered-sfsbcache-service.xml, ejb3-entity-cache-service.xhtml and jboss-portal-ha.sar\META-INF\jboss-service.xml.
When trying to start JBoss I get following exceptions:
Code:
09:57:46,007 INFO [ServiceConfigurator] Problem configuring service portal:service=TreeCache,type=hibernate
org.jboss.deployment.DeploymentException: No Attribute found with name: EvictionPolicyClass
at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:318)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:462)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
- Same exception for
Code:
09:57:55,673 INFO [ServiceConfigurator] Problem configuring service jboss.cache:service=EJB3SFSBClusteredCache
and
Code:
09:57:55,700 INFO [ServiceConfigurator] Problem configuring service jboss.cache:service=EJB3EntityTreeCache
Code:
09:58:03,534 WARN [ServiceController] Problem starting service portal:service=Hibernate
org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge]
at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:402)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:270)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
at org.jboss.portal.jems.hibernate.SessionFactoryBinder.createSessionFactory(SessionFactoryBinder.java:413)
at org.jboss.portal.jems.hibernate.SessionFactoryBinder.startService(SessionFactoryBinder.java:249)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
at org.jboss.portal.jems.as.system.AbstractJBossService.start(AbstractJBossService.java:73)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
...
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cache/TreeCacheProvider
...
- Same exception for
Code:
09:58:03,555 WARN [ServiceController] Problem starting service portal:service=Hibernate,type=Instance
and
Code:
09:58:03,826 WARN [ServiceController] Problem starting service portal:service=Hibernate,type=PortalObject
and
Code:
09:58:03,913 WARN [ServiceController] Problem starting service portal:service=Hibernate,type=Portlet
Regarding the first kind of exception: Could I simply comment out the EvictionPolicyClass attribute? What consequences will be there?
Regarding the second kind of exception: I know that there is no such class because it was contained in the old hibernate library I removed. It seems to me that JBoss Portal is trying to use TreeCacheProvider... Can I change this behavior?
Any ideas how to overcome these exceptions? Thanks a lot in advance.