[ http://nagoya.apache.org/jira/browse/GERONIMO-260?page=history ]
Gianny DAMOUR closed GERONIMO-260:
----------------------------------
Resolution: Fixed
Fix Version: 1.0-M3
This issue has been fixed when the deployment code has been rewritten by Dain.
Now, when application.xml defines a non-existing module, a DeploymentException
is raised. The message of this exception is "Invalid moduleFile: <module name>".
The nested exception is an IOException indicating that the module does not
exist.
This has been verified for packed and unpacked EAR modules.
> NullPointerException deploying EAR files
> ----------------------------------------
>
> Key: GERONIMO-260
> URL: http://nagoya.apache.org/jira/browse/GERONIMO-260
> Project: Apache Geronimo
> Type: Bug
> Components: deployment
> Versions: 1.0-M2
> Environment: Linux kernel 2.6.7-rc3
> JVM 1.4
> Reporter: Eduardo Piva
> Assignee: Gianny DAMOUR
> Priority: Minor
> Fix For: 1.0-M3
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.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