This content has been marked as final.
Show 3 replies
-
1. Re: DynamicLoginConfig - JBoss startup failed
jaikiran Dec 10, 2009 2:50 AM (in response to alexanderbell)The error is really misleading. The real problem with that dynamic-login-config.xml is that it doesn't follow the dtd. You are missing a "policy" element:
<?xml version="1.0" encoding="UTF-8"?> <policy> ...// the rest of what you have </policy>
By the way, starting AS-5, there's a simpler DynamicLoginConfig http://www.jboss.org/community/wiki/simplerapproachtoprovideapplicationspecificsecuritydomainconfiguration -
2. Re: DynamicLoginConfig - JBoss startup failed
alexanderbell Dec 10, 2009 11:58 AM (in response to alexanderbell)Hi,
thanks jaikiran but if I use the new way (of AS5) I get the following error:aused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: {urn:jboss:bean-deployer:2.0}policy not found as a child of {urn:jboss:bean-deployer:2.0}deployment in unordered_sequence: {urn:jboss:bean-deployer:2.0}stop? {urn:jboss:bean-deployer:2.0}destroy? {urn:jboss:bean-deployer:2.0}annotation* {urn:jboss:bean-deployer:2.0}alias* {urn:jboss:bean-deployer:2.0}start? {urn:jboss:bean-deployer:2.0}classloader? {urn:jboss:bean-deployer:2.0}create? {choice}* {wildcard}* at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
My sec-jboss-beans.xml looks like this<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="urn:jboss:bean-deployer:2.0"> <application-policy name="database-domain"> <authentication> <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required"> <module-option name="dsJndiName"> java:/jdbc/PostgresDS </module-option> <module-option name="principalsQuery"> SQL </module-option> <module-option name="rolesQuery"> SQL </module-option> </login-module> </authentication> </application-policy> </deployment>
So a Tag is missing between "deployment" and "application-policy" and it isn't "policy" because I tried it already.
Thanks Alex -
3. Re: DynamicLoginConfig - JBoss startup failed
wolfgangknauf Dec 11, 2009 7:22 AM (in response to alexanderbell)Hi,
I think you miss a namespace in "application-policy":<application-policy xmlns="urn:jboss:security-beans:1.0" xsi:schemaLocation="urn:jboss:security-beans:1.0 security-beans_1_0.xsd" name="..."> <authentication> ...
Important: remove the newlines/spaces in the "dsJndiName" module-option! https://jira.jboss.org/jira/browse/SECURITY-421
Hope this helps
Wolfgang