This blog post is in-line to question i had raised in forum sometime back. Installation set-up details are mentioned below -

OS : Mac OS Yosemite

WCS Version : 11g

Oracle DB VM Box : Oracle DB Version 11.2.0

 

Download OracleLinux DB OVM Appliance and imported onto Virutal Box. Update tomcat server.xml with datasource details. While running the WCS installation is in progress and reaches 86%, installer prompts for some checks and restart of the server. When restart is initiated installation fails with error (for details of error refer https://community.oracle.com/thread/3732383 ),


[2015-06-09 20:01:26,317 IST] [INFO ] [      main] [springframework.web.context.ContextLoader] Root WebApplicationContext: initialization started

[2015-06-09 20:01:26,343 IST] [INFO ] [      main] [web.context.support.XmlWebApplicationContext] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@c61a8f8: display name [Root WebApplicationContext]; startup date [Tue Jun 09 20:01:26 IST 2015]; root of context hierarchy

[2015-06-09 20:01:26,380 IST] [INFO ] [      main] [beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]

[2015-06-09 20:01:26,399 IST] [INFO ] [      main] [web.context.support.XmlWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@c61a8f8]: org.springframework.beans.factory.support.DefaultListableBeanFactory@4c05279b

[2015-06-09 20:01:26,416 IST] [INFO ] [      main] [beans.factory.support.DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4c05279b: defining beans []; root of factory hierarchy

[2015-06-09 20:01:26,416 IST] [INFO ] [      main] [springframework.web.context.ContextLoader] Root WebApplicationContext: initialization completed in 97 ms

[2015-06-09 20:01:26,416 IST] [INFO ] [      main] [fatwire.logging.cs.event]  CSShutdownListener is initialized

[2015-06-09 20:01:26,425 IST] [INFO ] [      main] [beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [webreference.xml]

[2015-06-09 20:01:56,586 IST] [INFO ] [      main] [springframework.context.support.ClassPathXmlApplicationContext] Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@5e066f43: display name [org.springframework.context.support.ClassPathXmlApplicationContext@5e066f43]; startup date [Tue Jun 09 20:01:56 IST 2015]; root of context hierarchy

[2015-06-09 20:01:56,586 IST] [INFO ] [      main] [beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [SSOConfig.xml]

[2015-06-09 20:01:56,763 IST] [INFO ] [      main] [springframework.context.support.ClassPathXmlApplicationContext] Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@5e066f43]: org.springframework.beans.factory.support.DefaultListableBeanFactory@14b75fd9

[2015-06-09 20:01:56,768 IST] [INFO ] [      main] [beans.factory.support.DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@14b75fd9: defining beans [ssoprovider,ssofilter,ssolistener,auxlistener,ssoconfig]; root of factory hierarchy

[2015-06-09 20:02:26,849 IST] [INFO ] [      main] [beans.factory.support.DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@14b75fd9: defining beans [ssoprovider,ssofilter,ssolistener,auxlistener,ssoconfig]; root of factory hierarchy

[2015-06-09 20:02:26,850 IST] [ERROR] [      main] [fatwire.wem.sso.SSOFilter] Failed to create SSO filter. Reason: Error creating bean with name 'ssolistener' defined in class path resource [SSOConfig.xml]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ssolistener' defined in class path resource [SSOConfig.xml]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

  at java.security.AccessController.doPrivileged(Native Method)

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)

  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)

  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)

  at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

  at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)

  at com.fatwire.wem.sso.DynamicInjector.<init>(DynamicInjector.java:52)

  at com.fatwire.wem.sso.DynamicInjector.instance(DynamicInjector.java:234)

  at com.fatwire.wem.sso.SSOFilter.init(SSOFilter.java:65)

  at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)

  at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)

  at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)

  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)

  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

  at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)

  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

  at org.apache.catalina.core.StandardService.start(StandardService.java:525)

  at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

  at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

  at java.lang.reflect.Method.invoke(Method.java:606)

  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: java.lang.ExceptionInInitializerError

  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

  at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)

  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)

  ... 35 more

Caused by: net.sf.ehcache.CacheException: Unable to create CacheManagerPeerListener. Initial cause was TVMATP2495L: TVMATP2495L: nodename nor servname provided, or not known

  at net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory.doCreateCachePeerListener(RMICacheManagerPeerListenerFactory.java:104)

  at net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory.createCachePeerListener(RMICacheManagerPeerListenerFactory.java:84)

  at net.sf.ehcache.config.ConfigurationHelper.createCachePeerListeners(ConfigurationHelper.java:314)

  at net.sf.ehcache.CacheManager.configure(CacheManager.java:434)

  at net.sf.ehcache.CacheManager.init(CacheManager.java:302)

  at net.sf.ehcache.CacheManager.<init>(CacheManager.java:234)

  at com.fatwire.cache.ehcache.EhCacheObjectCache._initCache(EhCacheObjectCache.java:730)

  at com.fatwire.cache.ehcache.EhCacheObjectCache.start(EhCacheObjectCache.java:564)

  at com.fatwire.wem.sso.cas.cache.SessionMappingStorage.<init>(SessionMappingStorage.java:48)

  at com.fatwire.wem.sso.cas.listener.CASListener.<clinit>(CASListener.java:15)

  ... 42 more

Caused by: java.net.UnknownHostException: TVMATP2495L: TVMATP2495L: nodename nor servname provided, or not known

  at java.net.InetAddress.getLocalHost(InetAddress.java:1473)

  at net.sf.ehcache.distribution.RMICacheManagerPeerListener.calculateHostAddress(RMICacheManagerPeerListener.java:167)

  at net.sf.ehcache.distribution.RMICacheManagerPeerListener.<init>(RMICacheManagerPeerListener.java:124)

  at net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory.doCreateCachePeerListener(RMICacheManagerPeerListenerFactory.java:102)

  ... 51 more

Caused by: java.net.UnknownHostException: TVMATP2495L: nodename nor servname provided, or not known

  at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)

  at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)

  at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)

  at java.net.InetAddress.getLocalHost(InetAddress.java:1469)

  ... 54 more


This error is primarily due to 2 factors

  • From logs, i figured out that JAVA_HOME wasn't set
  • root cause of error is "Caused by: net.sf.ehcache.CacheException: Unable to create CacheManagerPeerListener. Initial cause was TVMATP2495L: TVMATP2495L: nodename nor servname provided, or not known", because of host mapping issue

     To resolve these issues,

  1. add an entry to /etc/hosts file - 127.0.0.1 <your_hostname>
  2. create a .bash_profile if it doesn’t exist already. add the following entry export JAVA_HOME=$(/usr/libexec/java_home)
  3. in catalina.sh file make an entry -Djava.net.preferIPv4Stack=true \ (this entry is required since ehcache API was getting IPv6 address format and it was throwing an error. refer http://jira.pentaho.com/browse/BISERVER-12146). For JAVA_OPTS, set the above value.
  4. Add the custom class path setting to load cas.properties and other WCS/bin startup files towards end of catalina.sh file. while moving those lines to the top resolve the issue (add the classpath entry soon after bootstrap.jar class path entry is done. Or move it to setenv.sh file which you’ve newly created for putting custom class path

 

Screen Shot 2016-03-01 at 7.49.02 PM.png

 

For better manageability consolidate point 3 & 4, move it to setenv.sh file as per tomcat documentation standards.

Screen Shot 2016-03-01 at 7.58.49 PM.png

 

Hope this helps