Hi Ren,

The first problem is that apparently the configuration is not being replaced
in the package,
the evidence is org.jasig.cas.ticket.registry.DefaultTicketRegistry in log
text.

To declare the configuration of the persistence.xml in the spring you need
to set the property (persistenceXmlLocation).

To create tables change hibernate.hbm2ddl.auto to create (<prop
key="hibernate.hbm2ddl.auto">create</prop>).

--- ticketRegistry.xml
    <!-- Ticket Registry -->
    <bean id="ticketRegistry"
class="org.jasig.cas.ticket.registry.JpaTicketRegistry">
        <constructor-arg index="0" ref="entityManagerFactory" />
    </bean>

    <bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager"
        p:entityManagerFactory-ref="entityManagerFactory" />

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

    <bean id="entityManagerFactory"

class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
         <property name="persistenceXmlLocation"
value="classpath:config/persistence.xml" />
         <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>

-- end of partial ticketRegistry.xml


--- example of persistence.xml ---

<?xml version="1.0" encoding="UTF-8"?>

<persistence version="1.0"
    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_1_0.xsd";>

    <persistence-unit name="casPU" transaction-type="RESOURCE_LOCAL">

        <jta-data-source>java:jdbc/casDS</jta-data-source>

        <class>org.jasig.cas.ticket.TicketGrantingTicketImpl</class>
        <class>org.jasig.cas.ticket.ServiceTicketImpl</class>
    </persistence-unit>

</persistence>

--- end of persistence.xml ---


Cheers,

Yuri Feitosa Negócio


On Tue, Feb 15, 2011 at 9:33 AM, Ren standist <stand...@gmail.com> wrote:

> any suggestion?
>
>
> On Mon, Feb 14, 2011 at 10:31 PM, Ren standist <stand...@gmail.com> wrote:
>
>> not related with persistence.xml
>>
>> but why?
>>
>> On Sun, Feb 13, 2011 at 10:19 AM, Ren standist <stand...@gmail.com>wrote:
>>
>>> Is there anything about persistence.xml
>>>
>>> should I change persistence.xml? if so ,how to
>>>
>>>
>>> On Sun, Feb 13, 2011 at 9:26 AM, Ren standist <stand...@gmail.com>wrote:
>>>
>>>> the modified ticketregistry.xml is under
>>>> tomcat\webapps\cas\web-info\spring-configuration directory
>>>> so it should not the wrong  ticketregistry.xml file
>>>>
>>>>
>>>> On Sun, Feb 13, 2011 at 2:40 AM, Scott Battaglia <
>>>> scott.battag...@gmail.com> wrote:
>>>>
>>>>> If you're not using your registry then you've built the WAR wrong and
>>>>> you included the original file. How are you building the WAR file?
>>>>>
>>>>>
>>>>> On Sat, Feb 12, 2011 at 9:37 AM, Ren standist <stand...@gmail.com>wrote:
>>>>>
>>>>>> I turn on logging for org.jasig.cas.ticket.registry,and find that not
>>>>>> using jpa instead of DefaultTicketRegistry. This is why no any data in
>>>>>> table.So the problem should be ticktregistry.xml ,why jpa not function?
>>>>>>
>>>>>> 2011-02-12 22:31:57,712 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Added ticket
>>>>>> [TGT-1-77c5ygfrDZdiVCDwaP1nZOzdRsFPc16sUBdtbMS7GutSDB5fRz-ca
>>>>>> s] to registry.>
>>>>>>
>>>>>> 2011-02-12 22:31:57,727 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Attempting to retrieve ticket
>>>>>> [TGT-1-77c5ygfrDZdiVCDwaP1nZOzdRsFPc16sUBdt
>>>>>> bMS7GutSDB5fRz-cas]>
>>>>>> 2011-02-12 22:31:57,727 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Ticket
>>>>>> [TGT-1-77c5ygfrDZdiVCDwaP1nZOzdRsFPc16sUBdtbMS7GutSDB5fRz-cas] fou
>>>>>> nd in registry.>
>>>>>> 2011-02-12 22:31:57,727 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Added ticket [ST-1-TWIeCfF6UCztBWBAFh0D-cas] to registry.>
>>>>>> 2011-02-12 22:31:57,743 INFO
>>>>>> [org.jasig.cas.CentralAuthenticationServiceImpl] -
>>>>>> <Granted service ticket [ST-1-TWIeCfF6UCztBWBAFh0D-cas] for service [
>>>>>> http://pi01
>>>>>> .jnpc.com.cn/] for user [renzp]>
>>>>>> 2011-02-12 22:31:57,743 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Attempting to retrieve ticket
>>>>>> [TGT-1-77c5ygfrDZdiVCDwaP1nZOzdRsFPc16sUBdt
>>>>>> bMS7GutSDB5fRz-cas]>
>>>>>> 2011-02-12 22:31:57,743 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Ticket
>>>>>> [TGT-1-77c5ygfrDZdiVCDwaP1nZOzdRsFPc16sUBdtbMS7GutSDB5fRz-cas] fou
>>>>>> nd in registry.>
>>>>>>
>>>>>> 2011-02-12 22:31:57,743 INFO
>>>>>> [org.jasig.cas.web.flow.PasswordWarningCheckAction]
>>>>>>  - <Not a login attempt, skipping PasswordWarnCheck>
>>>>>> 2011-02-12 22:31:58,696 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Attempting to retrieve ticket [ST-1-TWIeCfF6UCztBWBAFh0D-cas]>
>>>>>> 2011-02-12 22:31:58,696 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Ticket [ST-1-TWIeCfF6UCztBWBAFh0D-cas] found in registry.>
>>>>>> 2011-02-12 22:31:58,696 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Removing ticket [ST-1-TWIeCfF6UCztBWBAFh0D-cas] from registry>
>>>>>> 2011-02-12 22:31:58,696 DEBUG
>>>>>> [org.jasig.cas.ticket.registry.DefaultTicketRegist
>>>>>> ry] - <Attempting to retrieve ticket [ST-1-TWIeCfF6UCztBWBAFh0D-cas]>
>>>>>>
>>>>>>
>>>>>> On Sat, Feb 12, 2011 at 10:11 PM, Ren standist <stand...@gmail.com>wrote:
>>>>>>
>>>>>>> any idea?
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Feb 11, 2011 at 11:19 PM, Ren standist 
>>>>>>> <stand...@gmail.com>wrote:
>>>>>>>
>>>>>>>> here is ticketregistry.xml
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Feb 11, 2011 at 11:18 PM, Ren standist 
>>>>>>>> <stand...@gmail.com>wrote:
>>>>>>>>
>>>>>>>>>  ticketregistry.xml should works for it create table in database
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Feb 11, 2011 at 11:16 PM, Ren standist <stand...@gmail.com
>>>>>>>>> > wrote:
>>>>>>>>>
>>>>>>>>>>  turn up logging for org.hibernate
>>>>>>>>>>
>>>>>>>>>> when user logged there is nothing ,it seem like ticketregistry.xml
>>>>>>>>>> not work at all.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Fri, Feb 11, 2011 at 11:01 PM, Scott Battaglia <
>>>>>>>>>> scott.battag...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> We're using Hibernate for persistence so you'd need to turn up
>>>>>>>>>>> logging for org.hibernate
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Feb 11, 2011 at 9:55 AM, Ren standist <
>>>>>>>>>>> stand...@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> change to
>>>>>>>>>>>> <logger name="org.jasig.cas.ticket.registry.JpaTicketRegistry"
>>>>>>>>>>>> additivity="true">
>>>>>>>>>>>>     <level value="debug" />
>>>>>>>>>>>>     <appender-ref ref="jpa"/>
>>>>>>>>>>>>   </logger>
>>>>>>>>>>>>
>>>>>>>>>>>> and there is nothing in jpa.log
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Feb 11, 2011 at 10:43 PM, Ren standist <
>>>>>>>>>>>> stand...@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> change to
>>>>>>>>>>>>> <logger name="org.jasig.cas.ticket.registry.JpaTicketRegistry">
>>>>>>>>>>>>>     <level value="INFO" />
>>>>>>>>>>>>>   </logger>
>>>>>>>>>>>>>
>>>>>>>>>>>>> and got nothing about JpaTicketRegistry
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Feb 11, 2011 at 10:27 PM, Ren standist <
>>>>>>>>>>>>> stand...@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> when i add following to log4j.xml ,got error message ERROR No
>>>>>>>>>>>>>> appender named [jpa] could be found.
>>>>>>>>>>>>>> <logger name="org.jasig.cas.ticket.registry.JpaTicketRegistry"
>>>>>>>>>>>>>> additivity="false">
>>>>>>>>>>>>>>     <level value="INFO" />
>>>>>>>>>>>>>>     <appender-ref ref="jpa"/>
>>>>>>>>>>>>>>   </logger>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Fri, Feb 11, 2011 at 9:47 PM, Ren standist <
>>>>>>>>>>>>>> stand...@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Fri, Feb 11, 2011 at 9:16 PM, Marvin Addison <
>>>>>>>>>>>>>>> marvin.addi...@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> > First question how tables was created ?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hibernate schema generation feature.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> > When user login there is nothing is
>>>>>>>>>>>>>>>> table TICKETGRANTINGTICKET ,but user
>>>>>>>>>>>>>>>> > expire policy works fine.
>>>>>>>>>>>>>>>> > Is there a way to find the problem ,why not insert into
>>>>>>>>>>>>>>>> table?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Can you share your deployerConfigContext.xml file and
>>>>>>>>>>>>>>>> relevant
>>>>>>>>>>>>>>>> application logs?  See
>>>>>>>>>>>>>>>> https://wiki.jasig.org/display/CASUM/Logging
>>>>>>>>>>>>>>>> for help with logging configuration.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> M
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> You are currently subscribed to cas-user@lists.jasig.orgas:
>>>>>>>>>>>>>>>> stand...@gmail.com
>>>>>>>>>>>>>>>> To unsubscribe, change settings or access archives, see
>>>>>>>>>>>>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> You are currently subscribed to cas-user@lists.jasig.org as: 
>>>>>>>>>>>> scott.battag...@gmail.com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> To unsubscribe, change settings or access archives, see 
>>>>>>>>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> You are currently subscribed to cas-user@lists.jasig.org as: 
>>>>>>>>>>> stand...@gmail.com
>>>>>>>>>>>
>>>>>>>>>>> To unsubscribe, change settings or access archives, see 
>>>>>>>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> You are currently subscribed to cas-user@lists.jasig.org as: 
>>>>>> scott.battag...@gmail.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> To unsubscribe, change settings or access archives, see 
>>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>>
>>>>>>
>>>>>  --
>>>>> You are currently subscribed to cas-user@lists.jasig.org as: 
>>>>> stand...@gmail.com
>>>>> To unsubscribe, change settings or access archives, see 
>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>
>>>>>
>>>>
>>>
>>
> --
> You are currently subscribed to cas-user@lists.jasig.org as: yxml...@gmail.com
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
>

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to