Issue 1:
Daniel Nydegger opened SPR-7854 and commented

If a bean is annotated with @Primary or the attribute primary is set on the <bean> element, then the injection mechanism choose the primary configured bean as first choice if more than one candidate are qualified. This works fine with usage of @Autowired or @Inject.

By resolve the bean over the application context, I expected the same behaviour. Because the DefaultListableBeanFactory implementation of <T> T getBean(Class<T> requiredType) method doesn't check the the primary attribute of BeanDefinition, a NoSuchBeanDefinitionException is thrown in case of multiple qualified bean candidates regardless the the primary qualification.

I posted a workaround solution in my blog: http://develop.nydi.ch/2010/12/spring-primary-bean-injection/

To reproduce this behavior you can run the following JUnit test case.

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { TestSupport.SPRING_CONFIG_FILE_PATH })
public class PrimarySupportTest implements ApplicationContextAware {

private SingleService singleService;
private ApplicationContext applicationContext;

@Inject
public void setSingleService(SingleService singleService) {
this.singleService = singleService;
}

@Override
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException {
this.applicationContext = applicationContext;
}

@Test
public void testInjectedService() {
Assert.assertNotNull("contextSingleService is null", singleService);
Assert.assertEquals("wrong instance", SingleServiceImpl_1.class.getName(), singleService.getClass().getName());
}

@Test
public void testServiceWithGetBean() {
SingleService contextSingleService = applicationContext.getBean("singleServiceImpl_1", SingleService.class);
Assert.assertNotNull("contextSingleService is null", contextSingleService);
Assert.assertEquals("wrong instance", SingleServiceImpl_1.class.getName(), contextSingleService.getClass().getName());

contextSingleService = applicationContext.getBean("singleServiceImpl_2", SingleService.class);
Assert.assertNotNull("contextSingleService is null", contextSingleService);
Assert.assertEquals("wrong instance", SingleServiceImpl_2.class.getName(), contextSingleService.getClass().getName());

// SingleServiceImpl_1 is annotated with @Primary so SingleServiceImpl_1 instance should returned here, but
contextSingleService = applicationContext.getBean(SingleService.class);
Assert.assertNotNull("contextSingleService is null", contextSingleService);
Assert.assertEquals("wrong instance", SingleServiceImpl_1.class.getName(), contextSingleService.getClass().getName());
}
}

public interface BaseService {
void callBase();
}

@Service
@Named
@Primary
public class SingleServiceImpl_1 implements SingleService {
@Override
public void callMe() {
}
}

@Service
@Named
public class SingleServiceImpl_2 implements SingleService {
@Override
public void callMe() {
}
}

Affects: 3.0.5

Issue Links:

#13135 Make BeanFactoryLocator aware of autowiring (and primary flag) ("is duplicated by")

#12590 Add support for type-based RuntimeBeanReference

Referenced from: commits 7e74fd2

12 votes, 13 watchers

Issue 2:
aappddeevv opened SPR-8557 and commented

The SpringServletContainerInitializer seems to think that a number of classes implement WebApplicationInitializer and tries to initialize them. However, the classes do not implement that interface. In my case, it tries to "initialize" classes belonging to the richfaces JSF implementation.

web.xml has a context listener and a requestcontext listener defined in them. My applicationContext is blank.

Here's the log:

Jul 23, 2011 1:32:14 PM com.springsource.tcserver.security.PropertyDecoder <init>

INFO: tc Runtime property decoder using memory-based key

Jul 23, 2011 1:32:15 PM com.springsource.tcserver.security.PropertyDecoder <init>

INFO: tcServer Runtime property decoder has been initialized in 917 ms

Jul 23, 2011 1:32:15 PM org.apache.coyote.AbstractProtocolHandler init

INFO: Initializing ProtocolHandler ["http-bio-8080"]

Jul 23, 2011 1:32:16 PM com.springsource.tcserver.serviceability.rmi.JmxSocketListener init

INFO: Started up JMX registry on 127.0.0.1:6969 in 203 ms

Jul 23, 2011 1:32:16 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 2067 ms

Jul 23, 2011 1:32:16 PM org.apache.catalina.core.StandardService startInternal

INFO: Starting service Catalina

Jul 23, 2011 1:32:16 PM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: SpringSource tc Runtime 2.5.0.RELEASE/7.0.12.A.RELEASE

Jul 23, 2011 1:32:16 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:32:16 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:32:28 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class org.ajax4jsf.renderkit.AjaxBehaviorRenderer is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)

at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

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

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:613)

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

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

Jul 23, 2011 1:32:28 PM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory manager

Jul 23, 2011 1:32:29 PM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory ROOT

Jul 23, 2011 1:32:29 PM org.apache.coyote.AbstractProtocolHandler start

INFO: Starting ProtocolHandler ["http-bio-8080"]

Jul 23, 2011 1:32:29 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 12818 ms

Jul 23, 2011 1:32:39 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:32:39 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:32:47 PM org.apache.catalina.core.NamingContextListener lifecycleEvent

SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only

Jul 23, 2011 1:32:47 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class com.sun.faces.renderkit.html_basic.CompositeRenderer is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)

at java.lang.Thread.run(Thread.java:722)

Jul 23, 2011 1:32:57 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:32:57 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:33:04 PM org.apache.catalina.core.NamingContextListener lifecycleEvent

SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only

Jul 23, 2011 1:33:04 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class javax.faces.component.UIViewParameter is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)

at java.lang.Thread.run(Thread.java:722)

Jul 23, 2011 1:33:14 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:33:14 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:33:20 PM org.apache.catalina.core.NamingContextListener lifecycleEvent

SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only

Jul 23, 2011 1:33:20 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class org.richfaces.renderkit.html.HtmlMessagesRenderer is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)

at java.lang.Thread.run(Thread.java:722)

Jul 23, 2011 1:33:30 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:33:30 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:33:37 PM org.apache.catalina.core.NamingContextListener lifecycleEvent

SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only

Jul 23, 2011 1:33:37 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class org.richfaces.renderkit.CollapsibleSubTableRenderer is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)

at java.lang.Thread.run(Thread.java:722)

Jul 23, 2011 1:33:47 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:33:47 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:33:53 PM org.apache.catalina.core.NamingContextListener lifecycleEvent

SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only

Jul 23, 2011 1:33:53 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class javax.faces.component.UISelectBoolean is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)

at java.lang.Thread.run(Thread.java:722)

Jul 23, 2011 1:34:03 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:34:03 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:34:10 PM org.apache.catalina.core.NamingContextListener lifecycleEvent

SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only

Jul 23, 2011 1:34:10 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class com.sun.faces.facelets.tag.ui.UIDebug is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)

at java.lang.Thread.run(Thread.java:722)

Jul 23, 2011 1:34:20 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:34:20 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Jul 23, 2011 1:34:27 PM org.apache.catalina.core.NamingContextListener lifecycleEvent

SEVERE: Creation of the naming context failed: javax.naming.NamingException: Context is read only

Jul 23, 2011 1:34:27 PM org.apache.catalina.startup.HostConfig deployDescriptor

SEVERE: Error deploying configuration descriptor testprimefaces.xml

java.lang.IllegalArgumentException: class com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer is not assignable to interface org.springframework.web.WebApplicationInitializer

at org.springframework.util.Assert.isAssignable(Assert.java:368)

at org.springframework.util.Assert.isAssignable(Assert.java:351)

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

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:145)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)

at java.lang.Thread.run(Thread.java:722)

Jul 23, 2011 1:34:37 PM org.apache.catalina.startup.HostConfig deployDescriptor

INFO: Deploying configuration descriptor testprimefaces.xml from C:\tmp\eclipse\springsource-tool-suite-2.7.0-e3.62-win32-x86_64\vfabric-tc-server-developer-2.5.0.RELEASE\dev\conf\Catalina\localhost

Jul 23, 2011 1:34:37 PM org.apache.catalina.startup.SetContextPropertiesRule begin

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:testprimefaces' did not find a matching property.

Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:794)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1148)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)

at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:1956)

at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1919)

at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1806)

at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1765)

at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1751)

at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1255)

at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:882)

at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:317)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5081)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)

Exception in thread "RMI RenewClean-[127.0.0.1:6969]" java.lang.OutOfMemoryError: PermGen space

at sun.misc.Unsafe.defineClass(Native Method)

at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)

at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)

at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)

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

at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)

at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113)

at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331)

at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1343)

at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:69)

at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:454)

at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:430)

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

at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:430)

at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:327)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1130)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)

at sun.rmi.transport.DGCImpl_Stub.dirty(Unknown Source)

at sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:360)

at sun.rmi.transport.DGCClient$EndpointEntry.access$1600(DGCClient.java:171)

at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCClient.java:574)

at java.lang.Thread.run(Thread.java:722)

Affects: 3.1 M2

Reference URL: http://forum.springsource.org/showthread.php?112139-is-not-assignable-to-WebApplicationInitializer

Referenced from: commits 179dad8