geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "YunFeng Ma (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (GERONIMODEVTOOLS-451) Emptying the Security Roles will cause "xml problem for web app" in deployment
Date Wed, 30 Jul 2008 01:17:31 GMT

     [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

YunFeng Ma resolved GERONIMODEVTOOLS-451.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2

Committed in trunk rev680895.

> Emptying the Security Roles will cause "xml problem for web app" in deployment
> ------------------------------------------------------------------------------
>
>                 Key: GERONIMODEVTOOLS-451
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-451
>             Project: Geronimo-Devtools
>          Issue Type: Bug
>    Affects Versions: 2.1.x
>            Reporter: YunFeng Ma
>            Assignee: Tim McConnell
>             Fix For: 2.1.2
>
>         Attachments: GERONIMODEVTOOLS-451.patch
>
>
> 1. Create a web application
> 2. Open the geronimo-web.xml editor
> 3. Set Security Realm Name to "myrealm" in General tab
> 4. Set Default Role to "user" in Security tab
> 5. Add a Security Role in Security tab
> 6. Remove the added Security Role in Security tab
> The above steps lead to the following security settings in geronimo-web.xml:
> {noformat}
>     <web:security-realm-name>myrealm</web:security-realm-name>
>     <sec:security use-context-handler="false" doas-current-caller="false" default-role="user">
>         <sec:role-mappings/>
>     </sec:security>
> {noformat}
> and <sec:role-mappings/> leads to the following deployment error:
> {noformat}
> Distribution of module failed.  See log for details.
>   xml problem for web app .
>   org.apache.geronimo.common.DeploymentException: xml problem for web app .
>   	at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.getTomcatWebApp(TomcatModuleBuilder.java:318)
>   	at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModule(TomcatModuleBuilder.java:207)
>   	at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createModule(AbstractWebModuleBuilder.java:179)
>   	at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.createModule(SwitchingModuleBuilder.java:94)
>   	at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:307)
>   	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:226)
>   	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
>   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   	at java.lang.reflect.Method.invoke(Unknown Source)
>   	at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>   	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>   	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>   	at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>   	at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
>   	at sun.reflect.GeneratedMethodAccessor180.invoke(Unknown Source)
>   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   	at java.lang.reflect.Method.invoke(Unknown Source)
>   	at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>   	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>   	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>   	at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>   	at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
>   	at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
>   	at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
>   	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
>   	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
>   	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
>   	at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown Source)
>   	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
>   	at java.security.AccessController.doPrivileged(Native Method)
>   	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
>   	at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
>   	at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
>   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   	at java.lang.reflect.Method.invoke(Unknown Source)
>   	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
>   	at sun.rmi.transport.Transport$1.run(Unknown Source)
>   	at java.security.AccessController.doPrivileged(Native Method)
>   	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
>   	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
>   	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
>   	at java.lang.Thread.run(Unknown Source)
>   Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor: errors:
>   
>   error: cvc-complex-type.2.4a: Expected elements '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
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
persistence@http://java.sun.com/xml/ns/persistence' instead of 'security@http://geronimo.apache.org/xml/ns/security-2.0'
here
>   
>   Descriptor:
>   <xml-fragment xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" xmlns:pers="http://java.sun.com/xml/ns/persistence"
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0" xmlns:tom="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1">
>     <dep:environment>
>       <dep:moduleId>
>         <dep:groupId>default</dep:groupId>
>         <dep:artifactId>MyWeb1</dep:artifactId>
>         <dep:version>2.0</dep:version>
>         <dep:type>car</dep:type>
>       </dep:moduleId>
>       <dep:dependencies>
>         <dep:dependency>
>           <dep:groupId>org.apache.geronimo.configs</dep:groupId>
>           <dep:artifactId>sharedlib</dep:artifactId>
>           <dep:type>car</dep:type>
>         </dep:dependency>
>         <dep:dependency>
>           <dep:groupId>org.apache.geronimo.configs</dep:groupId>
>           <dep:artifactId>j2ee-server</dep:artifactId>
>           <dep:type>car</dep:type>
>         </dep:dependency>
>       </dep:dependencies>
>     </dep:environment>
>     <tom:context-root>/TestWeb1</tom:context-root>
>     <web:security-realm-name>myrealm</web:security-realm-name>
>     <sec:security use-context-handler="false" doas-current-caller="false" default-role="user">
>         <sec:role-mappings/>
>     </sec:security>
>   </xml-fragment>
>   
>   	at org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD(XmlBeansUtil.java:187)
>   	at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.getTomcatWebApp(TomcatModuleBuilder.java:312)
>   	... 43 more
> {noformat}
> Remove " <sec:role-mappings/>", the above deployment plan works fine.

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


Mime
View raw message