Hi,

I need to use jpa ticket registry in my Cas 4.0 installation. 

Follow the steps of 
 https://apereo.github.io/cas/4.0.x/installation/JPA-Ticket-Registry.html 
 but, when service start, its ok, but only create the tables: 
registeredserviceimpl, rs_attributes and hibernate_sequence sequence

The tables "ticketgrantingticket" and "serviceticket" are missing. No 
messages in the tomcat log.

---------------------------------------------------------------------
ticketRegistry.xml:

<?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:tx="http://www.springframework.org/schema/tx";
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd 
http://www.springframework.org/schema/tx
     http://www.springframework.org/schema/tx/spring-tx.xsd";>
    <description>
    Configuration for the default TicketRegistry which stores the tickets 
in-memory and cleans them out as specified intervals.
    </description>
       
  <bean id="ticketRegistry" 
class="org.jasig.cas.ticket.registry.JpaTicketRegistry" />

  <bean 
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>

  <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.PostgreSQLDialect</prop>
   <prop key="hibernate.hbm2ddl.auto">update</prop>
 </props>
</property>
  </bean>
  <bean id="transactionManager" 
class="org.springframework.orm.jpa.JpaTransactionManager" 
p:entityManagerFactory-ref="entityManagerFactory" />

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

<bean id="dataSource"
  class="com.mchange.v2.c3p0.ComboPooledDataSource"
  p:driverClass="org.postgresql.Driver"
  p:jdbcUrl="jdbc:postgresql://localhost/db_name"
  p:user="user"
  p:password="password" /> 
  
<!-- TICKET REGISTRY CLEANER -->  
<bean id="ticketRegistryCleaner" 
class="org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner"
p:ticketRegistry-ref="ticketRegistry"
p:lock-ref="cleanerLock" />

<bean id="cleanerLock" 
class="org.jasig.cas.ticket.registry.support.JpaLockingStrategy"
p:uniqueId="${host.name}"
p:applicationId="cas-ticket-registry-cleaner" />
  
</beans>

---------------------------------------------------------------------
persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";
         version="2.0">
    <persistence-unit name="dataSource" transaction-type="RESOURCE_LOCAL">

    <class>org.jasig.cas.services.AbstractRegisteredService</class>

    <properties>
        <property name="hibernate.connection.driver_class" 
value="com.mysql.jdbc.Driver"/>
        <property name="hibernate.dialect" 
value="org.hibernate.dialect.PostgreSQLDialect"/>
        <property name="hibernate.connection.url" 
value="jdbc:postgresql://localhost/db_name" />
        <property name="hibernate.connection.username" value="user"/>
        <property name="hibernate.connection.password" value="password"/>   
     
    </properties>
</persistence-unit>
</persistence>

---------------------------------------------------------------------
cas.properties:

database.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect



All comments are appreciated.


Thank you very much.

-- 
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/97c7d0e9-6889-4ecc-a3e1-ef32e89475ff%40apereo.org.

Reply via email to