[jboss-user] [JBoss Portal] - Portlet : SPRING + HIBERNATE + RICHFACES

guybedo do-not-reply at jboss.com
Sun Nov 9 17:21:55 EST 2008


Hi,
i'm trying to setup a portlet using those frameworks : 
- spring 2.5.6
- hibernate-core 3.3.1
- richfaces 3.2.2

i have setup all the configuration files and deployed in jboss portal 2.6.7.

i'm now encoutering the following exception : 
Caused by: java.lang.LinkageError: Class org/slf4j/ILoggerFactory violates loader constraints

I don't really know what is causing that.
What i found is that 
- my portlet is requiring slfj-api-1.4.2.jar
- another instance of slf4j is required by the deployed jboss-portal.sar. it is slf4f-log4j12.jar

maybe there's a conflict ? i'm currently downloading jboss portal 2.7 hoping it requires another version of slf4j.

thanks for helping me.


COMPLETE STACK TRACE :
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.LinkageError: Class org/slf4j/ILoggerFactory violates loader constraints
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
	... 174 more
Caused by: java.lang.LinkageError: Class org/slf4j/ILoggerFactory violates loader constraints
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1814)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
	at org.jboss.web.tomcat.service.WebAppClassLoader.findClass(WebAppClassLoader.java:75)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:103)
	at org.hibernate.cfg.Configuration.(Configuration.java:151)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.(LocalSessionFactoryBean.java:174)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
	... 176 more


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187979#4187979

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187979



More information about the jboss-user mailing list