Results 1 to 4 of 4

Thread: Oracle XML Parser Error NOT on OC4J

  1. #1
    Join Date
    Aug 2007
    Posts
    138

    Default Oracle XML Parser Error NOT on OC4J

    I recently upgraded my codebase to Spring 3.0 by a simple edit to my Maven pom. When I did so and ran my TestNG tests that had worked, I got an exception when Spring tries to read the context file:

    Caused by: org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 6 in XML document from class path resource [persistenceContext.xml] is invalid; nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'

    When I look up this error, everything I read involves OC4J. As I stated, all I am doing is running a test outside of a container. Then again, the database is Oracle, and the Oracle jars are in the classpath. But when I revert to Spring 2.5.6, everything works again.

    Why would upgrading to Spring 3.0 cause this exception?

    Thanks.

  2. #2
    Join Date
    Aug 2007
    Posts
    138

    Default

    Is there a way to configure which XML parser Spring uses?

  3. #3
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Just a hunch, but you might be using oc4j parser with 2.5.6 as well and the schemas in Spring 3.0 make the parser choke. Could you get a dump of the classpath and check the jars to see what parser is used?
    If ran from the command line, the XML parser bundled with your JDK should be used so I would start there. Are you using an Oracle specific JDK?

    As for the XML parser, Spring doesn't do anything specific regarding it - it just uses the APIs provided with the JDK so if you configure those, Spring will use a different parser. There's a system property that you can use or a configuration file that you can set (google can help you there). Also the API provide some hints:
    http://java.sun.com/j2se/1.4.2/docs/...erFactory.html
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  4. #4
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Just a hunch, but you might be using oc4j parser with 2.5.6 as well and the schemas in Spring 3.0 make the parser choke. Could you get a dump of the classpath and check the jars to see what parser is used?
    If ran from the command line, the XML parser bundled with your JDK should be used so I would start there. Are you using an Oracle specific JDK?

    As for the XML parser, Spring doesn't do anything specific regarding it - it just uses the APIs provided with the JDK so if you configure those, Spring will use a different parser. There's a system property that you can use or a configuration file that you can set (google can help you there). Also the API provide some hints:
    http://java.sun.com/j2se/1.4.2/docs/...erFactory.html
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •