AnsweredAssumed Answered

WCM AND SURF

Question asked by ssaravanan on Mar 20, 2009
I have built webframework project and deployed it.
Thats running fine. Now I want to have my SURF app
pick up the components from my WCM store.
I dropped in the custom-web-framework-application-context.xml and web-framework-config-custom.xml files into tomcat webextensions folder
(modified web-framework-config-custom.xml.preview and custom-web-framework-application-context.xml.preview)
from /Head/root/projects/web-framework/config/alfresco/web-extension/ folder.
Then I modified the cofig to point to my remotestore id.
<property name="storeId">
         <value>power-toys–admin</value>
</property>
But I am getting this following error….

16:47:58,155 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webframework.webscripts.container' defined in class path resource [alfresco/web-framework-application-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.web.scripts.LocalWebScriptRuntimeContainer]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
   The hierarchy of the type LocalWebScriptRuntimeContainer is inconsistent
   The type org.springframework.context.ApplicationListener cannot be resolved. It is indirectly referenced from required .class files
   The type org.springframework.context.ApplicationContextAware cannot be resolved. It is indirectly referenced from required .class files

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.web.scripts.LocalWebScriptRuntimeContainer]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
   The hierarchy of the type LocalWebScriptRuntimeContainer is inconsistent
   The type org.springframework.context.ApplicationListener cannot be resolved. It is indirectly referenced from required .class files
   The type org.springframework.context.ApplicationContextAware cannot be resolved. It is indirectly referenced from required .class files

Caused by: java.lang.Error: Unresolved compilation problems:
   The hierarchy of the type LocalWebScriptRuntimeContainer is inconsistent
   The type org.springframework.context.ApplicationListener cannot be resolved. It is indirectly referenced from required .class files
   The type org.springframework.context.ApplicationContextAware cannot be resolved. It is indirectly referenced from required .class files

   at org.alfresco.web.scripts.LocalWebScriptRuntimeContainer.<init>(LocalWebScriptRuntimeContainer.java:48)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:248)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:820)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:597)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
16:48:02,521 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework
16:48:05,446 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 67 Web Scripts (+0 failed), 71 URLs
16:48:05,447 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 550.573ms)
16:49:06,065 INFO  [org.alfresco.web.scripts.DeclarativeRegistry] Registered 101 Web Scripts (+0 failed), 105 URLs
16:49:06,075 INFO  [org.alfresco.web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 60599.477ms)
16:49:06,164 INFO  [org.alfresco.web.site.FrameworkHelper] Successfully Initialized Web Framework

Outcomes