Issue 1:
Andrew Swan opened SPR-9731 and commented

Currently, MappingJacksonHttpMessageConverter only reads from the request body. It would be useful in some cases to also be able to set an object's fields based on values in the request's headers.

Attached are a class and unit test demonstrating how this could be done; this code could be added to Spring as-is or used as a basis for enhancing MappingJacksonHttpMessageConverter in a backward-compatible way (in which case the behaviour would need to be changed slightly so that values in the body took precedence over values in the header, in cases of duplication).

Affects: 3.1.2

Attachments:

HeaderAwareMappingJacksonHttpMessageConverter.java (3.14 kB)

HeaderAwareMappingJacksonHttpMessageConverterTest.java (2.57 kB)

Issue 2:
Vigil Bose opened SPR-2290 and commented

We are getting the below exception when we tried to run the application using spring rc-2.

Since we got the same exception "Spring Form Tag generates a null 'id' when not specified and duplicates the 'name' attribute regardless"

Key:	#6862

Type:	Bug

Component/s:	SpringWEB

Affects Version/s:	2.0 RC1

Fix Version/s:	2.0 RC2

http://opensource.atlassian.com/projects/spring/browse/SPR-2171

I tried with RC2 release and now I am getting the below exception. Can you please have a look at it.

org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource name [classpath:beanRefContext.xml], factory key [servicelayer-context]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servicelayer-context' defined in class path resource [beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Line 16 in XML document from class path resource [alert-common-context.xml] is invalid; nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servicelayer-context' defined in class path resource [beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Line 16 in XML document from class path resource [alert-common-context.xml] is invalid; nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Line 16 in XML document from class path resource [alert-common-context.xml] is invalid; nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Line 16 in XML document from class path resource [alert-common-context.xml] is invalid; nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

Caused by: oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:444)

at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:303)

at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:290)

at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:196)

at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:151)

at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:66)

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:385)

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:340)

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:315)

at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)

at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)

at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)

at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)

at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)

at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)

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

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

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

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

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

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

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:156)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:548)

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

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

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

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

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

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

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

at org.springframework.context.access.ContextSingletonBeanFactoryLocator.initializeDefinition(ContextSingletonBeanFactoryLocator.java:136)

at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:380)

at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:319)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:180)

at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:83)

at javax.servlet.GenericServlet.init(GenericServlet.java:258)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.loadServlet(HttpApplication.java:2354)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.findServlet(HttpApplication.java:4795)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4889)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.initDynamic(HttpApplication.java:1015)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.<init>(HttpApplication.java:549)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.Application.getHttpApplication(Application.java:890)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpServer.getHttpApplication(HttpServer.java:707)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpSite.initApplications(HttpSite.java:625)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpSite.setConfig(HttpSite.java:278)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpServer.setSites(HttpServer.java:278)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpServer.setConfig(HttpServer.java:179)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.ApplicationServer.setConfig(ApplicationServer.java:1551)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)

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

-------------------------------------------------alert-common-context.xml definition ----------------------------

<?xml version="1.0" encoding="UTF-8"?>

<!--

Application context definition for Alert System Specific common services layer.

Contains bean references to the transaction manager and to the DAOs in

alert-dataAccess-context.xml.

-->

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"

xmlns:util="http://www.springframework.org/schema/util"

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd

http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

<!-- ===========================PROPERTY FILE CONFIGURER DEFINITION ============================= -->
<!-- Configurer that replaces ${...} placeholders with values from properties files -->
<!-- (in this case, alert properties) -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>alert.properties</value>
<value>jndi.properties</value>
</list>
</property>
</bean>
<!-- ===================== Alert System Common Business Service Definitions =======================-->
<bean id="lookupService" class="gov.fda.furls.alert.application.common.bus.impl.LookUpServiceImpl">
<property name="lookUpServiceDao" ref="lookupDao"/>
</bean>
<bean id="alertTypesService" class="gov.fda.furls.alert.application.common.bus.impl.AlertTypesServiceImpl">
<property name="alertTypesServiceDao" ref="alertTypesDao"/>
</bean>
<!-- ================== Account related Business Service Definitions =============================-->
<bean id="accountServices" class="gov.fda.furls.alert.application.common.bus.impl.AccountServiceImpl">
<property name="accountServicesDelegate" ref="accountServicesDelegate"/>
</bean>
<bean id="accountServicesDelegate" class="gov.fda.furls.alert.application.common.bus.external.delegate.AccountServicesDelegate">
<property name="oaaServicesHome" ref="oaaServicesHome"/>
<property name="accountServicesTransformer" ref="accountServicesTransformer"/>
</bean>
<bean id="accountServicesTransformer" class="gov.fda.furls.alert.application.common.bus.external.transformer.impl.AccountServicesTransformerImpl">
<property name="fdaRoleList" ref="fdaRoleList"/>
<property name="fdaAlertRoleStartWith" value="AT_"/>
</bean>
<bean id="alertRulesService" class="gov.fda.furls.alert.application.common.bus.impl.AlertRulesServiceImpl">
<property name="alertRulesServiceDao" ref="alertRulesDao"/>
</bean>
<!-- creates a java.util.List instance with values loaded from the supplied 'sourceList' -->
<util:list id="fdaRoleList">
<value>AT_FFRM_ADMIN</value>
<value>AT_FFRM_UPDATE</value>
<value>AT_FFRM_READ</value>
</util:list>

</beans>

NOTE: Line 16 in XML document from class path resource [alert-common-context.xml] is where we source spring-util.xsd in alert-common-context.xml file.

Affects: 2.0 RC2

Attachments:

xmlparserv2.jar (1.16 MB)

Issue Links:

#8664 CLONE -oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'. Unable to Start OC4J Server

#11790 oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType' is back