You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by de...@geronimo.apache.org on 2004/07/03 20:45:55 UTC

[jira] Updated: (GERONIMO-260) NullPointerException deploying EAR files

The following issue has been updated:

    Updater: Eduardo Piva (mailto:eduardo@las.ic.unicamp.br)
       Date: Sat, 3 Jul 2004 11:43 AM
    Changes:
             Version changed to 1.0-M2
             Component changed to deployment
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/GERONIMO-260?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/GERONIMO-260

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: GERONIMO-260
    Summary: NullPointerException deploying EAR files
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: Apache Geronimo
 Components: 
             deployment
   Versions:
             1.0-M2

   Assignee: 
   Reporter: Eduardo Piva

    Created: Sat, 3 Jul 2004 11:42 AM
    Updated: Sat, 3 Jul 2004 11:43 AM
Environment: Linux kernel 2.6.7-rc3
JVM 1.4

Description:
When you have a META-INF/application.xml, with a module inside it, pointing to an invalid file, it causes NullPointerException. The following code fix that:

In EARConfigBuilder, package org.apache.geronimo.j2ee.deployment, method buildConfiguration, line 256, replace the following loop:

// each module installs it's files into the output context.. this is differenct for each module type

for (Iterator iterator = modules.iterator(); iterator.hasNext();) {
    Module module = (Module) iterator.next();
    getBuilder(module).installModule(earFile, earContext, module);
}

with
// each module installs it's files into the output context.. this is differenct for each module type

for (Iterator iterator = modules.iterator(); iterator.hasNext();) {
    Module module = (Module) iterator.next();
    URI moduleFile = module.getURI();

    if (!module.getURI().equals(URI.create("/")) && earFile.getEntry(moduleFile.toString()) == null) {
        throw new DeploymentException("Filename " + moduleFile + " not found");
    }

    getBuilder(module).installModule(earFile, earContext, module);
}

with that verification, we get a helpfull message inside a DeploymentException.



---------------------------------------------------------------------
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