[
https://issues.jboss.org/browse/JBIDE-18316?page=com.atlassian.jira.plugi...
]
Vlado Pakan commented on JBIDE-18316:
-------------------------------------
If entry "http://java.sun.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd" is removed from
xsi:schemaLocation from original version of the file validation returns no errors and code
assist looks working.
Fixed file jboss-ejb3.xml should looks like this:
{code:xml}
<?xml version="1.1" encoding="UTF-8"?>
<jboss:ejb-jar
xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="urn:clustering:1.0"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd"
version="3.1" impl-version="2.0">
<assembly-descriptor>
</assembly-descriptor>
</jboss:ejb-jar>
{code}
Reason for this issue is that jboss-ejb3.xml sets schema location for
"http://java.sun.com/xml/ns/javaee" namespace explicitly to
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd but has defined also namespace
"http://www.jboss.com/xml/ns/javaee" which resolves to jboss-ejb3-2_0.xsd file
from XML catalog. jboss-ejb3-2_0.xsd imports namespace
"http://java.sun.com/xml/ns/javaee" which in XML catalog point to
jboss-ejb3-spec-2_0.xsd file but this is the same namespace with defined schema location
in jboss-ejb3.xml and resolved to
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd file
(stored in XML catalog) instead to jboss-ejb3-spec-2_0.xsd file. I don't know if this
is an Eclipse bug or expected scenario.
Once schema location definition for "http://java.sun.com/xml/ns/javaee"
namespace is removed from file jboss-ejb3.xml validation does not complain anymore.
That is also reason why when jboss-ejb3-2_0.xsd is opened in JBDS there are no validation
errors. jboss-ejb3-2_0.xsd has errors only in context of jboss-ejb3.xml validation
Errors in project after import WildFly quickstarts (bundled
jboss-ejb3-2_0.xsd)
-------------------------------------------------------------------------------
Key: JBIDE-18316
URL:
https://issues.jboss.org/browse/JBIDE-18316
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: server, upstream
Affects Versions: 4.2.0.Beta3
Reporter: Xavier Coulon
Assignee: Rob Stryker
Priority: Critical
Fix For: 4.3.x
After importing all modules from
https://github.com/wildfly/quickstart into JBDS
8.0.0.CR1b, a few projects have errors because of XML validation, such as:
{code}
Referenced file contains errors
(jar:file:/Users/xcoulon/DevToolz/ide/jbossdevstudio800CR1b/studio/plugins/org.jboss.tools.as.catalog_3.0.0.CR1-v20140905-1648-B75.jar!/schema/xsd/jboss-ejb3-2_0.xsd).
For more information, right click on the message in the Problems View and select
"Show Details..."
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)