11
votes

Pourquoi est-ce que je reçois des erreurs dans jdoconfig.xml?

L'onglet Marker Eclipse affiche un problème XML code>. Cela s'est produit lorsque j'ai vérifié module Web dynamique code> dans les facettes de projet code>.

Ceci est ma hiérarchie de projet: p>

Entrez la description de l'image ici P>

jdconfig.xml code> (généré automatiquement): p> xxx pré>

erreurs affichés dans la fenêtre Marqueur: p>

cvc-elt.1: Cannot find the declaration of element 'jdoconfig'.


0 commentaires

5 Réponses :


-2
votes

Parce que c'est faux? Cette page a un exemple simple http://db.apache.org/jdo/jdoconfig_dtd.html

Le La documentation de toute implémentation JDO expliquerait ce que ce dossier est pour, de même qu'une simple recherche sur Internet. p>

Un meilleur en-tête XML serait quelque chose comme P>

<jdoconfig xmlns="http://xmlns.jcp.org/xml/ns/jdo/jdoconfig"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/jdo/jdoconfig
        http://xmlns.jcp.org/xml/ns/jdo/jdoconfig_3_0.xsd" version="3.0">


1 commentaires

Cela n'a pas fonctionné pour moi. La réponse de Protoxy a travaillé pour moi.



1
votes
cvc-elt.1: Cannot find the declaration of element 'jdoconfig'.
This is a validation error. It says, that when validating your XML file, parser couldn't find declaration for element <jdconfig> on the referred schema document.In your case it is probably caused by two different things:
The schemalocation http://java.sun.com/xml/ns/jdo/jdoconfig is incorrect, there is no schema in that address.
The element <jdconfig> has a (default) namespace, yet the schema location refers to non-namespaced schema.

0 commentaires

31
votes

Essayez cela à la place

  <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">


2 commentaires

Il a corrigé le problème!


Est-il possible que cette réponse inclue pourquoi cela a fonctionné? (Upéted quand même depuis qu'il résume le problème).



0
votes
<?xml version="1.0" encoding="UTF-8" ?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig 
    http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">

0 commentaires

1
votes

S'il n'existe aucun schéma selon 'XSI: NonaméSpacesChamalocation, puis supprimer cet attribut tue cette erreur de validation.

<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >


0 commentaires