Bug 1318211 - jboss-ejb3.xml validation error for "tx:trans-timeout" tag.
Summary: jboss-ejb3.xml validation error for "tx:trans-timeout" tag.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.4.0
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
: ---
Assignee: Bartek Spyrko-Smietanko
QA Contact: Jan Martiska
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-16 09:50 UTC by xuzhan
Modified: 2020-01-17 15:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-22 17:59:49 UTC
Type: Bug


Attachments (Terms of Use)

Description xuzhan 2016-03-16 09:50:35 UTC
Description of problem:
JBDS 8.0.0 thrown error and warning when validating "jboss-ejb3.xml" with "<tx:trans-timeout>" tags

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. copy below info into "jboss-ejb3.xml"
<?xml version="1.0"?>
<jboss:ejb-jar
        xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
        xmlns="http://java.sun.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"
        version="3.1"
        impl-version="2.0">
   <assembly-descriptor>
      <container-transaction>
         <method>
            <ejb-name>DaEnergyMarketBidsBean</ejb-name>
            <method-name>*</method-name>
         </method>
         <tx:trans-timeout>
            <tx:timeout>1800</tx:timeout>
            <tx:unit>Seconds</tx:unit>
         </tx:trans-timeout>
      </container-transaction> 
   </assembly-descriptor> 
</jboss:ejb-jar>


Actual results:
JBDS Problems window:
----------------
Description        Resource             Path       Location               Type

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":method, "http://java.sun.com/xml/ns/javaee":trans-attribute}' is expected.                jboss-ejb3.xml  /shspoc/sms/src/java/com/isone/sms/bids/ejb               line 18  XML Problem

schema_reference.4: Failed to read schema document 'http://www.jboss.org/j2ee/schema/trans-timeout-1_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.  jboss-ejb3.xml  /shspoc/sms/src/java/com/isone/sms/bids/ejb               line 18  XML Problem
----------------

Expected results:
No errors.

Additional info:
Please let us know if it is a bug of validation.
If not, please provide a correct sample to us.

Comment 4 Tomas Gustavsson 2016-04-29 12:38:55 UTC
Also causes XML validation errors in eclipse, since the URL http://www.jboss.org/j2ee/schema/trans-timeout-1_0.xsd does not exist.

I see that this is not a bug in JBoss, but it's a but as jboss.org, isn't it?

Comment 5 Bartek Spyrko-Smietanko 2016-04-29 13:02:56 UTC
Tomas, trans-timeout schema is actually published under http://www.jboss.org/schema/jbossas/ - http://www.jboss.org/schema/jbossas/trans-timeout-1_0.xsd
Using this URL Eclipse validation should work correctly.

Comment 6 Tomas Gustavsson 2016-04-29 13:13:03 UTC
Thanks for the correct link!

Comment 7 Tomas Gustavsson 2016-04-29 13:15:38 UTC
Eclipse complains about errors in this though http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd :-)

(totally unrelated to the issue, so no need to answer, this was just a stupid comment)


Note You need to log in before you can comment on or make changes to this bug.