Announcement Announcement Module
Collapse
No announcement yet.
XML Parsing Exception during start of tc Server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • XML Parsing Exception during start of tc Server

    Hi Everyone!

    i created a new Spring Web Flow Application using the Wizard. I added bean and other definitions to the app-config.xml. I attached it, further down. No compilation errors whatsoever occur. But when I deploy the application to the integrated tc Server i get the error messages you see in the attached log. Now I've read about some similar problems, that the XML Parsing libraries are supposedly out of date. Can anyone confirm this? It seems odd, since I installed the latest JDK, using SpringSource Tool Suit which as far as I know should come packaged with the latest libraries as well, and I checked my Classpath and Path variables and no other Java related entries other then the JAVA_HOME location is to be found.
    If it really is a matter of old libraries, which libraries and where do I have to put them? Shouldn't the Spring Libraries have Maven dependencies upon the latest related libraries?

    Thanks for any clue!

    simon

    Code:
    <?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:context="http://www.springframework.org/schema/context"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-2.5.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
        <!--
            Scans within the base package of the application for @Components to
            configure as beans
        -->
        <context:component-scan base-package="com.starthello.web" />
    
        <bean id="dbDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
            <property name="driverClassName" value="org.postgresql.Driver" />
            <property name="url" value="jdbc:postgresql://localhost/spring" />
            <property name="username" value="spring" />
            <property name="password" value="spring" />
        </bean>
    
        <bean id="hibernateSessionFactory"
            class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
            <property name="dataSource" ref="dbDataSource" />
            <property name="mappingResources">
                <list>
                    <value>com/starthello/web/model/message.hbm.xml</value>
                    <value>com/starthello/web/model/reply.hbm.xml</value>
                </list>
            </property>
            <property name="hibernateProperties">
                <value>
                    hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
                </value>
            </property>
        </bean>
    
    ....
    Code:
    ...
    INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/app-config.xml]
    ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from ServletContext resource [/WEB-INF/spring/app-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'SpringSource.org | '.
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
        at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
        at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
        at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:741)
        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:587)
        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:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:290)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
    Caused by: org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'SpringSource.org | '.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.xs.opti.SchemaDOMParser.characters(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
        at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
        ... 32 more
    ...
    08.09.2009 15:23:53 org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    08.09.2009 15:23:53 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 15311 ms

  • #2
    I'm having the exact same problem.

    Comment


    • #3
      has anyone found a solution to this problem?

      would appreciate it!

      Comment


      • #4
        Hi,

        you are using Spring 3.0 XSD in your XML definition files. Do you have Spring 3.0 jars on your classpath? If not Xerces will try to load the XSD files from the internet. Because Spring 3.0 has not been released yet, those XSDs have not been uploaded yet.

        You can try downloading http://www.springframework.org/schem...-beans-3.0.xsd and see that this redirects to springsource.org which is very similar to the error message you are seeing.

        Christian

        Comment


        • #5
          Hi Christian,

          thank you! I changed the xsd s to 2.5 and it works.

          cheers!
          simon

          Comment


          • #6
            Hello Christian,

            But in my case, I DO have Spring 3.0 jars in my path... in fact I have only those in my path, no other version!

            Thank you,
            Sammy

            Comment


            • #7
              Hi,

              I'm going to move that over to the tc Server forum which seems more appropriate.

              I'll let the tc Server engineers take over....

              Christian

              Comment


              • #8
                Originally posted by cmon View Post
                Hi Everyone!

                i created a new Spring Web Flow Application using the Wizard. I added bean and other definitions to the app-config.xml. I attached it, further down were airsoft rifles. No compilation errors whatsoever occur. But when I deploy the application to the integrated tc Server i get the error messages you see in the attached log. Now I've read about some similar problems, that the XML Parsing libraries are supposedly out of date. Can anyone confirm this? It seems odd, since I installed the latest JDK, using SpringSource Tool Suit which as far as I know should come packaged with the latest libraries as well, and I checked my Classpath and Path variables and no other Java related entries other then the JAVA_HOME location is to be found.
                If it really is a matter of old libraries, which libraries and where do I have to put them? Shouldn't the Spring Libraries have Maven dependencies upon the latest related libraries?

                Thanks for any clue!

                simon

                Hmmmmm glad to see I'm not the only one that is confused by this. Where do you get the latest version of the libraries, assuming that this is the problem?

                Comment


                • #9
                  Hi,

                  can you check that you really only have Spring 3.0 jars in your web-inf/lib by checking the web app contents in the following directory:

                  <workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtwebapps/<context>/WEB-INF/lib

                  It could be that some other non-Spring 3.0 dependencies got dragged in by Maven....

                  Christian

                  Comment


                  • #10
                    I am fighting with this now.

                    What type of jar would cause this to happen? Older versions of Spring?
                    I have 3.0.RC1 jars along with the Spring security 3.0 jars and I get these non-whitespace messages ...

                    Code:
                    <Nov 11, 2009 4:11:58 PM MST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'SpringSource.org | '..
                    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'SpringSource.org | '.
                            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:378)

                    Comment

                    Working...
                    X