Oh, you're right. There's an error in SecurityBuilder line 205 -- it
assumes that the default principal is a plain principal and ignores
the possibility that it's a realm or domain principal. Can you create
a Jira for this? It seems slightly different than the other one you
just entered.
Thanks,
Aaron
On 8/4/06, Vamsavardhana Reddy <[EMAIL PROTECTED]> wrote:
The following is the security related configuration in my geronimo-web.xml.
<security-realm-name>sql-realm-advanced</security-realm-name>
<security>
<default-principal>
<realm-principal realm-name="sql-realm-advanced"
domain-name="sql-realm"
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
name="admin"/>
</default-principal>
<role-mappings>
<role role-name="admin">
<realm-principal realm-name="sql-realm-advanced"
domain-name="sql-realm"
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
name="admin"/>
<realm-principal realm-name="sql-realm-advanced"
domain-name="sql-realm"
class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
name="user3"/>
</role>
<role role-name="user">
<realm-principal realm-name="sql-realm-advanced"
domain-name="sql-realm"
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
name="user"/>
<realm-principal realm-name="some-other-realm"
domain-name="sql-realm"
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
name="admin"/>
<principal
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
name="user"/>
</role>
</role-mappings>
</security>
On 8/4/06, Aaron Mulder <[EMAIL PROTECTED]> wrote:
> Please post your plan. It seems likely that either the principal
> class or principal name is missing.
>
> Thanks,
> Aaron
>
> On 8/4/06, Vamsavardhana Reddy <[EMAIL PROTECTED] > wrote:
> > Is it allowed to have a login-domain-principal or realm-principal as
> > default-principal tag? I am getting NullPointerExceptions while
deploying
> > web applications with deployment plan having login-domain-principal or
> > realm-principal as default-principal. Stacktrace given below.
> >
> > 18:27:38,580 ERROR [Deployer] Deployment failed due to
> > java.lang.NullPointerException
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildPrincipal
(SecurityBuilder.java:229)
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildDefaultPrincipal(SecurityBuilder.java:205)
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildSecurityConfig
(SecurityBuilder.java:196)
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildSecurityConfiguration(SecurityBuilder.java:60)
> > at
> >
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext
(TomcatModuleBuilder.java:260)
> > at
> >
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.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.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9d0e1f31.initContext(<generated>)
> > at
> >
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java
:156)
> > at
> >
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.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.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9d0e1f31.initContext
(<generated>)
> > at
> >
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:500)
> > 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$$a8fb27a3.buildConfiguration(<generated>)
> > at
> > org.apache.geronimo.deployment.Deployer.deploy
(Deployer.java:302)
> > at
> >
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124)
> > 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(Unknown Source)
> > 18:32:45,982 ERROR [Deployer] Deployment failed due to
> > java.lang.NullPointerException
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildPrincipal
(SecurityBuilder.java:229)
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildDefaultPrincipal(SecurityBuilder.java:205)
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildSecurityConfig
(SecurityBuilder.java:196)
> > at
> >
org.apache.geronimo.security.deployment.SecurityBuilder.buildSecurityConfiguration(SecurityBuilder.java:60)
> > at
> >
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext
(TomcatModuleBuilder.java:260)
> > at
> >
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.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.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9d0e1f31.initContext(<generated>)
> > at
> >
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java
:156)
> > at
> >
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.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.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9d0e1f31.initContext
(<generated>)
> > at
> >
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:500)
> > 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$$a8fb27a3.buildConfiguration(<generated>)
> > at
> > org.apache.geronimo.deployment.Deployer.deploy
(Deployer.java:302)
> > at
> >
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124)
> > 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(Unknown Source)
> >
> >
>