You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Bill Brown <wb...@colorfulsoftware.com> on 2010/01/11 16:30:58 UTC

issue deploying webapp with security realm

Greetings: 

I've got a copy of littl-g 2.2 (tomcat) running but have an issue deploying
a web app that uses a properties file security realm.  It is failing with
the following exception during deployment:

The application was not deployed.
Unable to resolve reference "ConfigurationFactory"
    in gbean
com.colorfulsoftware/feedwork/1.0.0.0/war?J2EEApplication=null,j2eeType=WebModule,name=com.colorfulsoftware/feedwork/1.0.0.0/war
    to a gbean matching the pattern
[?name=feedwork#org.apache.geronimo.security.jaas.ConfigurationFactory]
    due to: No matches for referencePatterns:
[?name=feedwork#org.apache.geronimo.security.jaas.ConfigurationFactory]
org.apache.geronimo.common.DeploymentException: Unable to resolve reference
"ConfigurationFactory"
    in gbean
com.colorfulsoftware/feedwork/1.0.0.0/war?J2EEApplication=null,j2eeType=WebModule,name=com.colorfulsoftware/feedwork/1.0.0.0/war
    to a gbean matching the pattern
[?name=feedwork#org.apache.geronimo.security.jaas.ConfigurationFactory]
    due to: No matches for referencePatterns:
[?name=feedwork#org.apache.geronimo.security.jaas.ConfigurationFactory]
	at
org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:656)
	at org.apache.geronimo.deployment.Deployer.install(Deployer.java:339)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:263)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
	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:130)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
	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)


Looking through the jira and forums, there are two threads addressing this: 
http://issues.apache.org/jira/browse/GERONIMO-4772 and
https://issues.apache.org/jira/browse/GERONIMO-4553.  

According to the reports, I should be able to work around the issue by
adding the security realm as a dependency in the geronimo-web.xml. 
https://issues.apache.org/jira/browse/GERONIMO-4553?focusedCommentId=12738770&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12738770

I've tried adding the following in geronimo-web.xml but the error still
appears.  Does anyone here know how I can add the correct dependency to make
the error go away and deploy the app?

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
	<dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
		<dep:moduleId>
			<dep:groupId>com.colorfulsoftware</dep:groupId>
			<dep:artifactId>feedwork</dep:artifactId>
			<dep:version>1.0.0.0</dep:version>
			<dep:type>war</dep:type>
		</dep:moduleId>
		<dep:dependencies>
			<dep:dependency>
				<dep:groupId>org.apache.geronimo.configs</dep:groupId>
				<dep:artifactId>javamail</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:dependency>
				<dep:groupId>org.apache.geronimo.framework</dep:groupId>
				<dep:artifactId>j2ee-security</dep:artifactId>
				<dep:version>2.2</dep:version>
				<dep:type>car</dep:type>
			</dep:dependency>

			<dep:dependency>
				<dep:groupId>org.apache.geronimo.framework</dep:groupId>
				<dep:artifactId>j2ee-security</dep:artifactId>
				<dep:type>car</dep:type>
			</dep:dependency>
		</dep:dependencies>
	</dep:environment>
.....

Thanks for your help, insight or information. 
Bill.

-- 
View this message in context: http://old.nabble.com/issue-deploying-webapp-with-security-realm-tp27112307s134p27112307.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: issue deploying webapp with security realm

Posted by Bill Brown <wb...@colorfulsoftware.com>.

Bill Brown wrote:
> 
> According to the reports, I should be able to work around the issue by
> adding the security realm as a dependency in the geronimo-web.xml. 
> https://issues.apache.org/jira/browse/GERONIMO-4553?focusedCommentId=12738770&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12738770
> 

Ok. I answered the question after a little while of trial and error.  I
needed to replace these in geronimo-web.xml <environment> section:

                        <dep:dependency>
				<dep:groupId>org.apache.geronimo.configs</dep:groupId>
				<dep:artifactId>j2ee-server</dep:artifactId>
				<dep:type>car</dep:type>
			</dep:dependency>
			<dep:dependency>
				<dep:groupId>org.apache.geronimo.framework</dep:groupId>
				<dep:artifactId>j2ee-security</dep:artifactId>
				<dep:version>2.2</dep:version>
				<dep:type>car</dep:type>
			</dep:dependency>

			<dep:dependency>
				<dep:groupId>org.apache.geronimo.framework</dep:groupId>
				<dep:artifactId>j2ee-security</dep:artifactId>
				<dep:type>car</dep:type>
			</dep:dependency>
			
With this one which is found in the usage section for the realm listing in
the console repository.

			<dependency>
                              <groupId>console.realm</groupId>
                              <artifactId>feedwork</artifactId>
                              <version>1.0</version>
                              <type>car</type>
                        </dependency> 

And the app deployed just fine with the authentication/authorization
working. 
HTH. 

Bill. 
-- 
View this message in context: http://old.nabble.com/issue-deploying-webapp-with-security-realm-tp27112307s134p27118057.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.