Curamrda
Curamrda

Reputation: 91

cvc-complex-type.3.2.2: Attribute 'jaxb:extensionBindingPrefixes' is not allowed to appear in element 'jaxb:bindings'

I've checkoud one project... and trying solve some problems in Eclipse Luna 4.4.0. In one of the maven project I have following xjb file:

<?xml version="1.0" encoding="UTF-8"?>
    <jaxb:bindings
    version="2.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    jaxb:extensionBindingPrefixes="xjc"
    xmlns:xjc= "http://java.sun.com/xml/ns/jaxb/xjc"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    xsi:schemaLocation="
    http://java.sun.com/xml/ns/jaxb
    http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
">
...
...

but Eclipse reporting me Problem >
cvc-complex-type.3.2.2: Attribute 'jaxb:extensionBindingPrefixes' is not allowed to appear in element 'jaxb:bindings'

does anybody know why?

Upvotes: 8

Views: 9529

Answers (1)

lexicore
lexicore

Reputation: 43699

The bindingschema_2_0.xsd seems to be inadequate. It declares the extensionBindingPrefixes attribute, but does not to use it in the global bindings element.

The use of jaxb:extensionBindingPrefixes attribute in the code you posted looks correct to me.

Me personaly, I have never used used xsi:location in binding files. You can safely remove it.

Upvotes: 3

Related Questions