I'll take a look when I get home. I'm on mass transit at the moment. Last time 
I tried it, it had worked fine, but I'll set up a db locally to try it.

Regardless, I can open an issue to clean up that code to make it more readable. 
 
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Bryan Wooten <[email protected]>
Date: Mon, 22 Nov 2010 15:28:37 
To: <[email protected]>
Reply-To: [email protected]
Subject: RE: [cas-user] Service Manager Debug Session

I don't understand.  If is isTrue == true my RegisteredService is not 
persisted. If isTrue==false I get a Hibernate exception. So either way it 
doesn't work. Am I missing something?

Getting Service Manager is critical to our rollout of CAS, without it the whole 
project is in jeopardy of being cancelled. I am getting desperate.



From: Scott Battaglia [mailto:[email protected]]
Sent: Monday, November 22, 2010 3:15 PM
To: [email protected]
Subject: Re: [cas-user] Service Manager Debug Session

While that code is a bit funky, your changes should have been merged (which is 
all that's needed).  I should clean up that code though.

On Mon, Nov 22, 2010 at 5:11 PM, Bryan Wooten 
<[email protected]<mailto:[email protected]>> wrote:
Ok, I am in the debugger and have pressed the submit button. I get to 
JpaServiceRegisteryDaoImpl.save();

public RegisteredService save(final RegisteredService registeredService) {
        final boolean isNew = registeredService.getId() == -1;

        final RegisteredService r = getJpaTemplate().merge(registeredService);

        if (!isNew) {
            getJpaTemplate().persist(r);
        }

        return r;
    }

getId() == -1 so isNew is set to true. This means  getJpaTemplate().persist(r) 
is never called, which I assume means my RegisteredService is not persisted to 
the DB?

In the debugger my RegisteredService object looks fine, all the data 
corresponds to what I entered into the form.

So I just set isNew to false. That gave me CAS is Unavailable page. I missed 
the exact error as my log screen buffer over filled and Netbeans doesn't write 
to catalina.out in debug mode. Last week (before I got the debugger hooked up) 
I questioned this same piece code so I hard code isNew to false.  That gave me 
this error:

0700|WARNING|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=26;_ThreadName=http-thread-pool-8722-(2);|StandardWrapperValve[cas]:
 PWC1406: Servlet.service() for servlet cas threw exception
org.hibernate.PersistentObjectException: detached entity passed to persist: 
org.jasig.cas.services.RegisteredServiceImpl
        at 
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:127)


What is going on? At this point my only conclusion is that this is a bug and 
Service Manager just doesn't work in my environment.

I've tried (All CAS 3.4.3.1):
CAS->Glassfish->Oracle->Solaris
CAS->Tomcat6->Oracle->Redhat
CAS->Tomcat6->Oracle->Solaris

I guess my next option is to try the above with mySQL? Am I building with the 
wrong version of Hibernate?

Cheers,

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] as: 
[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

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