Hi,
I have a problem in lazy loading...follwing is my configuration...

Code:
<beans>	
	<bean id="dataSource"
		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
		<property name="driverClassName">
			<value>$&#123;hibernate.connection.driver_class&#125;</value>
		</property>
		<property name="url">
			<value>$&#123;hibernate.connection.url&#125;</value>
		</property>
		<property name="username">
			<value>$&#123;hibernate.connection.username&#125;</value>
		</property>
		<property name="password">
			<value>$&#123;hibernate.connection.password&#125;</value>
		</property>

	</bean>

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

		<property name="mappingResources">
			<list>
				<value>
					com/testing/impl/Service.hbm.xml
				</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">
					$&#123;hibernate.dialect&#125;
				</prop>
			</props>
		</property>

	</bean>

	<!-- Transaction manager for a single Hibernate SessionFactory &#40;alternative to JTA&#41; -->
	<bean id="transactionManager"
		class="org.springframework.orm.hibernate.HibernateTransactionManager">
		<property name="sessionFactory">
			<ref local="sessionFactory" />
		</property>
	</bean>

	<!-- Add DAOs here -->
	<bean id="userDao"
		class="com.testing.dao.hibernate.HibernateRoleDAO">
		<property name="sessionFactory">
			<ref local="sessionFactory" />
		</property>
	</bean>

	<bean id="Service"
		class="org.springframework.aop.framework.ProxyFactoryBean">
		<property name="target">
			<ref bean="userManagerTarget" />
		</property>
		 <property name="proxyInterfaces">
           <value>com.testing.Service</value>
         </property>
		
		<property name="interceptorNames">
		<list>
			<value>hibernateInterceptor</value>
		</list>
	</property>
	</bean>

	  <bean id="hibernateInterceptor"
		class="org.springframework.orm.hibernate.HibernateInterceptor">
		<property name="sessionFactory">
			<ref bean="sessionFactory" />
		</property>
	</bean>


<bean id="userManagerTarget"
		class="com.testing.ServiceImpl">
	<property name="userDao">
		<ref bean="userDao" />
	</property>
</bean>
I am getting "Failed to lazily initialize a collection - no session or session was closed" exception with the following code

Code:
Service service = &#40;Service&#41; context.getBean&#40;"Service"&#41;;
    	User&#91;&#93; users = service.getUsers&#40;&#41;;
    	System.out.println&#40;"name is " + users&#91;0&#93;.getEmailAddress&#40;&#41;&#41;;
    	System.out.println&#40;"role name is " + users&#91;0&#93;.getRoles&#40;&#41;&#91;0&#93;.getName&#40;&#41;&#41;; // Getting the exception here
But this is what exactly was suggested in
http://www.jroller.com/page/kbaum/20040708

Then where am I doing wrong? Why am I not able to lazily load the objects?
Following is my DAO code
Code:
public List getUsers&#40;&#41; throws DataAccessException &#123;
        List users = &#40;List&#41; getHibernateTemplate&#40;&#41;.find&#40;"from User"&#41;;
        return users;
    &#125;
Please help...
Thanks,
SSSS.