geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Error deploying in 1.1 (with parent/dependency with no version)
Date Fri, 07 Apr 2006 22:50:09 GMT
I get this when using the console to deploy a security realm including
a parent with no version specified:

...
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException:
java.lang.ClassCastException
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadDepthFirst(SimpleConfigurationManager.java:251)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:133)
        at org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:162)
        ... 24 more
Caused by: java.lang.ClassCastException
        at org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolveVersion(DefaultArtifactResolver.java:107)
        at org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:80)
        at org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:64)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.resolveParentIds(SimpleConfigurationManager.java:275)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadDepthFirst(SimpleConfigurationManager.java:231)
        ... 26 more


The plan is:


<configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
    <environment>
        <configId>
            <groupId>console</groupId>
            <artifactId>realm-SQL</artifactId>
            <version>1.0</version>
            <type>car</type>
        </configId>
        <dependencies>
            <dependency>
                <groupId>geronimo</groupId>
                <artifactId>j2ee-security</artifactId>
                <type>car</type>
            </dependency>
            <dependency>
                <groupId>org.apache.derby</groupId>
                <artifactId>derbyclient</artifactId>
                <version>10.1.1.0</version>
                <type>jar</type>
            </dependency>
        </dependencies>
    </environment>
    <gbean name="SQL"
class="org.apache.geronimo.security.realm.GenericSecurityRealm">
        <attribute name="realmName">SQL</attribute>
        <reference name="ServerInfo">
            <name>ServerInfo</name>
        </reference>
        <reference name="LoginService">
            <name>JaasLoginService</name>
        </reference>
        <xml-reference name="LoginModuleConfiguration">
            <log:login-config
xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
                <log:login-module control-flag="REQUIRED"
server-side="true" wrap-principals="false">
                    <log:login-domain-name>SQL</log:login-domain-name>
                   
<log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
                    <log:option name="userSelect">SELECT username,
password FROM users WHERE username=?</log:option>
                    <log:option
name="jdbcDriver">org.apache.derby.jdbc.EmbeddedDriver</log:option>
                    <log:option name="groupSelect">SELECT username,
group_name FROM user_groups WHERE username=?</log:option>
                    <log:option name="jdbcURL">jdbc:derby:security</log:option>
                </log:login-module>
            </log:login-config>
        </xml-reference>
    </gbean>
</configuration>


If you want to make this work use the DB Manager portlet to create a
database called "security" and then to run this SQL in that database:


create table users(username varchar(20), password varchar(20));
create table user_groups (username varchar(20), group_name varchar(20));
insert into users values ('ammulder','dev');
insert into user_groups values ('ammulder','Testers');
insert into user_groups values ('ammulder','Developers');


Thanks,
    Aaron

Mime
View raw message