[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ClassCastException in Proxy-Class



On Wed, 24 Jan 2001, Nils Hartmann wrote:
> Hi,
> I've got a ClassCastException in following code of Proxy-Class generated
> by opp:
> 
> 	...
> 
>    public java.lang.String getPassword () {
>       try {
>          Object target = link.fetch (this, Lock.LEVEL_READ);
>          if (target != null) {
>             return
> (java.lang.String)ResultConverter.substituteOzoneCompatibles
> (((data.UserImpl)target).getPassword());
>             }
>          else {
>             Object[] args = {};
>             Object result = link.invoke (this, 12, args,
> Lock.LEVEL_READ);
> >>>>>       return (java.lang.String)result;   <<<<<<<<<<<<<<<<<<<<<<<<<<<<< Here's the exception thrown
>             }
>          }
>       catch (RuntimeException e) {
>          e.printStackTrace (System.out);
>          e.fillInStackTrace();
>          throw e;
>          }
>       catch (Exception e) {
>          e.printStackTrace (System.out);
>          e.fillInStackTrace();
>          throw new UnexpectedException (e.toString());
>          }
>       }
> 
> At the marked line above a "java.lang.ClassCastException:
> java.lang.Integer" is thrown. I don't understand this, because I worked
> fine with that object and with other objects of that type it still
> works...
> 
> Any ideas?

Sounds like proxies and impl classes are out of sync. Make sure to rebuild all
proxies. Does this help?


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com