First, you want to make sure you are using 4.1.2. No snapshots. Second, if you can post your overlay somewhere that we can locally try to connect to a database, that would be helpful. Otherwise, there is no troubleshooting this in an easy way.
From: [email protected] [mailto:[email protected]] Sent: Wednesday, December 2, 2015 8:49 PM To: jasig-cas-user <[email protected]> Cc: [email protected]; [email protected] Subject: Re: [cas-user] 4.1.2: JpaTicketRegistry: No transactional EntityManager available You are right. The default is JSON service registry + InMemory ticket registry. I changed InMemory ticket registry to JPA registry because my goal was to make CAS work with JpaRegistry. I got the error "No transactional entitymanager available". It looked like at lease two other users (Robert and Tai) had the exact same error as me. The version that I had the problem was 4.1.12-SNAPSHOT. However, I did try the overlay approach tonight based on this github code (https://github.com/leleuj/cas-overlay-demo) CAS version was 4.1.0 after cloning the repo and switch to 4.1.x branch. The database that I used was MySQL 5.7.9. I got a different error "no transaction is in progress] from registry". (see below) In both overlay and non-overlay approach, TGT was created and persisted successfully in the database. But the trouble was with ST. Any suggestions will be appreciated. WHO: casuser+password WHAT: TGT-**********************************************wt6cjyxwng-cas01.example.org ACTION: TICKET_GRANTING_TICKET_CREATED APPLICATION: CAS WHEN: Wed Dec 02 22:27:20 EST 2015 CLIENT IP ADDRESS: 192.168.1.15 SERVER IP ADDRESS: 192.168.1.15 ============================================================= > 2015-12-02 22:27:20,993 ERROR [org.jasig.cas.ticket.registry.JpaTicketRegistry] - <Error getting ticket [TGT-**********************************************wt6cjyxwng-cas01.example.org, javax.persistence.TransactionRequiredException: no transaction is in progress] from registry.> 2015-12-02 22:27:20,994 ERROR [org.jasig.cas.ticket.registry.JpaTicketRegistry] - <Error getting ticket [TGT-**********************************************wt6cjyxwng-cas01.example.org, javax.persistence.TransactionRequiredException: no transaction is in progress] from registry.> On Wednesday, December 2, 2015 at 1:31:25 PM UTC-5, Misagh Moayyed wrote: No, the default is a JSON service registry + InMemory ticket registry. There are no JPA transactions involved. - Misagh On Dec 2, 2015, at 11:28 AM, [email protected] <javascript:> wrote: I did not use overlay approach. I checked out 4.1.x the code and built it. I guess that by default Service Registry is JSON based and Ticket registry is JPA based. So I am not sure why there is multiple transaction manager. I do not think it is a code issue because if I switch to use DefaultTicketRegistry and everything works fine. I will try the overlay approach now and will report back what happened. thanks Frank On Wednesday, December 2, 2015 at 1:12:39 PM UTC-5, Misagh Moayyed wrote: I ran a quick test, with both JPA service registry and JPA ticket registry defined in an overlay using the same transaction manager. No issues. Post your overlay somewhere on github or pastebin and we might be able to spot something. Otherwise so far, it’s more likely a config issue on your end. - Misagh On Dec 1, 2015, at 10:15 PM, Tai Hu <[email protected] <mailto:[email protected]> > wrote: Do you find the solution for this "No transactional EntityManager available" issue? I just ran into the exact same problem. For both PostgreSQL and MySQL, merge method is never under a transaction. Thanks. On Monday, November 30, 2015 at 7:48:05 AM UTC-5, robertoschwald wrote: Hi all, while configuring CAS 4.1.2 with JpaTicketRegistry, I cannot get it to work. I always receive the following Exception: Exception thrown executing org.jasig.cas.web.flow.GenerateServiceTicketAction@6e6a43a4 <mailto:org.jasig.cas.web.flow.GenerateServiceTicketAction@6e6a43a4> in state 'generateServiceTicket' of flow 'login' javax.persistence.TransactionRequiredException: No transactional EntityManager available at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:275) at com.sun.proxy.$Proxy49.merge(Unknown Source) at org.jasig.cas.ticket.registry.JpaTicketRegistry.updateTicket(JpaTicketRegistry.java:57) I used the described config in http://jasig.github.io/cas/4.1.x/installation/JPA-Ticket-Registry.html and also added some pointcuts described in http://stackoverflow.com/a/33663812 But it still fails. My JPA config is in spring-configuration/ticketRegistry.xml. Anything else I’m missing? Robert -- 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] <mailto:[email protected]> . Visit this group at http://groups.google.com/a/apereo.org/group/cas-user/. -- 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] <mailto:[email protected]> . Visit this group at http://groups.google.com/a/apereo.org/group/cas-user/. -- 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] <javascript:> . Visit this group at http://groups.google.com/a/apereo.org/group/cas-user/. -- 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]. Visit this group at http://groups.google.com/a/apereo.org/group/cas-user/.
