I have an web app that was making queries through a Hibernate session
retrieved from a HibernateSesssionFactory managed by Spring. It was working
fine, but now when the server first starts, it gives the following error on
the first db call:
java.lang.IllegalAccessError: org.apache.commons.collections.ReferenceMap:
trying to access class org/apache/commons/collections/ReferenceMap$SoftRef
If I restart the application itself, this seems to clear up. I am
initializing the ApplicationContext in a ServletContextListener in
contextInitialized( ) but it seems like something is not initializing
correctly. Here is my sessionFactory entry in appContext.xml:
<bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName"><value>jdbc/MYDB2</value></property>
<property name="resourceRef"><value>true</value></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
lazy-init="false">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>TransmissionInfoImpl.hbm.xml</value>
<value>SerImpl.hbm.xml</value>
<value>BulkPaymentImpl.hbm.xml</value>
<value>PaymentImpl.hbm.xml</value>
<value>PasswordRecordImpl.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop
key="hibernate.default_schema">PSBH@</prop>
<prop key="hibernate.dialect">
org.hibernate.dialect.DB2Dialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop
key="hibernate.transaction.auto_close_session">true</prop>
</props>
</property>
</bean>
Any ideas what is going on and how to fix?
Thanks,
--
twcrone@xxxxxxxxxxxxx
859-278-9634
|