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/08/04 14:37:20 UTC

[jira] Assigned: (GERONIMO-261) NullPointerException deploying EAR jetty module

Message:

   The following issue has been re-assigned.

   Assignee: Gianny DAMOUR (mailto:gianny_damour@hotmail.com)
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/GERONIMO-261

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: GERONIMO-261
    Summary: NullPointerException deploying EAR jetty module
       Type: Bug

     Status: Open
   Priority: Minor

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

   Assignee: Gianny DAMOUR
   Reporter: Eduardo Piva

    Created: Sat, 3 Jul 2004 12:11 PM
    Updated: Wed, 4 Aug 2004 5:35 AM
Environment: Linux kernel 2.6.7-rc3
JVM 1.4

Description:
If you specify a resource-env-ref or resource-ref in a web.xml file, and do not specify the respective informations in the geronimo-jetty.xml file, you can get a NullPointerException.

If you do not specify a configId or parentId in a geronimo-jetty.xml, when you're creating a URI object, it will cause a NullPointerException, because a null value is passed to URI constructor (http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html#URI(java.lang.String))

If you create a war file without a WEB-INF/geronimo-jetty.xml file, it will cause a NullPointerException.

The fix for these three issues are simple, and can be found in the following files (a diff will show where I touched):

http://www.las.ic.unicamp.br/~eduardo/geronimo/ENCConfigBuilder.java
http://www.las.ic.unicamp.br/~eduardo/geronimo/JettyModuleBuilder.java

All these issues now generates a DeploymentException error, with a message inside it.

To verify the URI issue, I just added a catch to NullPointerException when I create a URI object. I think that this is Ok, but it can be changed to something more "elegant".

This issue can happen in more places. I found that with ejb and connector modules we have the same problem. If the URI object was created in the method getConfigId, in Class EARConfigBuilder, it would be much nicer. But, to do that, we need to change the signature of Interface ModuleBuilder, so that getConfigId and getParentId returns String, and then we can see if this String is null inside EARConfigBuilder, and then return a URI object.



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