Brady,

Thanks that did it!  I had to remove the hibernate-annotations from the main 
web app pom and rebuild everything. Then build my overlay. Now I have new set 
of problems, hehe.

Should this be reported as a bug?

-Bryan

From: McClenon, Brady [mailto:[email protected]]
Sent: Thursday, April 12, 2012 12:53 PM
To: [email protected]
Subject: RE:[cas-user] Trouble instantiating servicesRegistryDao in 3.4.11

If I remember correctly, I had this issue too.  I commented out my dependency 
for hibernate-annotations in my pom.xml.    The article, that I now cannot 
find, stated that hibernate-annotations is included in hibernate-core as of 
3.6, so hibernate-annotations is not needed.  You will notice that there is no 
3.6.x version of hibernate-annotations, so it seemed plausible and I tried it.  
To be honest, I didn't really bother to learn why it fixed it, but it did.

Again, that's if I'm recalling correctly.... it appears I documented the 
change, but not why I made it. :(

Brady McClenon
Senior Server Administrator
SUNY Oneonta
607-436-3203

Lincoln: Is that even possible?
Walter: It's possible, of course. Leprechauns are possible.


From: Bryan Wooten 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Thursday, April 12, 2012 2:28 PM
To: [email protected]<mailto:[email protected]>
Subject: [cas-user] Trouble instantiating servicesRegistryDao in 3.4.11

All,

I am get this error when I try to deploy 3.4.11:

The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not 
have initialized.>
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'servicesManager' defined in ServletContext resource 
[/WEB-INF/spring-configuration/applicationContext.xml]: Cannot resolve 
reference to bean 'serviceRegistryDao' while setting constructor argument; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'serviceRegistryDao' defined in ServletContext 
resource [/WEB-INF/deployerConfigContext.xml]: Cannot resolve reference to bean 
'entityManagerFactory' while setting bean property 'entityManagerFactory'; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'entityManagerFactory' defined in ServletContext 
resource [/WEB-INF/deployerConfigContext.xml]: Invocation of init method 
failed; nested exception is java.lang.ExceptionInInitializerError

For the life of me I can't see what is wrong with my deployerConfigContext.xml. 
Here is the relevant part: (This works just fine in 3.4.5)

<bean id="serviceRegistryDao" 
class="org.jasig.cas.services.JpaServiceRegistryDaoImpl"
       p:entityManagerFactory-ref="entityManagerFactory" >
    </bean>

<!-- This is the EntityManagerFactory configuration for Hibernate -->



    <bean id="entityManagerFactory" 
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

        <property name="dataSource" ref="dataSource"/>
        <property name="jpaVendorAdapter">
            <bean 
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
                <property name="generateDdl" value="true"/>
                <property name="showSql" value="true" />
            </bean>
        </property>
        <property name="jpaProperties">
            <props>
                <prop 
key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop>
            </props>
        </property>
    </bean>


    <bean id="transactionManager" 
class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="entityManagerFactory"/>
    </bean>

    <tx:annotation-driven transaction-manager="transactionManager"/>


<bean
    id="dataSource"
    class="com.mchange.v2.c3p0.ComboPooledDataSource"
    p:driverClass="oracle.jdbc.driver.OracleDriver"
    p:jdbcUrl="${cas.database.url}"
    p:user="${cas.database.user}"
    p:password="${cas.database.password}"
    p:initialPoolSize="8"
    p:minPoolSize="8"
    p:maxPoolSize="64"
    p:maxIdleTimeExcessConnections="0"
    p:checkoutTimeout="0"
    p:acquireIncrement="3"
    p:acquireRetryAttempts="30"
    p:acquireRetryDelay="100"
    p:idleConnectionTestPeriod="0"

  />

Any help appreciated,

Bryan

--
You are currently subscribed to 
[email protected]<mailto:[email protected]> as: 
[email protected]<mailto:[email protected]>
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

--
You are currently subscribed to 
[email protected]<mailto:[email protected]> as: 
[email protected]<mailto:[email protected]>
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 
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

Reply via email to