Thanks again, Scott.
So, I'm getting further along all the while feeling like I'm in CPAN module dependency hell L It seems like I needed to add a few jar files to deal with class not found errors. I specifically added: commons-dbcp-1.4.jar, hibernate-entitymanager.jar, hibernate-annotations.jar, concurrent.jar When I start tomcat back up I get the following Error: 2011-04-19 10:47:00,890 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ticketRegistry' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/jboss/util/file/ArchiveBrowser$Filter If I add the jboss-common-client.jar file (which contains the ArchiveBrowser$Filter.class file) then I seem to have a problem of conflicting classes (?): 2011-04-19 10:56:24,735 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ticketRegistry' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.ExtendedMappings has interface org.hibernate.cfg.Mappings as super class I'm kinda stuck here. Any help would be greatly appreciated. I'm happy to do a wiki write up of moving from the default ticket store to a database backend once I have this up and running. Cheers, Harry From: Scott Battaglia [mailto:[email protected]] Sent: Monday, April 18, 2011 9:33 PM To: [email protected] Subject: Re: [cas-user] problems with wiki entry JpaTicketRegistry If you add "ticket.cleaner.database.platform" to your cas.properties, it will get expanded. Alternatively you can just hardcode it in the XML file. Cheers, Scott On Mon, Apr 18, 2011 at 4:21 PM, Harry Hoffman <[email protected]> wrote: Hi Scott, OK, thanks. I got further along by adding the additional xsd but am now getting the following error: 2011-04-18 16:14:06,639 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'cleanerLock' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Could not resolve placeholder 'ticket.cleaner.database.platform' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.proce ssProperties(PropertyPlaceholderConfigurer.java:287) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProc essBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFac toryPostProcessors(AbstractApplicationContext.java:663) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFac toryPostProcessors(AbstractApplicationContext.java:638) at org.springframework.context.support.AbstractApplicationContext.refresh(Abstr actApplicationContext.java:407) at org.springframework.web.context.ContextLoader.createWebApplicationContext(Co ntextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont extLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(Con textLoaderListener.java:47) at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo dy0(SafeContextLoaderListener.java:62) at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo dy1$advice(SafeContextLoaderListener.java:44) at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeCont extLoaderListener.java:1) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java: 4600) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5097) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5092) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja va:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9 08) at java.lang.Thread.run(Thread.java:662) Is the variable listed in the example supposed to be expanded by me or does it got automatically expanded when the webapp starts? The beans that go along with this error are: <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.JdbcLockingStrategy" p:uniqueId="${host.name}" p:platform="${ticket.cleaner.database.platform}" p:applicationId="cas-ticket-registry-cleaner" p:dataSource-ref="dataSource" /> And the dataSource is defined as such: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" p:driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" p:url="jdbc:sqlserver://sql-2005.mydomain.com:1433;databaseName=CAS;user=CAS USER;password=PASSWORD"/> Cheers, Harry From: Scott Battaglia [mailto:[email protected]] Sent: Monday, April 18, 2011 4:05 PM To: [email protected] Subject: Re: [cas-user] problems with wiki entry JpaTicketRegistry You're probably missing this after the tx one: <http://www.springframework.org/schema/beans/spring-beans-3.0.xsd> http://www.springframework.org/schema/beans/spring-tx-3.0.xsd On Mon, Apr 18, 2011 at 4:01 PM, Harry Hoffman <[email protected]> wrote: Hi All, I'm following along with https://wiki.jasig.org/display/CASUM/JpaTicketRegistry but have hit a snag trying to use the provided example. It seems like having a odd number of xsi:schemaLocation is not allowed? I have the following: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx > which produces the following error: INFO: Deploying web application directory cas 2011-04-18 15:56:35,306 WARN [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Ignored XML validation warning> org.xml.sax.SAXParseException: SchemaLocation: schemaLocation value = ' http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx ' must have even number of URI's. Should there be another addition for schemaLocation? Cheers, Harry -- 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 -- 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
