Announcement Announcement Module
Collapse
No announcement yet.
ERROR about <oxm:jaxb2-marshaller/> Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ERROR about <oxm:jaxb2-marshaller/>

    I gotta "cvc-complex-type.2.4.c" error from the console after Tomcat (6.x, JDK1.6) started while I'm using XML Schema-based configuration of JAXB2:
    Code:
    The matching wildcard is strict, but no declaration can be found for element 'oxm:jaxb2-marshaller'.
    I'm quite sure that I use the right spring-oxm.1.5.xsd file, because the Eclipse (Europa) Content Assist recognize this of hint:
    Code:
    <>alias
    <>bean
    <>import
    <>oxm:jaxb1-marshaller
    <>oxm:jaxb2-marshaller
    <>oxm:jibx-marshaller
    <>oxm:xmlbeans-marshaller
    <>sws:marshalling-endpoints
    <>sws:xpath-endpoints
    Any one knows why or does the problem still happen in the new spring-ws.1.5.6? Thanks.
    Last edited by charles-xie; Jan 29th, 2009, 08:20 PM.

  • #2
    I think it is because of spring-ws-1.5.5-all.jar. The bug is SWS-454.
    I have to use each jar in different modules.
    Last edited by charles-xie; Feb 9th, 2009, 04:06 AM.

    Comment


    • #3
      This issue should be fixed now. Try out the 1.5.6 release.

      Comment


      • #4
        Originally posted by tareq View Post
        This issue should be fixed now. Try out the 1.5.6 release.
        Hello,

        I have exactly the same problem , but I think in my case I can have a jar conflict somewhere, if you have any idea about this also..... ?

        Code:
        org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 19 in XML document from class path resource [..........hrs.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'oxm:xmlbeans-marshaller'.
        	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:369)
        	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
        	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
        	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
        	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
        	Truncated. see log file for complete stacktrace
        org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'oxm:xmlbeans-marshaller'.
        	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
        	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
        	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
        	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
        	Truncated. see log file for complete stacktrace
        Code:
        ....
        <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:oxm="http://www.springframework.org/schema/oxm"
          xsi:schemaLocation="http://www.springframework.org/schema/beans
                              http://www.springframework.org/schem...-beans-2.0.xsd
                              http://www.springframework.org/schema/oxm 
                              http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd">
        
          <oxm:xmlbeans-marshaller id="xmlBeansMarshaller" />
        ......
        this are some of the libraries that are used in my project:

        Code:
        .........
        dom4j-dom4j-1.6.1.jar
        xalan-xalan-2.7.0.jar
        xerces-xerces-1.2.3.jar
        xerces-xercesImpl-2.2.1.jar
        xml-apis-xml-apis-1.0.b2.jar
        ......
        org-springframework-spring-2.0.5.jar
        spring-ws-1.5.6-all.jar
        ..........
        and everything is running on an Weblogic server 9.2MP2

        PS: replacing the spring-ws-1.5.5-all.jar with spring-ws-1.5.6-all.jar dose not have any effect on my configuration...
        Last edited by EmilianM; Feb 25th, 2009, 08:48 AM.

        Comment


        • #5
          looks like your schema is not downloading/validating... are you behind a firewall?

          Comment


          • #6
            I believe I am having the same problem. We are deploying a spring 3.0.0.RELEASE app to a Oracle Weblogic 11gR1 server. I am new to WebLogic administration, however the system the server is deployed on has a proxy set, as does maven (which I am using to automate the deploy using the weblogic maven plugin).

            We're not using spring-ws.1.5.6.jar but do have spring-ws-core-1.5.8 as a dependency (there does not seem to be an equivalent 3.0.0.RELEASE version).

            Also, we have a sub project which we compile to a JAR, which our WAR depends upon. This jar has the spring-oxm dependency declared but our WAR project has the following:

            <exclusions>
            <exclusion>
            <artifactId>spring-oxm</artifactId>
            <groupId>org.springframework.ws</groupId>
            </exclusion>
            </exclusions>

            Is it possible that having this means we are getting the error in this thread?

            I'm trying commenting this out to see what happens.

            Comment


            • #7
              I've now made sure that I only have 3.0.0.RELEASE versions of spring-oxm and sprnig-ws-core in my WAR but I still see the same error message when I deploy.

              Can anyone help?

              Comment


              • #8
                I have a colleague who is deploying to an external Tomcat server and is seeing the same problem. It looks like we have the same problem.

                Comment


                • #9
                  al94781,

                  I have a solution to this as I encountered this just now.

                  Make sure you have the spring-oxm-tiger dependancy for JAXB2 marshalling, then change the schema version to 1.5 from 3.0 in yourspring config file -

                  Code:
                  http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd
                  HTH

                  Comment


                  • #10
                    The prefix ....&quot;oxm:jaxb2-marshaller&quot; - is not bound

                    I am having the same if not similar problem. I am still looking for an answer.

                    I am using spring-ws-1.5.8.jar and I put spring-oxm-tiger-1.5.8.jar in my App lib directory as well.

                    This error below wouldn't go away:

                    The o"oxm" for element "oxm:jaxb2-marshaller" is not bound.

                    Any ideas would be greatly appreciated.

                    Comment


                    • #11
                      Hi,

                      I'm new to Spring Webservices. I have written a web service for CRUD operations on person. I am using jaxb for marshelling and unmarshelling. At compile time its not giving me any error, but at runtime it gives me an exception while accessing the wsdl.

                      My spring-ws-servlet.xml looks like:

                      <?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:oxm="http://www.springframework.org/schema/oxm"
                      xsi:schemaLocation="http://www.springframework.org/schema/beans
                      http://www.springframework.org/schem...-beans-2.5.xsd
                      http://www.springframework.org/schema/oxm
                      http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd">




                      <bean id="personService" class="mycompany.service.PersonServiceImpl"
                      init-method="initialize" />
                      <bean id="Person"
                      class="org.springframework.ws.wsdl.wsdl11.DefaultW sdl11Definition">
                      <property name="schema" ref="schema" />
                      <property name="portTypeName" value="Person" />
                      <property name="locationUri" value="/services" />
                      <property name="targetNamespace" value="http://www.mycompany.com/person/schema" />
                      </bean>
                      <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
                      <property name="xsd" value="/WEB-INF/person.xsd" />
                      </bean>

                      <bean id="validatingInterceptor"
                      class="org.springframework.ws.soap.server.endpoint .interceptor.PayloadValidatingInterceptor">
                      <property name="xsdSchema" ref="schema" />
                      <property name="validateRequest" value="true" />
                      <property name="validateResponse" value="true" />
                      </bean>


                      <bean id="loggingInterceptor"
                      class="org.springframework.ws.server.endpoint.inte rceptor.PayloadLoggingInterceptor" />

                      <oxm:jaxb2-marshaller id="marshaller" contextPath="com.mycompany.person.schema"/>
                      <oxm:jaxb2-marshaller id="unmarshaller"
                      contextPath="com.mycompany.person.schema" />



                      <bean id="addPersonEndpoint" class="mycompany.endpoint.AddPersonEndpoint"
                      autowire="byName" />
                      <bean id="deletePersonEndpoint" class="mycompany.endpoint.DeletePersonEndpoint"
                      autowire="byName" />
                      <bean id="getAllPersonsEndpoint" class="mycompany.endpoint.GetAllPersonsEndpoint"
                      autowire="byName" />
                      <bean id="getPersonEndpoint" class="mycompany.endpoint.GetPersonEndpoint"
                      autowire="byName" />
                      <bean id="updatePersonEndpoint" class="mycompany.endpoint.UpdatePersonEndpoint"
                      autowire="byName" />

                      <bean name="endpointMapping"
                      class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootQNameEndpointMapping">
                      <property name="interceptors">
                      <list>
                      <ref local="loggingInterceptor" />
                      <ref local="validatingInterceptor" />
                      </list>
                      </property>
                      <property name="mappings">
                      <props>
                      <prop key="{http://www.mycompany.com/person/schema}AddPersonRequest">addPersonEndpoint</prop>
                      <prop key="{http://www.mycompany.com/person/schema}DeletePersonRequest">deletePersonEndpoint</prop>
                      <prop key="{http://www.mycompany.com/person/schema}GetAllPersonsRequest">getAllPersonsEndpoint </prop>
                      <prop key="{http://www.mycompany.com/person/schema}GetPersonRequest">getPersonEndpoint</prop>
                      <prop key="{http://www.mycompany.com/person/schema}UpdatePersonRequest">updatePersonEndpoint</prop>
                      </props>
                      </property>
                      </bean>

                      <bean id="exceptionResolver"
                      class="org.springframework.ws.soap.server.endpoint .SoapFaultMappingExceptionResolver">
                      <property name="defaultFault" value="SERVER" />
                      <property name="exceptionMappings">
                      <props>
                      <prop key="org.springframework.oxm.ValidationFailureExce ption">CLIENT,Invalid request</prop>
                      <prop key="mycompany.service.PersonException">SERVER</prop>
                      </props>
                      </property>
                      </bean>


                      </beans>

                      I have used the below jars:

                      acegi-security-1.0.6.jar
                      activation-1.1.1.jar
                      axiom-api-1.2.8.jar
                      axiom-impl-1.2.8.jar
                      bcprov-jdk14-1.43.jar
                      castor-1.2.jar
                      commons-httpclient-3.1.jar
                      commons-logging-1.1.1.jar
                      dom4j-1.6.1.jar
                      ejb-2.1.jar
                      isorelax-20030108.jar
                      jaxb-api-1.0.jar
                      jaxb-api-2.1.jar
                      jaxb-impl-1.0.6.jar
                      jaxb-impl-2.1.5.jar
                      jaxb-libs-1.0.6.jar
                      jms-1.1.jar
                      log4j-1.2.15.jar
                      mail-1.4.1.jar
                      opensaml-1.1.jar
                      relaxngDatatype-20020414.jar
                      saaj-api-1.3.jar
                      saaj-impl-1.3.2.jar
                      servlet-api-2.5.jar
                      spring-aop-2.5.6.jar
                      spring-beans-2.5.6.jar
                      spring-context-2.5.6.jar
                      spring-core-2.5.6.jar
                      spring-jdbc-2.5.6.jar
                      spring-jms-2.5.6.jar
                      spring-orm-2.5.6.jar
                      spring-tx-2.5.6.jar
                      spring-web-2.5.6.jar
                      spring-webmvc-2.5.6.jar
                      spring-ws-1.5.9-all.jar
                      spring-ws-1.5.9-sources.jar
                      spring-ws-2.0.0-M1-all.jar
                      stax-api-1.0-2.jar
                      wsdl4j-1.6.1.jar
                      wss4j-1.5.8.jar
                      wstx-asl-3.2.7.jar
                      xalan-2.7.1.jar
                      xercesImpl-2.8.1.jar
                      xml-apis-1.3.04.jar
                      xmlbeans-2.4.0.jar
                      XmlSchema-1.4.3.jar
                      xmlsec-1.4.3.jar
                      xmlsec-2.0.jar
                      xom-1.1.jar
                      xsdlib-20060615.jar
                      xstream-1.3.jar
                      xws-security-2.0-FCS.jar

                      Exception received:

                      org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'oxm:jaxb2-marshaller'.
                      at org.apache.xerces.util.ErrorHandlerWrapper.createS AXParseException(Unknown Source)
                      at org.apache.xerces.util.ErrorHandlerWrapper.error(U nknown Source)
                      at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)
                      at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)
                      at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIEr rorReporter.reportError(Unknown Source)
                      at org.apache.xerces.impl.xs.XMLSchemaValidator.repor tSchemaError(Unknown Source)
                      at org.apache.xerces.impl.xs.XMLSchemaValidator.handl eStartElement(Unknown Source)
                      at org.apache.xerces.impl.xs.XMLSchemaValidator.empty Element(Unknown Source)
                      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.sc anStartElement(Unknown Source)
                      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
                      at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.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(U nknown Source)
                      at org.springframework.beans.factory.xml.DefaultDocum entLoader.loadDocument(DefaultDocumentLoader.java: 75)
                      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:396)
                      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:342)
                      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:310)
                      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
                      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
                      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
                      at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:124)
                      at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:92)
                      at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
                      at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:422)
                      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
                      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 02)
                      at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:316 )
                      at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:282)
                      at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
                      at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
                      at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1173)
                      at org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:809)
                      at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:129)
                      at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
                      at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)
                      at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
                      at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
                      at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
                      at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:849)
                      at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:454)
                      at java.lang.Thread.run(Unknown Source)

                      Comment

                      Working...
                      X