ssh+dwr的问题:ERROR - No converter found for 'org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer'

hxj1225 2008-07-08 01:03:37
hibernate是3.2.3的。dwr是2.0.5的
最近我自己写了一个东西,出现了ERROR - No converter found for 'org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer'这样的错误。不知道是怎么回事。我看了hibernate3.jar包里面貌似没有CGLIBLazyInitializer这个class
dwr.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
"http://getahead.org/dwr/dwr20.dtd">

<dwr>
<allow>
<create javascript="Demo" creator="new">
<param name="class" value="com.hxj.util.GetDate"></param>
</create>

<create javascript="TRoleDAO" creator="spring">
<param name="beanName" value="RoleService"/>
<include method="findById"/>
<include method="getCountByRoleName"/>
<include method="findAll"/>
<include method="update"/>
</create>

<create javascript="TRoleJDBCDAO" creator="new">
<param name="class" value="com.hxj.jdbc.dao.TRoleJdbcDAO"></param>
<include method="getCountByRoleId"/>
</create>

<convert match="com.hxj.hibernate.bean.TRole" converter="bean"></convert>
<convert match="com.hxj.hibernate.bean.TPurview" converter="bean"></convert>
<convert match="com.hxj.hibernate.bean.TRolePurview" converter="bean"></convert>
</allow>
</dwr>



applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">


<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver">
</property>
<property name="url"
value="jdbc:oracle:thin:@localhost:1521:hxj">
</property>
<property name="username" value="hxj"></property>
<property name="password" value="hxj"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/hxj/hibernate/bean/TPurview.hbm.xml</value>
<value>com/hxj/hibernate/bean/TRole.hbm.xml</value>
<value>com/hxj/hibernate/bean/TRolePurview.hbm.xml</value>
</list>
</property>
</bean>

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

<bean id="TRolePurviewDAO"
class="com.hxj.hibernate.dao.TRolePurviewDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="TPurviewDAO" class="com.hxj.hibernate.dao.TPurviewDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="TRoleDAO" class="com.hxj.hibernate.dao.TRoleDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>

<bean id="RoleServiceTarget" class="com.hxj.service.impl.RoleServiceImpl">
<property name="roleDAO">
<ref bean="TRoleDAO"/>
</property>
</bean>

<bean id="PurviewServiceTarget" class="com.hxj.service.impl.PurviewServiceImpl">
<property name="purviewDAO">
<ref bean="TPurviewDAO"/>
</property>
</bean>

<bean id="RolePurviewServiceTarget" class="com.hxj.service.impl.RolePurviewServiceImpl">
<property name="rolePurviewDAO">
<ref bean="TRolePurviewDAO"/>
</property>
</bean>

<bean id="RoleService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target" ref="RoleServiceTarget" />
<property name="transactionManager" ref="transactionManager" />
<property name="proxyInterfaces" value="com.hxj.service.RoleService" />
<property name="transactionAttributes">
<props>
<prop key="*"></prop>
</props>
</property>
</bean>

<bean id="PurviewService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target" ref="PurviewServiceTarget"></property>
<property name="transactionManager" ref="transactionManager"></property>
<property name="proxyInterfaces" value="com.hxj.service.PurviewService"></property>
<property name="transactionAttributes">
<props>
<prop key="*"></prop>
</props>
</property>
</bean>

<bean id="RolePurviewService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target" ref="RolePurviewServiceTarget"></property>
<property name="transactionManager" ref="transactionManager"></property>
<property name="proxyInterfaces" value="com.hxj.service.RolePurviewService"></property>
<property name="transactionAttributes">
<props>
<prop key="*"></prop>
</props>
</property>
</bean>

<bean name="/purview" class="com.hxj.struts.action.PurviewAction">
<property name="purviewService">
<ref bean="PurviewService"/>
</property>
</bean>

<bean name="/role" class="com.hxj.struts.action.RoleAction">
<property name="roleService">
<ref bean="RoleService"/>
</property>
<property name="rolePurviewService">
<ref bean="RolePurviewService"/>
</property>
<property name="purviewService">
<ref bean="PurviewService"/>
</property>
</bean>

</beans>

什么情况啊?
...全文
1356 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
sca4441479 2012-10-28
  • 打赏
  • 举报
回复
同样求解!
Hover_D 2012-02-20
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 laoxing521 的回复:]

滞后装载的问题

加上OpenSessionInViewFilter
[/Quote]
跟楼主一样的错误,求解释,我加上那个OpenSessionInViewFilter了,可还是不行!
hxj1225 2008-07-09
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 laoxing521 的回复:]
滞后装载的问题

加上OpenSessionInViewFilter
[/Quote]
能说详细点吗?
laoxing521 2008-07-08
  • 打赏
  • 举报
回复
滞后装载的问题

加上OpenSessionInViewFilter
hxj1225 2008-07-08
  • 打赏
  • 举报
回复
没用到ext啊
teddywtd 2008-07-08
  • 打赏
  • 举报
回复
帮忙顶下,upup,学习.我也在用dwr.是不是也用ext啊,楼主.

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧