So, I was able to figure out that, because of some customizations that were
done, the persistence.xml file needed some tinkering to load up the correct
classes. I created and referenced a specific persistence unit configuration
just for the service management bit:
<persistence-unit name="emfPersistenceUnit"
transaction-type="RESOURCE_LOCAL">
<class>org.jasig.cas.services.AbstractRegisteredService</class>
<class>org.jasig.cas.services.RegexRegisteredService</class>
<class>org.jasig.cas.services.RegisteredServiceImpl</class>
<!-- Doesn't need stuff for tickets.
<class>org.jasig.cas.ticket.TicketGrantingTicketImpl</class>
<class>org.jasig.cas.ticket.ServiceTicketImpl</class>
<class>org.jasig.cas.ticket.registry.support.JpaLockingStrategy$Lock</class>
-->
</persistence-unit>
Jonathan Liedy
Middleware Administrator
The Florida State University
2035 East Paul Dirac Drive
Sliger, Suite 113
Tallahassee, FL 32310
[email protected]
Voice: (850) 270-7368
From: Liedy, Jonathan [mailto:[email protected]]
Sent: Thursday, March 12, 2015 3:38 PM
To: [email protected]
Subject: RE:[cas-user] Oracle DB backed service manager CAS 3.5.2
Just in case something stands out to someone, this is the list of jars pulled
in by Maven:
activation-1.1.jar commons-lang-2.5.jar
javassist-3.7.ga.jar
person-directory-impl-1.5.1.jar
spring-security-config-3.1.0.RELEASE.jar
antlr-2.7.7.jar commons-logging-1.1.1.jar
jaxb-api-2.2.jar quartz-1.6.1.jar
spring-security-core-3.1.0.RELEASE.jar
aopalliance-1.0.jar commons-logging-1.1.jar
jaxb-impl-2.2.jar serializer-2.7.1.jar
spring-security-crypto-3.1.0.RELEASE.jar
aspectjrt-1.6.10.jar commons-pool-1.5.4.jar
jboss-logging-3.1.0.CR2.jar slf4j-api-1.7.1.jar
spring-security-web-3.1.0.RELEASE.jar
aspectjweaver-1.6.10.jar com.noelios.restlet-1.1.1.jar
jboss-transaction-api_1.1_spec-1.0.0.Final.jar
slf4j-log4j12-1.7.1.jar spring-tx-3.1.1.RELEASE.jar
bcprov-jdk15-1.45.jar
com.noelios.restlet.ext.servlet-1.1.1.jar jcip-annotations-1.0.jar
sojo-1.0.5.jar
spring-web-3.1.1.RELEASE.jar
cas-client-core-3.2.1.jar
com.noelios.restlet.ext.spring-1.1.1.jar jcl-over-slf4j-1.7.1.jar
spring-aop-3.1.1.RELEASE.jar
spring-webflow-2.3.0.RELEASE.jar
cas-server-core-3.5.2.jar dom4j-1.6.1.jar
jdom-1.0.jar
spring-asm-3.1.1.RELEASE.jar spring-webmvc-3.1.1.RELEASE.jar
cas-server-extension-clearpass-3.5.2.jar ehcache-core-2.6.0.jar
jettison-1.0.1.jar
spring-beans-3.1.1.RELEASE.jar standard-1.1.2.jar
cas-server-integration-ehcache-3.5.2.jar esapi-2.0GA.jar
joda-time-2.1.jar
spring-binding-2.3.0.RELEASE.jar stax-api-1.0.1.jar
cas-server-integration-paf-1.0.0.jar ezmorph-1.0.4.jar
json-lib-2.2.3-jdk15.jar
spring-context-3.1.1.RELEASE.jar stax-api-1.0-2.jar
cas-server-integration-restlet-3.5.2.jar
hibernate-commons-annotations-4.0.1.Final.jar jstl-1.1.2.jar
spring-context-support-3.1.1.RELEASE.jar
validation-api-1.0.0.GA.jar
cas-server-support-jdbc-3.5.2.jar hibernate-core-4.1.0.Final.jar
jul-to-slf4j-1.6.1.jar
spring-core-3.1.1.RELEASE.jar velocity-1.5.jar
cas-server-support-ldap-3.5.2.jar
hibernate-entitymanager-4.1.0.Final.jar log4j-1.2.15.jar
spring-core-3.2.4.RELEASE.jar xalan-2.7.1.jar
cglib-nodep-2.2.2.jar hibernate-jpa-2.0-api-1.0.1.Final.jar
mail-1.4.1.jar
spring-expression-3.1.1.RELEASE.jar xercesImpl-2.10.0.jar
commons-beanutils-1.7.0.jar hibernate-validator-4.2.0.Final.jar
not-yet-commons-ssl-0.3.9.jar
spring-jdbc-3.1.1.RELEASE.jar xml-apis-1.4.01.jar
commons-codec-1.4.jar hsqldb-1.8.0.10.jar
ognl-2.7.3.jar
spring-js-2.3.0.RELEASE.jar xmldsig-1.0.jar
commons-collections-3.2.1.jar idmi-1.0.0-m10.jar
opensaml-2.5.1-1.jar spring-json-1.3.1.jar
xml-resolver-1.2.jar
commons-collections-3.2.jar inspektr-audit-1.0.7.GA.jar
openws-1.4.2-1.jar
spring-js-resources-2.3.0.RELEASE.jar xmlsec-1.4.3.jar
commons-dbcp-1.4.jar inspektr-common-1.0.7.GA.jar
org.restlet-1.1.1.jar
spring-ldap-core-1.3.1.RELEASE.jar xmltooling-1.3.2-1.jar
commons-httpclient-3.1.jar inspektr-error-1.0.7.GA.jar
org.restlet.ext.spring-1.1.1.jar
spring-ldap-core-tiger-1.3.1.RELEASE.jar xpp3_min-1.1.4c.jar
commons-io-2.0.jar inspektr-support-spring-1.0.7.GA.jar
perf4j-0.9.14-log4jonly.jar
spring-orm-3.1.1.RELEASE.jar xstream-1.3.jar
commons-jexl-1.1.jar javassist-3.15.0-GA.jar
person-directory-api-1.5.1.jar
spring-security-cas-3.1.0.RELEASE.jar
Jonathan Liedy
Middleware Administrator
The Florida State University
2035 East Paul Dirac Drive
Sliger, Suite 113
Tallahassee, FL 32310
[email protected]<mailto:[email protected]>
Voice: (850) 270-7368
________________________________
From: Liedy, Jonathan [[email protected]]
Sent: Thursday, March 12, 2015 12:10 PM
To: [email protected]<mailto:[email protected]>
Subject: RE:[cas-user] Oracle DB backed service manager CAS 3.5.2
If anyone could share a config for utilizing a multi-tenant OracleDB with the
service manager, that'd help.
Jonathan Liedy
Middleware Administrator
The Florida State University
2035 East Paul Dirac Drive
Sliger, Suite 113
Tallahassee, FL 32310
[email protected]<mailto:[email protected]>
Voice: (850) 270-7368
From: Liedy, Jonathan [mailto:[email protected]]
Sent: Wednesday, March 11, 2015 4:12 PM
To: [email protected]<mailto:[email protected]>
Subject: [cas-user] Oracle DB backed service manager CAS 3.5.2
Running:
J2EE: Tomcat 7.0.25
App: CAS 3.5.2
DB: Oracle 12c with the schema in Oracle 11g compatibility
I'm trying to get the service manager to be backed by a database but seem to be
running into a few snags. As far as I can tell, I'm able to connect to the
database, but it's not doing whatever it needs to do to start populating the
DB. The service manager configuration is as follows:
<?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:sec="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<sec:user-service id="userDetailsService">
<sec:user name="nchristopher" password="notused"
authorities="ROLE_ADMIN" />
<sec:user name="jliedy" password="notused" authorities="ROLE_ADMIN" />
</sec:user-service>
<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="emfDataSource"/>
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property
name="generateDdl" value="true" />
<property
name="showSql" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop
key="hibernate.dialect">${database.dialect}</prop>
<prop
key="hibernate.hbm2ddl.auto">update</prop>
<prop
key="default_schema">cassvc</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager"
p:entityManagerFactory-ref="entityManagerFactory" />
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="emfDataSource"
class="org.springframework.jndi.JndiObjectFactoryBean"
p:jndiName="java:/comp/env/jdbc/cassvc" />
</beans>
The error I'm getting in the logs is as follows:
2015-03-11 15:47:34,383 ERROR [org.springframework.web.context.ContextLoader] -
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'servicesManager' defined in ServletContext resource
[/WEB-INF/spring-configuration/applicationContext.xml]: Instantiation of bean
failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.jasig.cas.services.DefaultServicesManagerImpl]: Constructor
threw exception; nested exception is
org.springframework.dao.InvalidDataAccessApiUsageException:
org.hibernate.hql.internal.ast.QuerySyntaxException: AbstractRegisteredService
is not mapped [select r from AbstractRegisteredService r]; nested exception is
java.lang.IllegalArgumentException:
org.hibernate.hql.internal.ast.QuerySyntaxException: AbstractRegisteredService
is not mapped [select r from AbstractRegisteredService r]
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody0(SafeContextLoaderListener.java:75)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody1$advice(SafeContextLoaderListener.java:57)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:1)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
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.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Jonathan Liedy
Middleware Administrator
The Florida State University
2035 East Paul Dirac Drive
Sliger, Suite 113
Tallahassee, FL 32310
[email protected]<mailto:[email protected]>
Voice: (850) 270-7368
--
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]<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]<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