Actually,
please see below ...
Werner
On Thu, 15 Apr 2004 11:52:49 +0200, Werner Guttmann wrote:
>
>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
Sorry, but I just figured out that above is not the problem anymore. Iow, the code
progresses past this very problem of loading the class. I am not getting
a new MappingException in DatingService.resolve() where
if ( needFieldClass != null ) {
e = needFieldClass.elements();
while ( e.hasMoreElements() ) {
Pair pair = (Pair)e.nextElement();
initiateFm = (FieldMolder) pair.value;
targetCm = (ClassMolder) clsMolders.get( pair.key );
if ( targetCm == null )
throw new MappingException("Field element, \""+pair.key+"\" not
found!");
initiateFm.setFieldClassMolder( targetCm );
}
}
obviously a MappingException is thrown if a ClassMolder cannot be found for the
Duration type. Which brings me again to my last question. Should
Duration be included as simple type ?
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
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev