I added the mysql-connect jar file to my WEB-INF/lib folder and now it works! excellent!
3 followup questions: 1) should I enable statistics, too? how is that done? 2) should I worry about the security of this database information? some of our mysql databases have a few dbas and developers. if it could give people access to accounts I will have to secure it more. 3) should I turn down logging for CAS in a production environment? I notice there is still a bit of chatty information in my catalina.out. Thanks again. - Rex Roof WCC Systems Engineer <[email protected]> 734-973-3478 On Tue, Sep 2, 2014 at 5:10 PM, Dmitriy Kopylenko <[email protected]> wrote: > You might want to make sure that the mysql jdbc driver jar is available on > the servlet's container system classpath ($CATALINA_HOME/lib in case of > Tomcat, etc.) > > Also, as I mentioned before, you'd need to create the specific audit table > that jdbc audit trail manager impl expects. > > D. > > Sent from my iPhone > > On Sep 2, 2014, at 16:35, Rex Roof <[email protected]> wrote: > > that finally got CAS to come back up! > > I'm not yet getting Mysql logs, but it's another step. > > > Now I have this error: > > Exception in thread "pool-3-thread-1" > org.springframework.transaction.CannotCreateTransactionException: Could not > open JDBC Connection for transaction; nested exception is > java.sql.SQLException: Connections could not be acquired from the underlying > database! > > > > I have confirmed that my mysql user can connect to the mysql server on the > proper port from my CAS server. > > > thanks dmitriy, I appreciate all of your feedback. > > - Rex Roof > WCC Systems Engineer <[email protected]> > 734-973-3478 > > > On Tue, Sep 2, 2014 at 4:13 PM, Dmitriy Kopylenko <[email protected]> > wrote: > >> Just have this one bean definition (in your deployerConfigContext and get >> rid of that ‘auditManager’ bean def): >> >> <bean id="auditTrailManager" >> class="com.github.inspektr.audit.support.JdbcAuditTrailManager"> >> <constructor-arg index="0" ref="inspektrTransactionTemplate" /> >> <property name="dataSource" ref="dataSource" /> >> </bean> >> >> Cheers, >> D. >> >> On Sep 2, 2014, at 4:02 PM, Rex Roof <[email protected]> wrote: >> >> I'm looking at this wiki page: >> https://wiki.jasig.org/display/CASUM/Auditing+and+Statistics+Via+Inspektr >> but it looks a little out of date for 3.5. >> >> I made these updates to my deployerConfigContext.xml: >> >> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" >> destroy-method="close"> >> <property name="driverClass" value="com.mysql.jdbc.Driver"/> >> <property name="jdbcUrl" >> value="jdbc:mysql://mysql.server.edu:3306/dbname"/> >> <property name="user" value="username"/> >> <property name="password" value="Passw0rd"/> >> <property name="maxPoolSize" value="10"/> >> <property name="initialPoolSize" value="3"/> >> <property name="maxStatements" value="50"/> >> <property name="minPoolSize" value="3"/> >> <property name="idleConnectionTestPeriod" value="100"/> >> <property name="maxIdleTime" value="200"/> >> <property name="acquireIncrement" value="1"/> >> </bean> >> <bean id="auditTrailManager" >> class="com.github.inspektr.audit.support.JdbcAuditTrailManager"/> >> >> >> I also added these things to my spring-configuration/auditTrailContext.xml: >> >> >> <bean id="inspektrTransactionManager" >> class="org.springframework.jdbc.datasource.DataSourceTransactionManager" >> p:dataSource-ref="dataSource" >> /> >> >> <bean id="inspektrTransactionTemplate" >> class="org.springframework.transaction.support.TransactionTemplate" >> p:transactionManager-ref="inspektrTransactionManager" >> p:isolationLevelName="ISOLATION_READ_COMMITTED" >> p:propagationBehaviorName="PROPAGATION_REQUIRED" >> /> >> >> <bean id="auditManager" >> class="com.github.inspektr.audit.support.JdbcAuditTrailManager"> >> <constructor-arg index="0" ref="inspektrTransactionTemplate" /> >> <property name="dataSource" ref="dataSource" /> >> </bean> >> >> >> I also made sure put the mysql-connector-java, c3p0 and mchange-commons jar >> files in my classpath. >> >> I'm now getting and error like this: >> >> 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 'auditTrailManager' defined in ServletContext re >> source [/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed; >> nested exception is org.springframework.beans.BeanInstantiat >> ionException: Could not instantiate bean class >> [com.github.inspektr.audit.support.JdbcAuditTrailManager]: No default >> constructor found; >> nested exception is java.lang.NoSuchMethodException: >> com.github.inspektr.audit.support.JdbcAuditTrailManager.<init>() >> >> 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 'auditTrailManager' defined in ServletContext re >> source [/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed; >> nested exception is org.springframework.beans.BeanInstantiat >> ionException: Could not instantiate bean class >> [com.github.inspektr.audit.support.JdbcAuditTrailManager]: No default >> constructor found; >> nested exception is java.lang.NoSuchMethodException: >> com.github.inspektr.audit.support.JdbcAuditTrailManager.<init>() >> >> >> >> Any pointers? >> >> >> >> >> - Rex Roof >> WCC Systems Engineer <[email protected]> >> 734-973-3478 >> >> >> On Tue, Sep 2, 2014 at 1:29 PM, Rex Roof <[email protected]> wrote: >> >>> I'm sorry, I hate to be obtuse, but which bean are you talking about? >>> and where do I find docs about what the bean's properties need to be? >>> >>> Your earlier link goes to java code and I'm not sure how it correlates >>> to the bean definition. >>> >>> >>> >>> - Rex Roof >>> WCC Systems Engineer <[email protected]> >>> >>> >>> On Thu, Aug 28, 2014 at 2:39 PM, Dmitriy Kopylenko < >>> [email protected]> wrote: >>> >>>> Just define this bean in the deployer config context instead of slf4j >>>> one - just like any other CAS components. >>>> >>>> Cheers, >>>> D. >>>> >>>> Sent from my iPhone >>>> >>>> On Aug 28, 2014, at 10:36, Rex Roof <[email protected]> wrote: >>>> >>>> do I need to edit java and recompile CAS to make this change? >>>> All of the modifications we've done so far have been just XML and >>>> html/css changes to CAS. >>>> >>>> >>>> >>>> - Rex Roof >>>> WCC Systems Engineer <[email protected]> >>>> 734-973-3478 >>>> >>>> >>>> On Thu, Aug 28, 2014 at 11:28 AM, Dmitriy Kopylenko < >>>> [email protected]> wrote: >>>> >>>>> There is an opinionated AuditTrailManager impl for database audit >>>>> events recording with a specific table and column names requirement that >>>>> you could use: >>>>> >>>>> >>>>> https://github.com/dima767/inspektr/blob/master/inspektr-support-spring/src/main/java/com/github/inspektr/audit/support/JdbcAuditTrailManager.java >>>>> >>>>> Best, >>>>> Dmitriy. >>>>> >>>>> Sent from my iPhone >>>>> >>>>> On Aug 28, 2014, at 10:11, Rex Roof <[email protected]> wrote: >>>>> >>>>> how do I go about moving >>>>> the com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager into a >>>>> mysql database? >>>>> >>>>> Is this possible? are there docs on it? >>>>> >>>>> I'm using CAS 3.5.2 under tomcat 6.0.24 running on RHEL6. >>>>> My google searches have come up short. >>>>> >>>>> - Rex Roof >>>>> WCC Systems Engineer <[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 >>>>> >>>>> >>>> -- >>>> 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 > > -- > 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
