Hello

Hopefully someone who uses MS JDBC drivers can respond too. You said you
loaded the appropriate jars and by that I assume you have the
commons-dbcp.jar in the WEB-INF/lib? I usually receive this error under two
conditions:  I don't actually have the jar needed in the library or I have
not formed the xml correctly .. it meets tomcat's once through, so no
errors are thrown in catalina.out, but the nesting is off - something like
that.

I can't tell without seeing the entire file, but I would be happy to look
at it if you haven't sorted it out yet.

Linda

Linda Toth
University of Alaska - Office of Information Technology (OIT) - Identity
and Access Management
910 Yukon Drive, Suite 103
Fairbanks, Alaska 99775
Tel: 907-450-8320
Fax: 907-450-8381
[email protected] | www.alaska.edu/oit/



On Thu, Jun 5, 2014 at 9:08 AM, Troy McComas <[email protected]> wrote:

> Using Ubuntu with MS SQL Server (Microsoft's JDBC drivers)
>
> Deployed the packaged WAR (uber-webapp) to Tomcat.
>
> Included the appropriate JARs in the webapp/WEB-INF/lib directory.
>
> Added the following to the deploy xml file:
>
> <bean id="SearchModeSearchDatabaseAuthenticationHandler"
>
> class="org.jasig.cas.adaptors.jdbc.SearchModeSearchDatabaseAuthenticationHandler"
>       abstract="false" singleton="true" lazy-init="default"
> autowire="default" dependency-check="default">
>     <property  name="tableUsers">
>         <value>Users</value>
>     </property>
>     <property name="fieldUser">
>         <value>user_name</value>
>     </property>
>     <property name="fieldPassword">
>         <value>password</value>
>     </property>
>     <property name="dataSource" ref="dataSource" />
>     </bean>
>
>     <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
>         <property name="driverClassName">
>                 <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
>         </property>
>         <property name="url">
>
> <value>jdbc:sqlserver://icsdata:3291;databaseName=TmsEprd</value>
>         </property>
>         <property name="username">
>                 <value>(OUR USER)r</value>
>         </property>
>         <property name="password">
>                 <value>(OUR PASS)</value>
>         </property>
>     </bean>
>
> ------------------------------------------
>
> I keep receiving the following error, even after dropping the commons in
> the lib folder under the Tomcat webapp's directory:
>
> The Spring ContextLoaderListener we wrap threw on contextInitialized.
>
> But for our having caught this error, the web application context would
> not have initialized.
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'centralAuthenticationService' defined in ServletContext
> resource [/WEB-INF/spring-configuration/applicationContext.xml]: Cannot
> resolve reference to bean 'authenticationManager' while setting bean
> property 'authenticationManager'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'authenticationManager' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean
> 'SearchModeSearchDatabaseAuthenticationHandler' of type
> [org.jasig.cas.adaptors.jdbc.SearchModeSearchDatabaseAuthenticationHandler]
> while setting bean property 'authenticationHandlers' with key [0]; nested
> exception is org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'SearchModeSearchDatabaseAuthenticationHandler'
> defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
> Cannot resolve reference to bean 'dataSource' while setting bean property
> 'dataSource'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
> class [org.apache.commons.dbcp.BasicDataSource] for bean with name
> 'dataSource' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
>
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
>
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>
>         at
> org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody0(SafeContextLoaderListener.java:62)
>
>         at
> org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody1$advice(SafeContextLoaderListener.java:44)
>
>         at
> org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:1)
>
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
>
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
>
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
>
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
>
>         at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
>
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:744)
>
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'authenticationManager' defined in ServletContext
> resource [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean
> 'SearchModeSearchDatabaseAuthenticationHandler' of type
> [org.jasig.cas.adaptors.jdbc.SearchModeSearchDatabaseAuthenticationHandler]
> while setting bean property 'authenticationHandlers' with key [0]; nested
> exception is org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'SearchModeSearchDatabaseAuthenticationHandler'
> defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
> Cannot resolve reference to bean 'dataSource' while setting bean property
> 'dataSource'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
> class [org.apache.commons.dbcp.BasicDataSource] for bean with name
> 'dataSource' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
>
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
>
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
>
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
>
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
>
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> --
>
> *Troy McComas*
> *Web Developer*
>
>
>
>
> *Phone: 502.897.4068 <502.897.4068> Cell: 559.676.2985
> <559.676.2985>[email protected] <[email protected]> *
>
>
>
>  --
> 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