论坛首页 Web前端技术论坛

ssh中用了dwr 报No converter found for 'org....cglib.CGLIBLazyInitializer'

浏览 1595 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2009-08-04  
DWR
在一个ssh项目里用了dwr 报的错如下:(报错但还没影响运行 就是那一个页面响应很慢)
2009-08-04 08:56:59,843 [http-8080-2] ERROR CommonsLoggingOutput.java:75  - No converter found for 'org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer'
2009-08-04 08:57:00,015 [http-8080-2] ERROR CommonsLoggingOutput.java:75  - No converter found for 'org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer'
2009-08-04 08:57:00,015 [http-8080-2] ERROR CommonsLoggingOutput.java:75  - No converter found for 'org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer'
......还有很长就不粘贴了。

web.xml只放了关键部分
Java代码
<servlet>  
        <servlet-name>dwr-invoker</servlet-name>  
        <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>  
        <init-param>  
          <param-name>debug</param-name>  
          <param-value>true</param-value>  
        </init-param>  
        <init-param>  
          <param-name>scriptCompressed</param-name>  
          <param-value>false</param-value>  
        </init-param>  
        <init-param>   
            <param-name>logLevel</param-name>   
            <param-value>DEBUG</param-value>   
        </init-param>  
        <load-on-startup>1</load-on-startup>  
    </servlet>  
 
 
 
      <servlet-mapping>  
        <servlet-name>dwr-invoker</servlet-name>  
        <url-pattern>/dwr/*</url-pattern>  
      </servlet-mapping>  
         <filter>  
        <filter-name>hibernateFilter</filter-name>  
        <filter-class>  
            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  
        </filter-class>  
    </filter>  
 
    <filter-mapping>  
        <filter-name>hibernateFilter</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping> 

<servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>scriptCompressed</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
<param-name>logLevel</param-name>
<param-value>DEBUG</param-value>
</init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>



  <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
  </servlet-mapping>
         <filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
</filter-class>
</filter>

<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


dwr.xml
Java代码
<convert converter="bean" match="com.taipeng.task.pojo.Task" >  
 
<create creator="spring" javascript="taskAccess">  
      <param name="beanName" value="taskService"/>  
    </create> 

<convert converter="bean" match="com.taipeng.task.pojo.Task" >

<create creator="spring" javascript="taskAccess">
      <param name="beanName" value="taskService"/>
    </create>


java Service 代码
Java代码
public Task checkUserHaveBifurcateRole(String taskId,String userId) {  
        try{  
            Task task=taskDao.getTaskById(taskId);  
            User orderUser=task.getOrderUesr();  
            User enchargeUser=task.getEnchargeUser();  
            if( userId.equals(orderUser.getUserId()) || userId.equals(enchargeUser.getUserId())){  
                return task;  
            }  
        }catch(Exception ex){  
            ex.printStackTrace();  
        }  
        return null;  
    } 

public Task checkUserHaveBifurcateRole(String taskId,String userId) {
try{
Task task=taskDao.getTaskById(taskId);
User orderUser=task.getOrderUesr();
User enchargeUser=task.getEnchargeUser();
if( userId.equals(orderUser.getUserId()) || userId.equals(enchargeUser.getUserId())){
return task;
}
}catch(Exception ex){
ex.printStackTrace();
}
return null;
}

请指教在网上没找到解决方法
和http://topic.csdn.net/u/20090524/14/5da3f4de-35c8-45d6-bc73-c6b1cadfa120.html
很相似.
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics