On Tue, 13 Apr 2004 08:23:33 -0600 (MDT), Bruce Snyder wrote:

>
>This one time, at band camp, Werner Guttmann said:
>
>WG>after a litztle bit of debugging, I've traced this exception to the following code 
>fragementin Types.java:
>WG>
>WG>    public static Class typeFromName( ClassLoader loader, String typeName )
>WG>        throws ClassNotFoundException
>WG>    {
>WG>        for ( int i = 0 ; i < _typeInfos.length ; ++i ) {
>WG>            if ( typeName.equals( _typeInfos[ i ].shortName ) )
>WG>                return ( _typeInfos[ i ].primitive != null ? _typeInfos[ i 
>].primitive :
>WG>                         _typeInfos[ i ].javaType );
>WG>        }
>WG>        if ( loader != null )
>WG>            return loader.loadClass( typeName );
>WG>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>WG>        else
>WG>            return Class.forName( typeName );
>WG>
>WG>The exception occurs at the line marked with '�'. Any idea why ? 
>'org.exolab.castor.types.Duration' is on the classpath, afai can tell.
>
>I'm not sure why this is happening. I would suggest breaking the
>line apart into the following for debugging:
>
>    Class clazz = loader.laodClass( typeName );
>    _log.debug( "Loading class" + clazz.getName() );
>    return clazz;

That does not really help, either. It's the call to loader.loadClass() that throws the 
ClassNotFoundException. Question: is Duration meant to be a 'simple' 
type, as enlisted in Types.java through the static array typesInfo (of type 
TypeInfo[]) ? Iow, should there be an entry similar to 

        new TypeInfo( "string", null, java.lang.String.class,     true,     null ),

Werner


>
>Bruce


>--
>perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
>
>The Castor Project
>http://www.castor.org/
>
>Apache Geronimo
>http://incubator.apache.org/projects/geronimo.html
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-dev
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to