Hi,

  I'm trying to use a QueryDatabaseAuthenticationHandler to access
passwords in my database. The passwords are MD5-hashed, so I figured I
needed to use a DefaultPasswordEncoder. Based on what I've seen on the
web, I made changes to my pom.xml and deployerConfigContext.xml files.
When I try to start up the application, I'm now seeing this error:

 

Caused by: org.springframework.beans.BeanInstantiationException: Could
not instantiate bean class
[org.jasig.cas.authentication.handler.DefaultPasswordEncoder]: No
default constructor found; nested exception is
java.lang.NoSuchMethodException:
org.jasig.cas.authentication.handler.DefaultPasswordEncoder.<init>()

                at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
stantiate(SimpleInstantiationStrategy.java:72)

                at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990)

                ... 67 more

Caused by: java.lang.NoSuchMethodException:
org.jasig.cas.authentication.handler.DefaultPasswordEncoder.<init>()

                at java.lang.Class.getConstructor0(Class.java:2706)

                at
java.lang.Class.getDeclaredConstructor(Class.java:1985)

                at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
stantiate(SimpleInstantiationStrategy.java:67)

                ... 68 more

 

What am I missing? Do I need another dependency in my POM?

 

Thanks,
Eric

 

 


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:p="http://www.springframework.org/schema/p";
       xmlns:sec="http://www.springframework.org/schema/security";
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd";>

    <bean id="authenticationManager"
        class="org.jasig.cas.authentication.AuthenticationManagerImpl">
        
        <property name="credentialsToPrincipalResolvers">
            <list>
                <bean
                    class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
                <bean
                    class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
            </list>
        </property>

        <property name="authenticationHandlers">
            <list>
                <bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
                    p:httpClient-ref="httpClient" />
                <bean class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
                    <property name="dataSource" ref="jndiDataSource" />
                    <property name="sql" value="select user_epw from eim_ref.dbo.eim_user where eim_user_name = ? and eim_user_account_status = 'A' and account_type = 'LOGIN'" />
                    <property name="passwordEncoder" ref="passwordEncoder" />
                    
                </bean>
            </list>
        </property>
    </bean>
    
    <bean id="passwordEncoder"
          class="org.jasig.cas.authentication.handler.DefaultPasswordEncoder"
          p:encodingAlgorithm="HmacMD5"
          p:characterEncoding="UTF-8"
    />
    

    <bean id="jndiDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="java:comp/env/jdbc/EIM_REFERENCE_DATABASE"/>
        <property name="lookupOnStartup" value="false"/>
        <property name="proxyInterface" value="javax.sql.DataSource"/>
    </bean>

    <sec:user-service id="userDetailsService">
        <sec:user name="@@THIS SHOULD BE REPLACED@@" password="notused" authorities="ROLE_ADMIN" />
    </sec:user-service>
    
    <bean id="attributeRepository"
        class="org.jasig.services.persondir.support.StubPersonAttributeDao">
        <property name="backingMap">
            <map>
                <entry key="uid" value="uid" />
                <entry key="eduPersonAffiliation" value="eduPersonAffiliation" /> 
                <entry key="groupMembership" value="groupMembership" />
            </map>
        </property>
    </bean>
    
    <bean
        id="serviceRegistryDao"
        class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
            <property name="registeredServices">
                <list>
                    <bean class="org.jasig.cas.services.RegexRegisteredService">
                        <property name="id" value="0" />
                        <property name="name" value="HTTP and IMAP" />
                        <property name="description" value="Allows HTTP(S) and IMAP(S) protocols" />
                        <property name="serviceId" value="^(https?|imaps?)://.*" />
                        <property name="evaluationOrder" value="10000001" />
                    </bean>
                </list>
            </property>
        </bean>

  <bean id="auditTrailManager" class="com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager" />
  
  <bean id="healthCheckMonitor" class="org.jasig.cas.monitor.HealthCheckMonitor">
    <property name="monitors">
      <list>
        <bean class="org.jasig.cas.monitor.MemoryMonitor"
            p:freeMemoryWarnThreshold="10" />
        <bean class="org.jasig.cas.monitor.SessionMonitor"
            p:ticketRegistry-ref="ticketRegistry"
            p:serviceTicketCountWarnThreshold="5000"
            p:sessionCountWarnThreshold="100000" />
      </list>
    </property>
  </bean>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd ">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.locustec</groupId>
    <artifactId>locus-cas-webapp</artifactId>
    <packaging>war</packaging>
    <version>1.0.0</version>
 
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <cas.version>3.5.0</cas.version>
    </properties>
 
    <build>
        <plugins>
            <plugin>
                 <artifactId>maven-war-plugin</artifactId>
                 <version>2.0.1</version>
                 <configuration>
                     <warName>authentication</warName>
                 </configuration>
            </plugin>
        </plugins>
    </build>
 
    <dependencies>
        <dependency>
            <groupId>org.jasig.cas</groupId>
            <artifactId>cas-server-webapp</artifactId>
            <version>${cas.version}</version>
            <type>war</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.jasig.cas</groupId>
            <artifactId>cas-server-support-jdbc</artifactId>
            <version>${cas.version}</version>
        </dependency>
    </dependencies>
 
    <repositories>
        <repository>
            <id>ja-sig</id>
            <url>http://oss.sonatype.org/content/repositories/releases/ </url>
        </repository>
    </repositories>
    
</project>

Reply via email to