You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "viola.lu (JIRA)" <ji...@apache.org> on 2010/08/25 16:46:16 UTC
[jira] Updated: (GERONIMO-5511) context-priority-classloader is not
allowed in geronimo-web.xml for backwards compatibility
[ https://issues.apache.org/jira/browse/GERONIMO-5511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
viola.lu updated GERONIMO-5511:
-------------------------------
Attachment: G5511.patch
In geronimo 1.1, context-priority-classloader, configId, parentId are supported in geronimo-web schema, can be found in doc https://cwiki.apache.org/GMOxDOC11/geronimo-web-11xsd.html.
After that , context-priority-classloader, configId, parentId are not supported, refer to : http://geronimo.apache.org/schemas-2.1/docs/geronimo-web-2.0.1.xsd.html. In previous 2.* daytrader sample, web-app is defined in its deployment-plan as below:
<module>
<web>web.war</web>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
<service-ref>
<service-ref-name>service/Trade</service-ref-name>
<port>
<port-name>TradeWSServices</port-name>
<protocol>http</protocol>
<host>localhost</host>
<port>8080</port>
<uri>/daytrader/services/TradeWSServices</uri>
</port>
</service-ref>
</web-app>
</module>
So server just parses this web-app fragment in top-level deployment, not deeply into web-app of geronimo-web.xml in web.war . That's why daytrader has no error above in geronimo 2.*,
But daytrader web-profile sample newly created has already removed web module from deployment plan, so tomcatwebmodule goes into web.war , parsing geronimo-web.xml . And this error is exposed. If deploy daytrader web-profile sample to geronimo 2.*, this error also exists, coz the three attributes/elements don't exist in 2.* too.
So as david jencks suggested, catch the error as warning. pls review the patch.
Or update dayrader webprofile sample, this is another fix way.
> context-priority-classloader is not allowed in geronimo-web.xml for backwards compatibility
> -------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5511
> URL: https://issues.apache.org/jira/browse/GERONIMO-5511
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: web
> Affects Versions: 3.0
> Environment: Ubuntu 8.04 x86-32
> Sun java 1.6.0_20
> Reporter: Forrest Xia
> Assignee: viola.lu
> Priority: Minor
> Attachments: G5511.patch
>
>
> If the geronimo-web.xml includes element "<context-priority-classloader>", the deployment will fail at validating xml schema like this:
> 2010-08-09 13:02:06,051 ERROR [DeploymentPortlet] Deployment failed
> xml problem for web app web.war
> org.apache.geronimo.common.DeploymentException: xml problem for web app web.war
> at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.getTomcatWebApp(TomcatModuleBuilder.java:381)
> at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModule(TomcatModuleBuilder.java:275)
> at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createModule(AbstractWebModuleBuilder.java:273)
> at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.createModule(SwitchingModuleBuilder.java:153)
> at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules(EARConfigBuilder.java:864)
> at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfigBuilder.java:457)
> at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:319)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:231)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:872)
> at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
> at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
> at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor: errors:
> error: cvc-complex-type.3.2.1: Attribute not allowed (no wildcards allowed): configId
> error: cvc-complex-type.3.2.1: Attribute not allowed (no wildcards allowed): parentId
> error: cvc-complex-type.2.4a: Expected elements 'environment@http://geronimo.apache.org/xml/ns/deployment-1.2 context-root@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 work-dir@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 clustering@http://geronimo.apache.org/xml/ns/j2ee/application-2.0 web-container@http://geronimo.apache.org/xml/ns/naming-1.2 host@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 cross-context@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 disable-cookies@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 valve-chain@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 listener-chain@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 tomcat-realm@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 manager@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 cluster@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 abstract-naming-entry@http://geronimo.apache.org/xml/ns/naming-1.2 env-entry@http://geronimo.apache.org/xml/ns/naming-1.2 ejb-ref@http://geronimo.apache.org/xml/ns/naming-1.2 ejb-local-ref@http://geronimo.apache.org/xml/ns/naming-1.2 service-ref@http://geronimo.apache.org/xml/ns/naming-1.2 resource-ref@http://geronimo.apache.org/xml/ns/naming-1.2 resource-env-ref@http://geronimo.apache.org/xml/ns/naming-1.2 message-destination@http://geronimo.apache.org/xml/ns/naming-1.2 security-realm-name@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 service@http://geronimo.apache.org/xml/ns/deployment-1.2' instead of 'context-priority-classloader@http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1' here
> Descriptor:
> <xml-fragment configId="TradeWeb" parentId="Trade" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:tom="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1">
> <tom:context-priority-classloader>false</tom:context-priority-classloader>
> <naming:resource-ref>
> <naming:ref-name>jdbc/TradeDataSource</naming:ref-name>
> <naming:resource-link>TradeDataSource</naming:resource-link>
> </naming:resource-ref>
> </xml-fragment>
> at org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD(XmlBeansUtil.java:188)
> at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.getTomcatWebApp(TomcatModuleBuilder.java:375)
> ... 19 more
> But Geronimo 2.x could deploy the app with the element.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.