错误提示:the method load (Class,Serializable) in the type session is not application for the arguments (Class,int)

解决方案 »

  1.   

    是Hibernate?
    第二个参数使用Integer试试
      

  2.   

    Serializable是Object类型,所以你要用int的封装类Integer.
      

  3.   

    the method load (Class,Serializable) in the type session is not application for the arguments (Class,int)这里说了,方法的参数类型是(Class,Serializable)
    而你传递的参数类型是(Class,int)
    所以很自然就报错了。怎么解决呢,你把参数类型传对了就没事了,把int类型转成Integer类型就可以了。
      

  4.   

    这说明你的JDK版本低于1.5吧。如果是1.5会自动装箱与拆箱的功能。那用int也是可以的。
      

  5.   

    参数中使用new Integer(1)代替1
      

  6.   

    方法参数类型传递错误呀,人家要求Serializable,你传的是int,把int变为Integer试试