Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

XML Parse issues when using Network Data Model LOD with Springframework 3

407022May 27 2010 — edited Aug 16 2013
Hello,

I am having issues with using using NDM in conjuction with Spring 3. The problem is that there is a dependency on the ConfigManager class in that it has to use Oracle's xml parser from xmlparserv2.jar, and this parser seems to have a history of problems with parsing Spring schemas.

My setup is as follows:
Spring Version: 3.0.1
Oracle: 11GR2 and corresponding spatial libraries

Note that when using the xerces parser, there is no issue here. It only while using Oracle's specific parser which appears to be hard-coded into the ConfigManager. Spring fortunately offers a workaround, where I can force it to use a specific parser when loading the spring configuration as follows:
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
But this is an extra deployment task we'd rather not have. Note that this issue has been brought up before in relation to OC4J. See the following link:

1011548

My question is, is there any other way to configure LOD where it won't have the dependency on the oracle parser?

Also, fyi, here is the exception that is occurring as well as the header for my spring file.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 11 in XML document from URL [file:/C:/projects/lrs_network_domain/service/target/classes/META-INF/spring.xml] is invalid; 
nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
	[snip]
	... 31 more
Caused by: oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
	at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:425)
	at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
	at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:331)
	at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:222)
	at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
Here is my the header for my spring configuration file:
<?xml version="1.0" encoding="UTF-8"?>

<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:context="http://www.springframework.org/schema/context"
       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/context http://www.springframework.org/schema/context/spring-context.xsd">
Thanks, Tom

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 13 2013
Added on May 27 2010
6 comments
14,392 views