Well, I don't seem to have log4j.xml in that location:
/oracle/app $find . -name log4j.xml -ls9307328 4 -rw-r--r-- 1 oracle dba 2113 Feb 22 2013 ./cas/cas-server-3.5.2/cas-server-extension-clearpass/src/test/java/log4j.xml 9307383 8 -rw-r--r-- 1 oracle dba 5478 Mar 7 11:32 ./cas/cas-server-3.5.2/cas-server-webapp/target/test-classes/log4j.xml 9308146 8 -rw-r--r-- 1 oracle dba 5474 Feb 22 2013 ./cas/cas-server-3.5.2/cas-server-webapp/target/cas-server-webapp-3.5.2/WEB-INF/classes/log4j.xml 9306682 8 -rw-r--r-- 1 oracle dba 5478 Feb 22 2013 ./cas/cas-server-3.5.2/cas-server-webapp/src/test/resources/log4j.xml 9306571 8 -rw-r--r-- 1 oracle dba 5474 Feb 22 2013 ./cas/cas-server-3.5.2/cas-server-webapp/src/main/webapp/WEB-INF/classes/log4j.xml
I did, however get beyond this using: log4j.config.location=/oracle/app/cas/cas-server-3.5.2/cas-server-webapp/src/main/webapp/WEB-INF/classes/log4j.xml ... and now my cas.log ends up in: /oracle/product/Middleware/user_projects/domains/base_domain/servers/cas/logs/cas.log So I think this is working now. Whether it is working well???I have another problem now. I posted a portion of the cas.log but no one has responded. It looks like some dependencies are not loading. I'll look at that a little more this morning and post it again.
Thanks for your help! Marvin On 03/07/2014 01:54 PM, Misagh Moayyed wrote:
Looking more closely at this, it seems like the problem is caused because your log4j.xml file is in the wrong directory. What happens if you move "/oracle/app/cas/cas-server-3.5.2/cas-server-webapp/src/main/webapp/WEB-IN F/spring-configuration/log4j.xml" over to "/oracle/app/cas/cas-server-3.5.2/cas-server-webapp/src/main/webapp/WEB-IN F/classes/log4j.xml"? The log4j.xml file should be there by default. I am not sure why or how it's gotten into the spring-configuration directory. You can also control the location of the log4j file by having it outside the cas web application. This is, as you note, controlled via the key: log4j.config.location=/etc/cas/log4j.xml The " log4jconfigurer" by default looks into the above key to figure out where the file is...and since that key by default is commented out (or it should be), CAS looks into the "classes" directory to find it. For some reason, yours isn't there by default.-----Original Message----- From: Marvin E Budd [mailto:[email protected]] Sent: Thursday, March 06, 2014 4:32 PM To: [email protected] Subject: Re: [cas-user] New CAS implementation log4j I'm sure it does if I understand it better. I tried adding the log4jconfigurer section to applicationContext, butthebuild says: Running org.jasig.cas.WiringTests Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.462sec <<<FAILURE! Results : Tests in error: testWiring(org.jasig.cas.WiringTests): IOException parsing XMLdocumentfrom file [/oracle/app/cas/cas-server-3.5.2/cas-server- webapp/src/main/webapp/WEB-INF/spring-configuration/log4j.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/log4j.dtd] Tests run: 10, Failures: 0, Errors: 1, Skipped: 0 The alternate - putting log4j.xml in a set place seemed interesting. Where are those instructions? I see lots of log4J.xml files. Do I pickoneand move it to a directory of my choice? What goes in cas.properties? Isthatwhat this is for? log4j.config.location=/etc/cas/log4j.xml And if I do this, does this file get stored completely outside of the.warfile? Or is it built into the .war file? Thanks for helping! On 03/06/2014 04:12 PM, Misagh Moayyed wrote:Does this help? https://issues.jasig.org/browse/CAS-1094 https://groups.google.com/forum/#!topic/jasig-cas-user/5RZqSQyRFEQ-----Original Message----- From: Marvin E Budd [mailto:[email protected]] Sent: Thursday, March 06, 2014 1:19 PM To: [email protected] Subject: [cas-user] New CAS implementation log4j This is a new CAS install on RH6 using the Ellucian instructions. I'vedoneeverything like they suggested, hopefully. I built and deployed thecas.warto a weblogic base domain successfully, and when I browse to https://mycas/cas it redirects to https://mycas/cas/login, so I know something is listening and active. Then I get a blank screen. In the base_domain folder I see a cas.log file with several errors init. Itseems like I don't have log4j set up correctly. I did not add anythingto thecas.properties file in the log4j area because I don't know enoughyet!Hereis one of the stack traces in the log. I wonder if this is enough thatyoucan tell me what I'm missing. 2014-03-06 14:53:20,815 ERROR [org.jasig.cas.web.init.SafeDispatcherServlet] -SafeDispatcherServlet:The Spring DispatcherServlet we wrap threw on init. But for our having caught this error, the servlet would not haveinitialized.org.springframework.beans.factory.BeanCreationException: Error creatingbeanwith name 'log4jInitialization' defined in ServletContext resource[/WEB-INF/spring-con figuration/log4jConfiguration.xml]: Invocation of init method failed;nestedexception is java.io.FileNotFoundException: class path resource[log4j.xml]cannot be r esolved to absolute file path because it does not reside inthefile system:zip:/oracle/product/Middleware/user_projects/domains/base_domain/serve rs/c as/tmp/_WL_us er/cas/hf305h/war/WEB-INF/lib/_wl_cls_gen.jar!/log4j.xml atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanF acto ry.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanF acto ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanF acto ry.createBean(AbstractAutowireCapableBeanFactory.java:456) atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObj ect( AbstractBeanFactory.java:294) atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry .get Singleton(DefaultSingletonBeanRegistry.java:225) a2014-03-06 14:53:20,815 ERROR [org.jasig.cas.web.init.SafeDispatcherServlet] -SafeDispatcherServlet:The Spring DispatcherServlet we wrap threw on init. But for our having caught this error, the servlet would not haveinitialized.org.springframework.beans.factory.BeanCreationException: Error creatingbeanwith name 'log4jInitialization' defined in ServletContext resource[/WEB-INF/spring-con figuration/log4jConfiguration.xml]: Invocation of init method failed;nestedexception is java.io.FileNotFoundException: class path resource[log4j.xml]cannot be r esolved to absolute file path because it does not reside inthefile system:zip:/oracle/product/Middleware/user_projects/domains/base_domain/serve rs/c as/tmp/_WL_us er/cas/hf305h/war/WEB-INF/lib/_wl_cls_gen.jar!/log4j.xml atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanF acto ry.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanF acto ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanF acto ry.createBean(AbstractAutowireCapableBeanFactory.java:456) atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObj ect( AbstractBeanFactory.java:294) atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry .get Singleton(DefaultSingletonBeanRegistry.java:225) atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBea n(Ab stractBeanFactory.java:291) atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean( Abst ractBeanFactory.java:193) atorg.springframework.beans.factory.support.DefaultListableBeanFactory.p reIn stantiateSingletons(DefaultListableBeanFactory.java:567) atorg.springframework.context.support.AbstractApplicationContext.finishB eanF actoryInitialization(AbstractApplicationContext.java:913) atorg.springframework.context.support.AbstractApplicationContext.refresh (Abs tractApplicationContext.java:464) atorg.springframework.web.context.ContextLoader.configureAndRefreshWebAp plic ationContext(ContextLoader.java:385) atorg.springframework.web.context.ContextLoader.initWebApplicationContex t(Co ntextLoader.java:284) atorg.springframework.web.context.ContextLoaderListener.contextInitializ ed(C ontextLoaderListener.java:111) atorg.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_ar ound Body0(SafeContextLoaderListener.java:75) atorg.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_ar ound Body1$advice(SafeContextLoaderListener.java:57) atorg.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(Sa feCo ntextLoaderListener.java:1) torg.springframework.beans.factory.support.AbstractBeanFactory.doGetBea n(Ab stractBeanFactory.java:291) atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean( Abst ractBeanFactory.java:193) atorg.springframework.beans.factory.support.DefaultListableBeanFactory.p reIn stantiateSingletons(DefaultListableBeanFactory.java:567) atorg.springframework.context.support.AbstractApplicationContext.finishB eanF actoryInitialization(AbstractApplicationContext.java:913) atorg.springframework.context.support.AbstractApplicationContext.refresh (Abs tractApplicationContext.java:464) atorg.springframework.web.context.ContextLoader.configureAndRefreshWebAp plic ationContext(ContextLoader.java:385) atorg.springframework.web.context.ContextLoader.initWebApplicationContex t(Co ntextLoader.java:284) atorg.springframework.web.context.ContextLoaderListener.contextInitializ ed(C ontextLoaderListener.java:111) atorg.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_ar ound Body0(SafeContextLoaderListener.java:75) atorg.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_ar ound Body1$advice(SafeContextLoaderListener.java:57) atorg.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(Sa feCo ntextLoaderListener.java:1) -- Marvin E Budd, Database Administrator Administrative Systems https://www.andrews.edu/services/its/admin-systems/ Information Technology Services 8490 E Campus Circle Dr Berrien Springs, MI 49104-0880 (269) 471-6104 -- 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
