Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[spring][hibernate]tomcat ok, websphere nok

2 views
Skip to first unread message

septe...@yahoo.fr

unread,
Sep 28, 2006, 3:53:14 AM9/28/06
to
Hi,
I have an application using hibernate and spring together.
All is fine when i use tomcat but when I deploy on websphere, I've got the following error:

The following exception was logged org.spr
ingframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/SPGMApp-servlet.xm
l]: Cannot resolve reference to bean 'hibernateInterceptor' while setting bean property 'interceptors'; nested exception is org.springframework.beans.factor
y.BeanCreationException: Error creating bean with name 'hibernateInterceptor' defined in ServletContext resource [/WEB-INF/SPGMApp-servlet.xml]: Cannot reso
lve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationExcep
tion: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/SPGMApp-servlet.xml]: Initialization of bean failed; neste
d exception is org.hibernate.HibernateException: Unable to copy listeners
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateInterceptor' defined in ServletContext resource [/WEB-INF/S
PGMApp-servlet.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework
beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/SPGMApp-servlet.xml]: Init
ialization of bean failed; nested exception is org.hibernate.HibernateException: Unable to copy listeners
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/SPGMApp
-servlet.xml]: Initialization of bean failed; nested exception is org.hibernate.HibernateException: Unable to copy listeners
org.hibernate.HibernateException: Unable to copy listeners
at org.hibernate.util.Cloneable.copyListeners(Cloneable.java:81)
at org.hibernate.util.Cloneable.access$000(Cloneable.java:18)
at org.hibernate.util.Cloneable$1.run(Cloneable.java:33)
at java.security.AccessController.doPrivileged(Native Method)
at org.hibernate.util.Cloneable.shallowCopy(Cloneable.java:30)
at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1185)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:825)

--------------------------------------------------------------
We can see there is a problem with the LocalSessionFactoryBean.

Here is a part of the spring xml for configuration.
---------------------------------------------------------------


<!-- Hibernate SessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>

<property name="lobHandler">
<ref local="oracleLobHandler" />
</property>


<property name="mappingResources">
<list>
<value>com/business/spg/domain/Issue.hbm.xml</value>
<value>com/ebusiness/spg/ext/vo/File.hbm.xml</value>
<value>com/ebusiness/spg/ext/vo/FileType.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>

<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<!-- Echo all executed SQL to stdout -->
<prop key="show_sql">false</prop>
<prop key="cache.use_query_cache">true</prop>
<!-- Force to flush() after changes ?
<prop key="transaction.auto_close_session">false</prop> -->
<!-- Disable the second-level cache-->
<prop key="hibernate.cache.use_second_level_cache">false</prop>
<!-- Enable Hibernate's automatic session context management
<prop key="current_session_context_class">thread</prop>-->
<!-- JDBC connection pool (use the built-in)
<prop key="connection.pool_size">1</prop> -->
</props>
</property>
</bean>

<!-- Transaction manager for a single Hibernate SessionFactory -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>

<!-- Use this one under WebSphere 5 -->
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>jdbc/defaultdatasource</value>
</property>
</bean>

-------------------------------------------------------------
What kind of problem could it be ?
I tried to put was.policy with I found here : http://www.hibernate.org/294.html
without success...

Thanks in advance
Septentryon

septe...@yahoo.fr

unread,
Sep 28, 2006, 4:34:41 AM9/28/06
to

But I wander if this is not a problem with the security manager od wabsphere...
0 new messages