You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Lu Jiang (JIRA)" <ji...@apache.org> on 2010/05/12 09:02:40 UTC

[jira] Created: (GERONIMO-5299) Deploy plan for a web application with login-module attribute faiiled to be parsed.

Deploy plan for a web application with login-module attribute faiiled to be parsed.
-----------------------------------------------------------------------------------

                 Key: GERONIMO-5299
                 URL: https://issues.apache.org/jira/browse/GERONIMO-5299
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: deployment
    Affects Versions: 3.0
         Environment: OS:win xp
Server:GERONIMO 3.0-SANPSHOT 2010.5.6 build
JDK :1.6
            Reporter: Lu Jiang


Deploy a web application file-realm-demo.war with deploy plan demo-realm.xml.(see attach file).
The deploy plan failed to be parsed.
(ps:this application can be deployed and started successfully on geronimo 2.2)

2010-05-12 14:39:09,618 ERROR [DeploymentPortlet] 
Could not parse xml in plan
org.apache.geronimo.common.DeploymentException: Could not parse xml in plan
	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:191)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:231)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
	at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
	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:856)
	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:

D:\g30\geronimo-tomcat7-javaee6-3.0-SNAPSHOT\var\temp\demo-realm.xml:26:17: error: cvc-complex-type.3.2.1: Attribute not allowed (no wildcards allowed): server-side in element login-module@http://geronimo.apache.org/xml/ns/loginconfig-2.0

Descriptor:
<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
  <environment>
    <moduleId>
      <groupId>samples</groupId>
      <artifactId>realm-demo-properties-realm</artifactId>
      <version>2.1.1</version>
      <type>car</type>
    </moduleId>
    <dependencies>
      <dependency>
        <groupId>org.apache.geronimo.framework</groupId>
        <artifactId>j2ee-security</artifactId>
        <type>car</type>
      </dependency>
    </dependencies>
  </environment>
  <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
    <attribute name="realmName">demo-properties-realm</attribute>
    <reference name="ServerInfo">
      <name>ServerInfo</name>
    </reference>
    <xml-reference name="LoginModuleConfiguration">
      <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0">
        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
          <log:login-domain-name>demo-properties-realm</log:login-domain-name>
          <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
          <log:option name="usersURI">var/security/demo_users.properties</log:option>
          <log:option name="groupsURI">var/security/demo_groups.properties</log:option>
        </log:login-module>
      </log:login-config>
    </xml-reference>
  </gbean>
</module>

	at org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD(XmlBeansUtil.java:187)
	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:171)
	... 12 more

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


[jira] Resolved: (GERONIMO-5299) Deploy plan for a web application with login-module attribute faiiled to be parsed.

Posted by "Ivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan resolved GERONIMO-5299.
----------------------------

         Assignee: Ivan
    Fix Version/s: 3.0
       Resolution: Fixed

I commit some changes to trunk At revision: 944132. So XmlBeans will ignore to validate contents of lax type, since each sub-builder would re-validate the xml fragment it is reponsible for.
The reason caused this error is that login-config schema is not compatible between 1.2 and 2.0. In the lastest 2.0 version, server-side attribute is removed. Due to the classloader infrastruce change to OSGI style, currently each ***builder could see more xml namespace. That is why the issue did not occur in the old version,
By the way, since the application is of web application type, it is not correct to use the module type configuration as deployment plan, that is totally another type application type support by Geronimo. 

> Deploy plan for a web application with login-module attribute faiiled to be parsed.
> -----------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5299
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5299
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0
>         Environment: OS:win xp
> Server:GERONIMO 3.0-SANPSHOT 2010.5.6 build
> JDK :1.6
>            Reporter: Lu Jiang
>            Assignee: Ivan
>             Fix For: 3.0
>
>         Attachments: demo-realm.xml, file-realm-demo.war
>
>
> Deploy a web application file-realm-demo.war with deploy plan demo-realm.xml.(see attach file).
> The deploy plan failed to be parsed.
> (ps:this application can be deployed and started successfully on geronimo 2.2)
> 2010-05-12 14:39:09,618 ERROR [DeploymentPortlet] 
> Could not parse xml in plan
> org.apache.geronimo.common.DeploymentException: Could not parse xml in plan
> 	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:191)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:231)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
> 	at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
> 	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:856)
> 	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:
> D:\g30\geronimo-tomcat7-javaee6-3.0-SNAPSHOT\var\temp\demo-realm.xml:26:17: error: cvc-complex-type.3.2.1: Attribute not allowed (no wildcards allowed): server-side in element login-module@http://geronimo.apache.org/xml/ns/loginconfig-2.0
> Descriptor:
> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
>   <environment>
>     <moduleId>
>       <groupId>samples</groupId>
>       <artifactId>realm-demo-properties-realm</artifactId>
>       <version>2.1.1</version>
>       <type>car</type>
>     </moduleId>
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.geronimo.framework</groupId>
>         <artifactId>j2ee-security</artifactId>
>         <type>car</type>
>       </dependency>
>     </dependencies>
>   </environment>
>   <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>     <attribute name="realmName">demo-properties-realm</attribute>
>     <reference name="ServerInfo">
>       <name>ServerInfo</name>
>     </reference>
>     <xml-reference name="LoginModuleConfiguration">
>       <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0">
>         <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
>           <log:login-domain-name>demo-properties-realm</log:login-domain-name>
>           <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
>           <log:option name="usersURI">var/security/demo_users.properties</log:option>
>           <log:option name="groupsURI">var/security/demo_groups.properties</log:option>
>         </log:login-module>
>       </log:login-config>
>     </xml-reference>
>   </gbean>
> </module>
> 	at org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD(XmlBeansUtil.java:187)
> 	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:171)
> 	... 12 more

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


[jira] Updated: (GERONIMO-5299) Deploy plan for a web application with login-module attribute faiiled to be parsed.

Posted by "Lu Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lu Jiang updated GERONIMO-5299:
-------------------------------

    Attachment: demo-realm.xml
                file-realm-demo.war

> Deploy plan for a web application with login-module attribute faiiled to be parsed.
> -----------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5299
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5299
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0
>         Environment: OS:win xp
> Server:GERONIMO 3.0-SANPSHOT 2010.5.6 build
> JDK :1.6
>            Reporter: Lu Jiang
>         Attachments: demo-realm.xml, file-realm-demo.war
>
>
> Deploy a web application file-realm-demo.war with deploy plan demo-realm.xml.(see attach file).
> The deploy plan failed to be parsed.
> (ps:this application can be deployed and started successfully on geronimo 2.2)
> 2010-05-12 14:39:09,618 ERROR [DeploymentPortlet] 
> Could not parse xml in plan
> org.apache.geronimo.common.DeploymentException: Could not parse xml in plan
> 	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:191)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:231)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
> 	at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
> 	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:856)
> 	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:
> D:\g30\geronimo-tomcat7-javaee6-3.0-SNAPSHOT\var\temp\demo-realm.xml:26:17: error: cvc-complex-type.3.2.1: Attribute not allowed (no wildcards allowed): server-side in element login-module@http://geronimo.apache.org/xml/ns/loginconfig-2.0
> Descriptor:
> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
>   <environment>
>     <moduleId>
>       <groupId>samples</groupId>
>       <artifactId>realm-demo-properties-realm</artifactId>
>       <version>2.1.1</version>
>       <type>car</type>
>     </moduleId>
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.geronimo.framework</groupId>
>         <artifactId>j2ee-security</artifactId>
>         <type>car</type>
>       </dependency>
>     </dependencies>
>   </environment>
>   <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>     <attribute name="realmName">demo-properties-realm</attribute>
>     <reference name="ServerInfo">
>       <name>ServerInfo</name>
>     </reference>
>     <xml-reference name="LoginModuleConfiguration">
>       <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0">
>         <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
>           <log:login-domain-name>demo-properties-realm</log:login-domain-name>
>           <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
>           <log:option name="usersURI">var/security/demo_users.properties</log:option>
>           <log:option name="groupsURI">var/security/demo_groups.properties</log:option>
>         </log:login-module>
>       </log:login-config>
>     </xml-reference>
>   </gbean>
> </module>
> 	at org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD(XmlBeansUtil.java:187)
> 	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:171)
> 	... 12 more

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


[jira] Closed: (GERONIMO-5299) Deploy plan for a web application with login-module attribute faiiled to be parsed.

Posted by "Lu Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lu Jiang closed GERONIMO-5299.
------------------------------


Fixed after verification,so close it.

> Deploy plan for a web application with login-module attribute faiiled to be parsed.
> -----------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5299
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5299
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0
>         Environment: OS:win xp
> Server:GERONIMO 3.0-SANPSHOT 2010.5.6 build
> JDK :1.6
>            Reporter: Lu Jiang
>            Assignee: Ivan
>             Fix For: 3.0
>
>         Attachments: demo-realm.xml, file-realm-demo.war
>
>
> Deploy a web application file-realm-demo.war with deploy plan demo-realm.xml.(see attach file).
> The deploy plan failed to be parsed.
> (ps:this application can be deployed and started successfully on geronimo 2.2)
> 2010-05-12 14:39:09,618 ERROR [DeploymentPortlet] 
> Could not parse xml in plan
> org.apache.geronimo.common.DeploymentException: Could not parse xml in plan
> 	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:191)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:231)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
> 	at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
> 	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:856)
> 	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:
> D:\g30\geronimo-tomcat7-javaee6-3.0-SNAPSHOT\var\temp\demo-realm.xml:26:17: error: cvc-complex-type.3.2.1: Attribute not allowed (no wildcards allowed): server-side in element login-module@http://geronimo.apache.org/xml/ns/loginconfig-2.0
> Descriptor:
> <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
>   <environment>
>     <moduleId>
>       <groupId>samples</groupId>
>       <artifactId>realm-demo-properties-realm</artifactId>
>       <version>2.1.1</version>
>       <type>car</type>
>     </moduleId>
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.geronimo.framework</groupId>
>         <artifactId>j2ee-security</artifactId>
>         <type>car</type>
>       </dependency>
>     </dependencies>
>   </environment>
>   <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>     <attribute name="realmName">demo-properties-realm</attribute>
>     <reference name="ServerInfo">
>       <name>ServerInfo</name>
>     </reference>
>     <xml-reference name="LoginModuleConfiguration">
>       <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0">
>         <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
>           <log:login-domain-name>demo-properties-realm</log:login-domain-name>
>           <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
>           <log:option name="usersURI">var/security/demo_users.properties</log:option>
>           <log:option name="groupsURI">var/security/demo_groups.properties</log:option>
>         </log:login-module>
>       </log:login-config>
>     </xml-reference>
>   </gbean>
> </module>
> 	at org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD(XmlBeansUtil.java:187)
> 	at org.apache.geronimo.deployment.service.ServiceConfigBuilder.getDeploymentPlan(ServiceConfigBuilder.java:171)
> 	... 12 more

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