-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: [spring][hibernate]tomcat -> websphere
PostPosted: Thu Sep 28, 2006 4:06 am 
Newbie

Joined: Thu Sep 28, 2006 4:01 am
Posts: 8
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.
---------------------------------------------------------------



<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>

<prop key="show_sql">false</prop>
<prop key="cache.use_query_cache">true</prop>


<prop key="hibernate.cache.use_second_level_cache">false</prop>


</props>
</property>
</bean>


<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>


<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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 4:36 am 
Newbie

Joined: Thu Sep 28, 2006 4:01 am
Posts: 8
But I wander if this is not a problem with the security manager of websphere...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.