geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toby cabot <t...@caboteria.org>
Subject Re: Please try out the upgrade jar
Date Fri, 26 May 2006 19:29:09 GMT
David,

Thanks for providing this tool, it's a big help.  I had some problems
on a test geronimo-application.xml file that includes some gbean
references (for hooking up to security gbeans).  The file looks like:

=================================================
<?xml version="1.0" ?>

<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
  configId="hello"
  parentId="geronimo/j2ee-security/1.0.1-SNAPSHOT/car">


    <gbean name="hello-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
        <attribute name="realmName">hello-realm</attribute>
        <reference name="LoginModuleConfiguration">
            <name>hello-login-chain</name>
        </reference>
        <reference name="ServerInfo">
            <gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-system/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</gbean-name>
        </reference>
        <reference name="LoginService">
            <gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-security/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService</gbean-name>
        </reference>
    </gbean>


    <gbean name="hello-login-chain" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
        <attribute name="controlFlag">REQUIRED</attribute>
        <reference name="LoginModule">
            <name>hello-login</name>
        </reference>
    </gbean>


    <gbean name="hello-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
        <attribute name="loginModuleClass">reva.common.auth.TrivialLoginModule</attribute>
        <attribute name="serverSide">true</attribute>
        <attribute name="options">
            usersURI=var/security/demo_users.properties
            groupsURI=var/security/demo_groups.properties
        </attribute>
        <attribute name="loginDomainName">hello-realm</attribute>
    </gbean>


</application>
=================================================

The problem seems to be the application/gbean/reference/gbean-name
elements, as the error I get at offline deploy time looks like:

Deployer operation failed: org.apache.xmlbeans.XmlException: Invalid deployment descriptor:
[error: cvc-complex-type.2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1
artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1 version@http://geronimo.apache.org/xml/ns/deployment-1.1
module@http://geronimo.apache.org/xml/ns/deployment-1.1 type@http://geronimo.apache.org/xml/ns/deployment-1.1
name@http://geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1'
here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type.2.4a:
Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1
version@http://geronimo.apache.org/xml/ns/deployment-1.1 module@http://geronimo.apache.org/xml/ns/deployment-1.1
type@http://geronimo.apache.org/xml/ns/deployment-1.1 name@http://geronimo.apache.org/xml/ns/deployment-1.1'
instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>default</dep:groupId>
      <dep:artifactId>hello</dep:artifactId>
      <dep:version>1-default</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>j2ee-security</dep:artifactId>
        <dep:version>1.0.1-SNAPSHOT</dep:version>
        <dep:type>car</dep:type>
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <dep:gbean name="hello-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
    <dep:attribute name="realmName">hello-realm</dep:attribute>
    <dep:reference name="LoginModuleConfiguration">
      <dep:name>hello-login-chain</dep:name>
    </dep:reference>
    <dep:reference name="ServerInfo">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-system/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean-name>
    </dep:reference>
    <dep:reference name="LoginService">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-security/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService</dep:gbean-name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login-chain" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
    <dep:reference name="LoginModule">
      <dep:name>hello-login</dep:name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
    <dep:attribute name="loginModuleClass">reva.common.auth.TrivialLoginModule</dep:attribute>
    <dep:attribute name="serverSide">true</dep:attribute>
    <dep:attribute name="options">usersURI=var/security/demo_users.properties
            groupsURI=var/security/demo_groups.properties</dep:attribute>
    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
  </dep:gbean>
</xml-fragment>
org.apache.geronimo.common.DeploymentException: org.apache.xmlbeans.XmlException: Invalid
deployment descriptor: [error: cvc-complex-type.2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1
artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1 version@http://geronimo.apache.org/xml/ns/deployment-1.1
module@http://geronimo.apache.org/xml/ns/deployment-1.1 type@http://geronimo.apache.org/xml/ns/deployment-1.1
name@http://geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1'
here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type.2.4a:
Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1
version@http://geronimo.apache.org/xml/ns/deployment-1.1 module@http://geronimo.apache.org/xml/ns/deployment-1.1
type@http://geronimo.apache.org/xml/ns/deployment-1.1 name@http://geronimo.apache.org/xml/ns/deployment-1.1'
instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>default</dep:groupId>
      <dep:artifactId>hello</dep:artifactId>
      <dep:version>1-default</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>j2ee-security</dep:artifactId>
        <dep:version>1.0.1-SNAPSHOT</dep:version>
        <dep:type>car</dep:type>
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <dep:gbean name="hello-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
    <dep:attribute name="realmName">hello-realm</dep:attribute>
    <dep:reference name="LoginModuleConfiguration">
      <dep:name>hello-login-chain</dep:name>
    </dep:reference>
    <dep:reference name="ServerInfo">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-system/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean-name>
    </dep:reference>
    <dep:reference name="LoginService">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-security/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService</dep:gbean-name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login-chain" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
    <dep:reference name="LoginModule">
      <dep:name>hello-login</dep:name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
    <dep:attribute name="loginModuleClass">reva.common.auth.TrivialLoginModule</dep:attribute>
    <dep:attribute name="serverSide">true</dep:attribute>
    <dep:attribute name="options">usersURI=var/security/demo_users.properties
            groupsURI=var/security/demo_groups.properties</dep:attribute>
    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
  </dep:gbean>
</xml-fragment>
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfigBuilder.java:342)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:260)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$a95a5462.getDeploymentPlan(<generated>)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:229)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:121)
        at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:106)
        at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:60)
        at java.lang.Thread.run(Thread.java:534)


I have a vaguely ominous sense that the way I'm using gbean-name isn't
kosher, but it has worked fine up till now.

Thanks,
Toby

Mime
View raw message