From: youngm (JIRA) <jir...@jb...> - 2005-03-28 21:19:31
|
[ http://jira.jboss.com/jira/browse/HIBERNATE-11?page=3Dhistory ] youngm updated HIBERNATE-11: ---------------------------- Attachment: hibernate-cache.diff Here is a patch that appears to fix the problem. It replaces all instances= of TreeCache with TreeCacheMBean. > DeployedTreeCacheProvider must be updated to support JBossCache 1.2.1 > --------------------------------------------------------------------- > > Key: HIBERNATE-11 > URL: http://jira.jboss.com/jira/browse/HIBERNATE-11 > Project: Hibernate > Type: Bug > Reporter: youngm > Assignee: Gavin King > Attachments: hibernate-cache.diff > > > When retrieving JBossCache from JNDI DeployedTreeCacheProvider must cast = the returned instance to org.jboss.cache.TreeCacheMBean not org.jboss.cache= .TreeCache. > Mike > See stacktrace below: > 13:25:29,883 ERROR [Hibernate] Starting failed jboss.har:service=3Dam_dat= a/HibernateFactory > net.sf.hibernate.HibernateException: Could not instantiate Cache > =09at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.ja= va:1138) > =09at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuratio= n.java:795) > =09at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.jav= a:583) > =09at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:551) > =09at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBea= nSupport.java:272) > =09at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Service= MBeanSupport.java:222) > =09at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) > =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc= essorImpl.java:25) > =09at java.lang.reflect.Method.invoke(Method.java:585) > =09at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispat= cher.java:144) > =09at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) > =09at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) > =09at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoke= r.java:249) > =09at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644= ) > =09at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceContr= oller.java:911) > =09at $Proxy0.start(Unknown Source) > =09at org.jboss.system.ServiceController.start(ServiceController.java:416= ) > =09at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) > =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc= essorImpl.java:25) > =09at java.lang.reflect.Method.invoke(Method.java:585) > =09at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispat= cher.java:144) > =09at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) > =09at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) > =09at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoke= r.java:249) > =09at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644= ) > =09at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) > =09at $Proxy4.start(Unknown Source) > =09at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273) > =09at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964) > =09at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956) > =09at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775) > =09at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738) > =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp= l.java:39) > =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc= essorImpl.java:25) > =09at java.lang.reflect.Method.invoke(Method.java:585) > =09at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispat= cher.java:144) > =09at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) > =09at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterce= ptor.java:122) > =09at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) > =09at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(Mode= lMBeanOperationInterceptor.java:131) > =09at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) > =09at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoke= r.java:249) > =09at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644= ) > =09at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) > =09at $Proxy7.deploy(Unknown Source) > =09at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploym= entScanner.java:325) > =09at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymen= tScanner.java:483) > =09at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThrea= d.doScan(AbstractDeploymentScanner.java:204) > =09at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThrea= d.loop(AbstractDeploymentScanner.java:215) > =09at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThrea= d.run(AbstractDeploymentScanner.java:194) > Caused by: net.sf.hibernate.cache.CacheException: java.lang.ClassCastExce= ption: Object at 'cache/am_data' in context {java.naming.factory.initial=3D= org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=3Dorg= .jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces} is no= t an instance of [class=3Dorg.jboss.cache.TreeCache classloader=3Dorg.jboss= .mx.loading.UnifiedClassLoader3@d12eea{ url=3Dfile:/C:/Projects/PointBlank3= /dist/jboss/server/default/tmp/deploy/tmp53746jboss-service.xml ,addedOrder= =3D2} interfaces=3D{interface=3Dorg.jboss.cache.TreeCacheMBean classloader= =3Dorg.jboss.mx.loading.UnifiedClassLoader3@d12eea{ url=3Dfile:/C:/Projects= /PointBlank3/dist/jboss/server/default/tmp/deploy/tmp53746jboss-service.xml= ,addedOrder=3D2}, interface=3Djava.lang.Cloneable classloader=3Dnull, inte= rface=3Dorg.jgroups.MembershipListener classloader=3Dorg.jboss.mx.loading.U= nifiedClassLoader3@d12eea{ url=3Dfile:/C:/Projects/PointBlank3/dist/jboss/s= erver/default/tmp/deploy/tmp53746jboss-service.xml ,addedOrder=3D2}}] objec= t class is [class=3D$Proxy25 classloader=3Dorg.jboss.mx.loading.UnifiedClas= sLoader3@1e3bddb{ url=3Dfile:/C:/Projects/PointBlank3/dist/jboss/server/def= ault/tmp/deploy/tmp53774am_data_cache.sar ,addedOrder=3D14} interfaces=3D{i= nterface=3Dorg.jboss.cache.TreeCacheMBean classloader=3Dorg.jboss.mx.loadin= g.UnifiedClassLoader3@d12eea{ url=3Dfile:/C:/Projects/PointBlank3/dist/jbos= s/server/default/tmp/deploy/tmp53746jboss-service.xml ,addedOrder=3D2}}] > =09at org.jboss.hibernate.cache.DeployedTreeCacheProvider.getOrLookupDepl= oyedTreeCache(DeployedTreeCacheProvider.java:77) > =09at org.jboss.hibernate.cache.DeployedTreeCacheProvider.buildCache(Depl= oyedTreeCacheProvider.java:45) > =09at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.ja= va:1135) > =09... 50 more > Caused by: java.lang.ClassCastException: Object at 'cache/am_data' in con= text {java.naming.factory.initial=3Dorg.jnp.interfaces.NamingContextFactory= , java.naming.factory.url.pkgs=3Dorg.jboss.naming:org.jnp.interfaces:org.jb= oss.naming:org.jnp.interfaces} is not an instance of [class=3Dorg.jboss.cac= he.TreeCache classloader=3Dorg.jboss.mx.loading.UnifiedClassLoader3@d12eea{= url=3Dfile:/C:/Projects/PointBlank3/dist/jboss/server/default/tmp/deploy/t= mp53746jboss-service.xml ,addedOrder=3D2} interfaces=3D{interface=3Dorg.jbo= ss.cache.TreeCacheMBean classloader=3Dorg.jboss.mx.loading.UnifiedClassLoad= er3@d12eea{ url=3Dfile:/C:/Projects/PointBlank3/dist/jboss/server/default/t= mp/deploy/tmp53746jboss-service.xml ,addedOrder=3D2}, interface=3Djava.lang= .Cloneable classloader=3Dnull, interface=3Dorg.jgroups.MembershipListener c= lassloader=3Dorg.jboss.mx.loading.UnifiedClassLoader3@d12eea{ url=3Dfile:/C= :/Projects/PointBlank3/dist/jboss/server/default/tmp/deploy/tmp53746jboss-s= ervice.xml ,addedOrder=3D2}}] object class is [class=3D$Proxy25 classloader= =3Dorg.jboss.mx.loading.UnifiedClassLoader3@1e3bddb{ url=3Dfile:/C:/Project= s/PointBlank3/dist/jboss/server/default/tmp/deploy/tmp53774am_data_cache.sa= r ,addedOrder=3D14} interfaces=3D{interface=3Dorg.jboss.cache.TreeCacheMBea= n classloader=3Dorg.jboss.mx.loading.UnifiedClassLoader3@d12eea{ url=3Dfile= :/C:/Projects/PointBlank3/dist/jboss/server/default/tmp/deploy/tmp53746jbos= s-service.xml ,addedOrder=3D2}}] > =09at org.jboss.naming.Util.checkObject(Util.java:240) > =09at org.jboss.naming.Util.lookup(Util.java:199) > =09at org.jboss.naming.Util.lookup(Util.java:158) > =09at org.jboss.hibernate.cache.DeployedTreeCacheProvider.lookupDeployedT= reeCache(DeployedTreeCacheProvider.java:87) > =09at org.jboss.hibernate.cache.DeployedTreeCacheProvider.getOrLookupDepl= oyedTreeCache(DeployedTreeCacheProvider.java:67) > =09... 52 more --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |