[jbosstools-issues] [JBoss JIRA] (JBIDE-21943) Errors validating jboss-ejb3.xml
Bartosz Spyrko-Śmietanko (JIRA)
issues at jboss.org
Tue Mar 22 13:50:00 EDT 2016
Bartosz Spyrko-Śmietanko created JBIDE-21943:
------------------------------------------------
Summary: Errors validating jboss-ejb3.xml
Key: JBIDE-21943
URL: https://issues.jboss.org/browse/JBIDE-21943
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Affects Versions: 4.3.0.Final
Reporter: Bartosz Spyrko-Śmietanko
Priority: Minor
Trying to include urn:trans-timeout element in jboss-ejb3.xml leads to a validation failure:
{noformat}
cvc-complex-type.2.4.a: Invalid content was found starting with element 'tx:trans-timeout'. One of '{"http://java.sun.com/xml/ns/javaee":container-transaction-entry}' is expected.
{noformat}
and a warning:
{noformat}
cvc-complex-type.2.4.a: Invalid content was found starting with element 'tx:trans-timeout'. One of '{"http://java.sun.com/xml/ns/javaee":container-transaction-entry}' is expected.
{noformat}
Example jboss-ejb3.xml file:
{noformat}
<?xml version="1.0" encoding="UTF-8"?>
<jboss:ejb-jar version="3.1" impl-version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns:tx="urn:trans-timeout"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd
urn:trans-timeout http://www.jboss.org/j2ee/schema/trans-timeout-1_0.xsd
" >
<assembly-descriptor>
<container-transaction>
<description>foobar</description>
<method>
<ejb-name>foobar</ejb-name>
<method-name>foobar</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
<tx:trans-timeout>
<tx:timeout>100</tx:timeout>
<tx:unit>Seconds</tx:unit>
</tx:trans-timeout>
</container-transaction>
</assembly-descriptor>
</jboss:ejb-jar>
{noformat}
I think the issue might be related to how Eclipse matches the entries in XML Catalog - giving priority to schemaLocation over namespace match [1]. Since the trans-transactions schema is only referenced via urn:trans-timeout namespace in the catalog, Eclipse tries to download it from jboss.org, fails and never uses the version shipped with Tools.
[1] https://wiki.eclipse.org/Using_the_XML_Catalog#FAQ
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jbosstools-issues
mailing list