geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Atkinson (JIRA)" <>
Subject [jira] Commented: (GERONIMO-5672) Overriding an env-entry in geronimo-web.xml fails with a DeploymentException
Date Thu, 04 Nov 2010 03:26:44 GMT


Brian Atkinson commented on GERONIMO-5672:

I saw that issue. I took the first comment to say that the problem had been fixed, but that
it is being left open because a better solution needs to be found. The The env-entry overriding
works if you add the line I described above. It works for tomcat and jetty with no further
changes. The line prevents the generic to specific xml transformer (/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web/deployment/
from moving the env-entry element and the sub elements over to the tomcat or jetty namespace.

I guess, with the last update to 3954 being over 18 months ago it felt a little dead in the
water. I was hoping to get something that was almost working to actually work. If changes
need to be made from there, to tackle them as they come rather then wait on something that
seemed to be in a forever holding pattern.

> Overriding an env-entry in geronimo-web.xml fails with a DeploymentException
> ----------------------------------------------------------------------------
>                 Key: GERONIMO-5672
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 2.1.6, 2.2
>            Reporter: Brian Atkinson
>            Assignee:
> If a war declares a env-entry in its web.xml without declaring a value, it is expected
that the value is provided at deployment time. When the env-entry is added to the geronimo-web.xml,
the deployment fails with the following (slightly reformatted for ease of reading):
> {noformat}
> Deployer operation failed: xml problem for web app .
> org.apache.geronimo.common.DeploymentException: xml problem for web app .
> 	at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.getTomcatWebApp(
> 	at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModule(
> 	at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createModule(
> 	at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.createModule(
> 	at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(
> 	at org.apache.geronimo.deployment.Deployer.deploy(
> 	at org.apache.geronimo.deployment.Deployer.deploy(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ...
> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor: errors:
> error: cvc-complex-type.2.4a: Expected elements 'work-dir@
>   clustering@
>   web-container@
>   host@
>   cross-context@
>   disable-cookies@
>   valve-chain@
>   listener-chain@
>   tomcat-realm@
>   manager@ 
>   cluster@
>   abstract-naming-entry@
>   env-entry@
>   ejb-ref@
>   ejb-local-ref@
>   service-ref@
>   resource-ref@
>   resource-env-ref@
>   message-destination@
>   security-realm-name@
>   service@
>   persistence@' instead of 'env-entry@'
> Descriptor:
> <xml-fragment xmlns:n=""
>               xmlns:tom=""
>               xmlns:dep="">
>   <environment xmlns="">
>     <moduleId>
>       <groupId>test</groupId>
>       <artifactId>test</artifactId>
>       <version>1.0</version>
>       <type>war</type>
>     </moduleId>
>   </environment>
>   <tom:context-root>/test</tom:context-root>
>   <tom:env-entry>
>     <tom:env-entry-name>set-me</tom:env-entry-name>
>     <tom:env-entry-value>a value</tom:env-entry-value>
>   </tom:env-entry>
> </xml-fragment>
> {noformat}
> Notice that the env-entry has been changed to the ""
namespace rather then remaining in the "" where
it is acceptable. This happens for both the tomcat and jetty versions of Geronimo.
> The problem can be tracked down to a line missing from the static block in /plugins/j2ee/geronimo-j2ee-schema/src/main/java/org/apache/geronimo/schema/
> {noformat}
> GERONIMO_SCHEMA_CONVERSIONS.put("env-entry", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
> {noformat}
> Adding this line allows the deployment of the war with the env-entry correctly supplied.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message