[ http://nagoya.apache.org/jira/browse/GERONIMO-261?page=history ]
     
Gianny DAMOUR closed GERONIMO-261:
----------------------------------

     Resolution: Fixed
    Fix Version: 1.0-M3

There were three problems:

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

This issue has been fixed as part of the improvements made by David J regarding 
the way ***-ref are resolved. Thanks to these improvements, it is no more 
required to specify a resource-ref or resource-env-ref in geronimo-jetty.xml. 
cf. David J. memo for more details on this capability.

Note that this capability is valid for every module.


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

This has also been fixed. configID is a required attribute; hence, one does not 
need to check its existence. parentID is optional and its existence is checked 
prior to create a URI.


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

This has also been fixed.

Eduardo thanks for having raised this issue; I am sorry for the late reply.

> NullPointerException deploying EAR jetty module
> -----------------------------------------------
>
>          Key: GERONIMO-261
>          URL: http://nagoya.apache.org/jira/browse/GERONIMO-261
>      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

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

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

Reply via email to