The following issue has been updated:

    Updater: Johan Lindquist (mailto:[EMAIL PROTECTED])
       Date: Wed, 11 Aug 2004 2:17 AM
    Comment:
Attached real CVS patch
    Changes:
             Attachment changed to patch.zip
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/HIVEMIND-34?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-34

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-34
    Summary: Invalid sub-module name is not reported but a NPE is thrown instead
       Type: Improvement

     Status: Open
   Priority: Major

    Project: HiveMind
 Components: 
             framework

   Assignee: Howard M. Lewis Ship
   Reporter: Johan Lindquist

    Created: Fri, 30 Jul 2004 1:45 AM
    Updated: Wed, 11 Aug 2004 2:17 AM

Description:
If the sub-module descriptor name is spelt wrong in the hivemodule.sdl 
descriptor, the following error message is displayed:

2004-07-30 10:18:08,533 ERROR org.apache.hivemind.impl.RegistryBuilder [error] 
Error: Unable to read descriptor 
file:/C:/forge/test/descriptor/META-INF/sbu-module.sdl: Error parsing 
file:/C:/forge/test/descriptor/META-INF/sbu-module.sdl: 
java.lang.NullPointerException
org.apache.hivemind.ApplicationRuntimeException: Unable to read descriptor 
file:/C:/forge/test/descriptor/META-INF/sbu-module.sdl: Error parsing 
file:/C:/forge/test/descriptor/META-INF/sbu-module.sdl: 
java.lang.NullPointerException
        at 
org.apache.hivemind.parse.DescriptorParser.parse(DescriptorParser.java:1438)
        at 
org.apache.hivemind.impl.RegistryAssemblyImpl$QueuedModule.parse(RegistryAssemblyImpl.java:63)
        at 
org.apache.hivemind.impl.RegistryAssemblyImpl.parseNextQueued(RegistryAssemblyImpl.java:133)
        at 
org.apache.hivemind.impl.RegistryBuilder.processModule(RegistryBuilder.java:234)
        at 
org.apache.hivemind.impl.RegistryBuilder.processModulesResources(RegistryBuilder.java:208)
        at 
org.apache.hivemind.impl.RegistryBuilder.processModules(RegistryBuilder.java:179)
        at 
org.apache.hivemind.impl.RegistryBuilder.constructDefaultRegistry(RegistryBuilder.java:738)
        at Driver.main(Driver.java:15)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

This is not very clear as it doesn't indicate that the actually sub-module 
could not be located.

The following patch to the descriptor parser logs an error and ignores the 
sub-module include.
---------------------8<-------------------------
1129a1130,1135
>           if (subModuleDescriptor.getResourceURL() == null)
>           {
>                   
> _errorHandler.error(LOG,ParseMessages.missingResource(subModuleDescriptor),getLocation(),null);
>                   return;
>           }
>
---------------------8<-------------------------

This assumes the resource always returns null if the resource can not be 
openend (getResourceURL) as is the case now


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to