Thanks for the information on deploying CAS as an EAR, I've done some experimentation with just trying to get the packaged "cas-server- webapp-3.3.2.war" from the modules directory to deploy. I'm using the pre-packaged so that I know my POM and settings aren't the breaking point. Even with using the isolation settings in jboss-app.xml the deploy still fails, I suppose to some extent that's a failure of the isolation in JBoss. Anyways it seems the key issue is javax.persistence, cas-server-core uses persistence-api 1.0 and JBoss uses 2.0.0.Beta1, Should I be able to change the dependancy in the server-core pom.xml and have it work? If I do the change in the pom, I can change my pom to use the snapshot so as not to rebuild from the repository correct?
-Andrew On May 7, 2009, at 11:36 AM, Bruno Melloni wrote: > jBoss classloader strategy is very powerful if you understand it... > but it can bite you since it does not necessarily follow the JEE > standard. > > Instead of deploying your WAR file... try encapsulating the WAR in > an EAR > and use a META-INF/jboss-app.xml to enforce isolation. The content > would > be something like this: > > <?xml version="1.0" encoding="UTF-8"?> > <jboss-app> > <loader-repository> > com.yourcompany.cas:archive=cas.ear > <loader-repository-config> > java2ParentDelegation=false > </loader-repository-config> > </loader-repository> > </jboss-app> > > I use that approach on jBoss 4.3 to avoid CAS-jBoss classloader > problems. > > -----Original Message----- > From: Marvin Addison [mailto:[email protected]] > Sent: Thursday, May 07, 2009 8:27 AM > To: [email protected] > Subject: Re: [cas-user] CAS 3.3.2 and JBoss 5.0.1 with > JpaTicketReistry connecting to MS-SQL > >> That got me farther, but new error: >> >> 21:46:15,229 ERROR [AbstractKernelController] Error installing to >> Start: >> name=persistence.unit:unitName=#CasPersistence state=Create >> java.lang.ClassCastException: >> org.hibernate.ejb.HibernatePersistence cannot >> be cast to javax.persistence.spi.PersistenceProvider > > This is almost certainly a classloader problem since > org.hibernate.ejb.HibernatePersistence clearly implements > javax.persistence.spi.PersistenceProvider, > http://docs.jboss.org/hibernate/stable/entitymanager/api/org/hibernate/ejb/HibernatePersistence.html > > . > Recall that in Java a class must assignment compatible _and_ sourced > from the same classloader in order for a cast to succeed; a > ClassCastException will be thrown if both conditions are not met. > >> Is anyone out there using Jboss 5.0.1 with CAS 3.3.2 ? > > Thankfully, no. We run CAS 3.0.6 in production on JBoss 4.0.4, but > we're moving to Tomcat 6 in the near future. JBoss is simply too > complex for our needs with respect to CAS. Complicating that, JBoss > 5.0 is new and dramatically different. I've looked at a lot of JBoss > 4.x stack traces over the past few years, but what you cited is > completely foreign to me. The new JBoss microkernel/microcontainer is > just a totally new beast. > > 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 > > -- > 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
