So I have cleaned up a bunch of stuff trying to track down the problem and
I still don't see it.
Here is what I have done:
I am using the war overlay method:
<properties>
<cas.version>3.4.12</cas.version>
<hibernate.core.version>3.6.0.Final</hibernate.core.version>
</properties>
...
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.core.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.core.version}</version>
<scope>runtime</scope>
</dependency>
changed my deployConfigContext.xml to include this (commenting out the
in-memory one):
<bean id="serviceRegistryDao" class=
"org.jasig.cas.services.JpaServiceRegistryDaoImpl"
p:entityManagerFactory-ref="entityManagerFactory" />
<bean id="entityManagerFactory" class=
"org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="libs.dataSource.cas"/>
<property name="jpaVendorAdapter">
<bean class=
"org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="true"/> <!-- CHANGE
BACK TO FALSE -->
<property name="showSql" value="true" />
</bean>
</property>
<property name="jpaPropertyMap">
<map>
<!-- <prop
key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop> -->
<entry key="hibernate.dialect" value=
"org.hibernate.dialect.MySQL5InnoDBDialect"/>
<entry key="hibernate.hbm2ddl.auto" value="update"/>
<entry key="hibernate.format_sql" value="true"/>
<entry key="hibernate.default_schema" value ="casadm" />
</map>
</property>
</bean>
<bean id="transactionManager" class=
"org.springframework.orm.jpa.JpaTransactionManager"
p:entityManagerFactory-ref="entityManagerFactory" />
<tx:annotation-driven transaction-manager="transactionManager"/>
and added this for the AuthenticationHandler:
<bean class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler"
>
<property name="dataSource" ref="libs.dataSource.cas" /> <!-- CHANGE TO
CREW -->
<property name="sql" value="select password from crewadm.web_login
where login_id = ?" />
</bean>
then changed the ticketRegistry.xml to this:
<!-- Ticket Registry -->
<bean id="ticketRegistry" class=
"org.jasig.cas.ticket.registry.JpaTicketRegistry" />
<!-- 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" />
<bean id="ticketRegistryCleanerJobDetail"
class=
"org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="ticketRegistryCleaner"
p:targetMethod="clean" />
<bean id="periodicTicketRegistryCleanerTrigger"
class="org.springframework.scheduling.quartz.SimpleTriggerBean"
p:jobDetail-ref="ticketRegistryCleanerJobDetail"
p:startDelay="20000"
p:repeatInterval="1800000" />
If I login to just my server it is successful, but if I login to my an app
that redirects to CAS, the login page is displayed, but I get this logged
to the tomcat console:
2012-05-18 13:50:02,898 INFO
[com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit
trail record BEGIN
=============================================================
WHO: [username: testuser]
WHAT: java.lang.NullPointerException
ACTION: TICKET_GRANTING_TICKET_NOT_CREATED
APPLICATION: CAS
WHEN: Fri May 18 13:50:02 MDT 2012
CLIENT IP ADDRESS: fe80:0:0:0:e2f8:47ff:fe2f:eba8%5
SERVER IP ADDRESS: fe80:0:0:0:e2f8:47ff:fe2f:eba8%5
=============================================================
Also, when cleaning up I am getting this error:
2012-05-18 13:59:30,297 ERROR [org.quartz.core.JobRunShell] - <Job
DEFAULT.ticketRegistryCleanerJobDetail threw an unhandled Exception: >
org.springframework.scheduling.quartz.JobMethodInvocationFailedException:
Invocation of method 'clean' on target class [class
org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] failed;
nested exception is java.lang.NullPointerException
at
org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
at
org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: java.lang.NullPointerException
The in memory model was working, do I have something mismatched with the
upgrade to 3.4.12?
TIA,
~karl~
On Thu, May 17, 2012 at 7:24 AM, Marvin S. Addison <[email protected]
> wrote:
> Caused by:
>> com.mysql.jdbc.exceptions.**jdbc4.**MySQLIntegrityConstraintViolat**
>> ionException:
>> Cannot add or update a child row: a foreign key constraint fails
>> (`casadm`.`serviceticket`, CONSTRAINT `FK7645ADE132A2C0E5` FOREIGN KEY
>> (`ticketGrantingTicket_ID`) REFERENCES `TICKETGRANTINGTICKET` (`ID`))
>>
>
> Seems to suggest that the parent TGT doesn't exist in the
> TICKETGRANTINGTICKET table for the ST you're trying to create. Have you
> confirmed that the parent record exists? If it doesn't, then it begs the
> question why not, but at least you'll be tracking the root problem instead.
>
> M
>
> --
> 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<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