[Persistence, JBoss/CMP, Hibernate, Database] - NoClassDefFoundError: Hibernate 3.2.3.GA and JBossCache 2.0.
by joereger
I'm having trouble getting Hibernate to work with JBossCache 2.0. I'm running on Tomcat 5.5. Could be a jar problem of some sort on my side but I was cautious about adding/updating to jbosscache 2.0.
Hibernate 3.2.3.ga
JBossCache 2.0.0.GA
JGroups 2.6.0-beta-1
I get this error when HibernateUtil starts up:
java.lang.NoClassDefFoundError: org/jboss/cache/TransactionManagerLookup
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
| at java.lang.Class.getConstructor0(Unknown Source)
| at java.lang.Class.newInstance0(Unknown Source)
| at java.lang.Class.newInstance(Unknown Source)
| at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:371)
| at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:241)
| at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
It looks like SettingsFactory.createCacheProvider() is looking for a hard-coded "org.jboss.cache.TransactionManagerLookup" which in JBossCache 2.0 should probably be "org.jboss.cache.transaction.GenericTransactionManagerLookup". I'm configuring Hibernate programatically:
conf.setProperty("hibernate.cache.use_second_level_cache", "true");
| conf.setProperty("hibernate.cache.provider_class", "org.hibernate.cache.TreeCacheProvider");
| conf.setProperty("hibernate.cache.use_structured_entries", "true");
| conf.setProperty("hibernate.cache.use_query_cache", "true");
| conf.setProperty("hibernate.cache.usage", "transactional");
I've searched my entire codebase and never use "TransactionManagerLookup".
Question: Am I using the correct value for "hibernate.cache.provider_class" in my programmatic Hibernate configuration?
Let me know if there's more info I can provide. Thanks for the help,
Joe
The top of my treecache.xml looks like:
<mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=TreeCache">
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092670#4092670
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092670
18Â years, 7Â months
[JBoss Seam] - Error after updated CR2!
by srpantano
After I updated to Seam 2.0CR2 the following error appears:
ERROR [BasicLazyInitializer] Javassist Enhancement failed: com.bcsinfo.security.model.Profile
| java.lang.RuntimeException: java.lang.IllegalArgumentException: Can not set static javassist.util.proxy.MethodFilter field com.bcsinfo.security.model.Profile_$$_javassist_0._method_filter to org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer$1
| at javassist.util.proxy.ProxyFactory.setField(ProxyFactory.java:356)
| at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:339)
| at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:312)
| at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:271)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:138)
| at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:42)
| at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
...
at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.IllegalArgumentException: Can not set static javassist.util.proxy.MethodFilter field com.bcsinfo.security.model.Profile_$$_javassist_0._method_filter to org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer$1
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
| at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:61)
| at java.lang.reflect.Field.set(Field.java:657)
| at javassist.util.proxy.ProxyFactory.setField(ProxyFactory.java:352)
| ... 170 more
| 13:24:33,647 INFO [STDOUT] 13:24:33,616 WARN [PojoEntityTuplizer] could not create proxy factory for:com.bcsinfo.security.model.Profile
| org.hibernate.HibernateException: Javassist Enhancement failed: com.bcsinfo.security.model.Profile
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:145)
| at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:42)
| at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
and the Profile.class is:
@Entity
| @Table(name = "BAS_ROLE", schema = "UTIL")
| public class Profile extends Pojo implements Serializable {
|
| @Column(name = "ID_ROLE")
| @Id
| @GeneratedValue(strategy = GenerationType.AUTO)
| @NotNull
| private long id;
|
| @NotNull
| private String profile;
|
| private String description;
|
| @ManyToOne
| @JoinColumn(name = "ID_LICENCA")
| private License license;
|
| private boolean screenProfile;
|
| @ManyToMany
| @JoinTable(name = "CONF_ROLESYSTEM", schema = "UTIL",
| joinColumns = {@JoinColumn(name = "ID_ROLE")},
| inverseJoinColumns = {@JoinColumn(name = "ID_SYSTEM")})
| private List<Sistem> sistems;
|
| @ManyToMany(mappedBy = "profiles")
| private List<User> users = new ArrayList<User>();
|
| //GETTERS and SETTERS
|
why it´s happing????
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092663#4092663
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092663
18Â years, 7Â months
[JBoss Seam] - Our project is also hurting from this change
by gcomnz
I just figured I should throw in my two-cents that our project is also hurting from this change to not have the version number on the lib.
I know that lots of people say to just look at the maven descriptors, but trying very hard not to start a religious war, we don't do Maven any more in our projects, in our judgment it just wasted our time and couldn't be used in production environments anyway. (I'm appalled if anyone *does* use automated dependency downloads in production, so I'm hard-pressed to see us as unique.)
I'd understand a preference against version numbers being reasonable in a non-public project, but in this case, the framework is all about bringing many disparate libraries together into a useful whole, and so the rest of us really want to be able to eyeball the version numbers used.
In any case, we'll maintain the version numbers on our files if we have to, but it's just a lot harder for us to keep up if they are buried in a pom file somewhere.
Thanks for at least considering an adjustment back to what as far as I know is a fairly accepted convention.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092662#4092662
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092662
18Â years, 7Â months
[JBoss Seam] - Re: Duplicate Factory for: actor
by birwin
Stack Trace:
java.lang.IllegalStateException: duplicate factory for: actor
| at org.jboss.seam.core.Init.checkDuplicateFactory(Init.java:180)
| at org.jboss.seam.core.Init.addFactoryValueBinding(Init.java:198)
| at org.jboss.seam.init.Initialization.addComponents(Initialization.java:746)
| at org.jboss.seam.init.Initialization.init(Initialization.java:478)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy46.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092658#4092658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092658
18Â years, 7Â months
[Security & JAAS/JBoss] - SSO several war in one ear
by djoukit
Hi all,
I use JBoss 4.2.0.
I have an ear which contains several war.
And I want to activate SSO between the multiple webapps.
I read some posts on the forum and some interresting links such as the wiki post about SSO : http://www.jboss.org/wiki/Wiki.jsp?page=SingleSignOn
I made several changes in my configuration in order to activate SSO but I can't find a way to make it work.
- I activated the SSO Valve in jboss-web.deployer/server.xml by adding this line : <Valve className="org.apache.catalina.authenticator.SingleSignOn" debug="2"/>
- I declared my application-policy in conf/login-config.xml : <application-policy name = "Djoukit">
| <authentication>
| <login-module code = "com.djoukit.composant.securite.authentification.spi.DataBaseLoginModule"
| flag = "required">
| <module-option name = "dsJndiName">java:/PostgreSqlDS</module-option>
| </login-module>
| </authentication>
| </application-policy>
- for each webapp I have a jboss-web.xml file with : <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.2//EN" "jboss-web_2_2.dtd" >
| <jboss-web>
| <security-domain>java:/jaas/Djoukit</security-domain>
| </jboss-web>
- I also added log on jboss security by modifying the log4j conf
This solution didn't work (I wont be posting if it id :)).
I don't even get any log in the console showing the work of the SSO Valve.
I guess I'm doing something wrong ...
I'm not really a J2EE Security Expert
Any help would be muchly appreciated
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092656#4092656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092656
18Â years, 7Â months