4 Replies Latest reply on Apr 5, 2011 8:43 AM by Wolfgang Knauf

    Jboss Unable to pick the Xsd schema

    V M Newbie

      Migrating from Jboss 434 to Jboss 5.0.1.

      Jboss 5.0.1 is unable to pick the XSD schema location.

      Gives

      org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'solicitation'

           at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown )

        • 1. Jboss Unable to pick the Xsd schema
          Wolf-Dieter Fink Master

          Could you give a bit more information and attach the server.log file

          • 2. Jboss Unable to pick the Xsd schema
            V M Newbie

            I have a webservice which builds the data into a xml format, validates using a xsd schema and provides the necessary response.so Whenever this webservice is hit with a request, I get a runtime exception: Where Validation is failing but the data is rendered. This piece of code is working fine in Jboss 434 without any runtime exception.Is the problem looks like the server is not picking/able to read the xsd in the given location in Jboss5.0.1

             

            [STDOUT] Validator instance-->class org.apache.xerces.jaxp.validation.ValidatorImpl

            [XMLTransformer] -1

            [STDERR] org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'solicitation'.

            [STDERR]     at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

            [STDERR]     at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)

            [STDERR]     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

            [STDERR]     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

            [STDERR]     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

            [STDERR]     at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)

            [STDERR]     at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)

            [STDERR]     at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)

            [STDERR]     at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)

            [STDERR]     at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)

            [STDERR]     at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)

            [STDERR]     at javax.xml.validation.Validator.validate(Validator.java:127)

            [STDERR]     at gov.gsa.sws.common.util.XMLTransformer.validateXml(XMLTransformer.java:361)

            [STDERR]     at gov.gsa.sws.webservices.swsweb.SolicitationService.getSolicitationData(Unknown Source)

            [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

            [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

            [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)

            [STDERR]     at com.sun.xml.ws.server.PeptTie._invoke(PeptTie.java:58)

            [STDERR]     at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.invokeEndpoint(SOAPMessageDispatcher.java:254)

            [STDERR]     at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:547

            [STDERR]     at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:140)

            [STDERR]     at com.sun.xml.ws.server.Tie.handle(Tie.java:88)

            [STDERR]     at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.handle(WSServletDelegate.java:279)

            [STDERR]     at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:232)

            [STDERR]     at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:77)

            [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

            [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

            [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

            [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            • 3. Jboss Unable to pick the Xsd schema
              Wolfgang Knauf Master

              Hi,

               

              which xsd file declares the element "solicitation"?

               

              Note that JBoss 5.0 became much more strict in xml validation, so that it is a common problem that older apps no longer work with AS5.

               

              Best regards

               

              Wolfgang

              • 4. Jboss Unable to pick the Xsd schema
                Wolfgang Knauf Master

                After thinking a bit about it ;-): I assume that the XSD is created by yourself and part of your app?

                 

                One more question: which schemaLocation did you declare in the xml files?

                 

                There is a file "%JBOSS_HOME%\server\default\conf\jax-ws-catalog.xml" which seems to declare mappings beetween xsd schema locations and local files. Maybe it helps to add your xsd file to this list?

                 

                Best regards

                 

                Wolfgang