Bug 1192591 - [DOC] (6.4.z) jboss-ejb-iiop_1_0.xsd is invalid
Summary: [DOC] (6.4.z) jboss-ejb-iiop_1_0.xsd is invalid
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.17
Assignee: Carlo de Wolf
QA Contact: Jiří Bílek
URL:
Whiteboard:
: 1193543 (view as bug list)
Depends On:
Blocks: 1426887 eap6417-payload
TreeView+ depends on / blocked
 
Reported: 2015-02-13 19:03 UTC by Carlo de Wolf
Modified: 2019-10-10 09:37 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-06 13:35:56 UTC
Type: Bug


Attachments (Terms of Use)
Screen shot of the error (194.82 KB, image/png)
2015-05-18 11:25 UTC, sgilda
no flags Details
Maven settings.xml file (4.96 KB, application/xml)
2015-05-18 11:52 UTC, sgilda
no flags Details
Screenshot of errors reported in duplicate bug 1193543 (142.66 KB, image/png)
2017-01-05 16:52 UTC, sgilda
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2338041 None None None 2016-05-26 05:07:09 UTC
JBoss Issue Tracker JBEAP-9558 Critical Verified (7.1.0) jboss-ejb-iiop_1_0.xsd is invalid 2018-11-06 21:02:55 UTC
Red Hat Bugzilla 901186 None None None Never
JBoss Issue Tracker JBEAP-9559 Critical Verified (7.0.z) jboss-ejb-iiop_1_0.xsd is invalid 2018-11-06 21:02:54 UTC
JBoss Issue Tracker WFLY-8357 Critical Resolved jboss-ejb-iiop_1_0.xsd is invalid 2018-11-06 21:02:54 UTC

Internal Links: 901186

Description Carlo de Wolf 2015-02-13 19:03:23 UTC
Following xml should validate without a hitch:
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:iiop="urn:iiop"
               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:iiop jboss-ejb-iiop_1_0.xsd"
               version="3.1"
               impl-version="2.0">
    <assembly-descriptor>
        <iiop:iiop>
            <ejb-name>InvoiceManagerEJBImpl</ejb-name>
            <iiop:binding-name>jts-quickstart/InvoiceManagerEJBImpl</iiop:binding-name>
        </iiop:iiop>
    </assembly-descriptor>
</jboss:ejb-jar>

Yet it gives problems:

org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 32; cvc-complex-type.2.4.a: Invalid content was found starting with element 'iiop:binding-name'. One of '{"urn:iiop":ejb-name}' is expected.

Adding <iiop:ejb-name>InvoiceManagerEJBImpl</iiop:ejb-name> (which is invalid) yields:
org.xml.sax.SAXParseException; lineNumber: 32; columnNumber: 21; cvc-complex-type.2.4.b: The content of element 'iiop:iiop' is not complete. One of '{"urn:iiop":ior-security-config}' is expected.

Comment 5 Weston M. Price 2015-05-06 23:43:44 UTC
Strange, currently I'm not seeing any validation errors against the sample xml with the IIOP descriptor using JAXP and straight Java code. However, I am seeing validation errors with xmllint and other utilities. Carlo, could you specify how you produced this error> I am attaching my files as well so someone can verify that validation works fine and I didn't miss anything.

Comment 7 Weston M. Price 2015-05-07 22:07:48 UTC
*** Bug 1193543 has been marked as a duplicate of this bug. ***

Comment 8 Weston M. Price 2015-05-11 17:48:52 UTC
Thanks. Ill have a closer look.

Comment 9 Weston M. Price 2015-05-11 17:49:12 UTC
Thanks. Ill have a closer look.

Comment 10 sgilda 2015-05-18 11:24:29 UTC
Hi Weston,

Follow the steps below to reproduce the issue.

1. Configure your Maven settings to use the following repositories (see attached example):
        http://maven.repository.redhat.com/techpreview/all
        http://maven.repository.redhat.com/earlyaccess/all/
        http://jboss-developer.github.io/temp-maven-repo/
        http://repository.jboss.org/nexus/content/groups/public/
2. Checkout the quickstarts from the default 7.0.x-develop branch: 
        https://github.com/jboss-developer/jboss-eap-quickstarts
3. Start JBoss Developer Studio 8
4. Import the 'jts' quickstart into JBoss Developer Studio.
5. Note the Problems window displays 2 errors and 10 warnings. Screen shot is attached. This is the error that the bug refers to:

    cvc-complex-type.2.4.a: Invalid content was found starting with element 'iiop:binding-name'. One of '{"urn:iiop":ejb-name}' is expected.    jboss-ejb3.xml    /jboss-jts-application-component-2/src/main/resources/META-INF    line 30    XML Problem

Please let me know if you have any other questions.

Thanks,
Sande

Comment 11 sgilda 2015-05-18 11:25:48 UTC
Created attachment 1026665 [details]
Screen shot of the error

This is a screen shot of the the error that displays when you import the `jts` quickstart.

Comment 12 sgilda 2015-05-18 11:52:07 UTC
Created attachment 1026670 [details]
Maven settings.xml file

Comment 13 Weston M. Price 2015-05-22 12:24:48 UTC
Thanks Sande, especially the settings file.

Comment 15 Weston M. Price 2015-06-01 05:54:59 UTC
I have a workaround for this, but it's a solution that neither Carlo or myself care for. It appears there are duplicated elements across namespaces/schema that need some explanation. As Stuart Douglas 'maintains' the IIOP schema, or was at least the last one to work with it, I'm going to speak with him about why this was needed. Stuart was on PTO last week but has returned. I will talk with him this morning.

Comment 16 Weston M. Price 2015-06-01 07:32:28 UTC
Sorry, forgot to include the workaround. In order to get past the current issue, your XML file should read: 

<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:iiop="urn:iiop"
               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:iiop http://www.jboss.org/j2ee/schema/jboss-ejb-iiop_1_0.xsd"
               version="3.1"
               impl-version="2.0">
    <assembly-descriptor>
		<iiop:iiop>
			<ejb-name>ejbName</ejb-name>
			<iiop:ejb-name>ejbName</iiop:ejb-name>
			<iiop:binding-name>bindingName</iiop:binding-name>
			<iiop:ior-security-config></iiop:ior-security-config>
		</iiop:iiop>		
    </assembly-descriptor>
</jboss:ejb-jar>

The duplication comes obviously in the ejbName portion. Ideally, the ejbName element should be taken from the javaee:jboss-assembly-descriptor-bean-entryType complex which the iiopConfigType extends using an extension base. This is not happening and as a result, the ejbName needs to be duplicated. I can't see why we would need this. 

Again, I will speak with Stuart to verify. If we can remove it, the ejbName will be taken from the IIOP config and the schema should validate with no issues. 

Note, there are a few other bugs around this issue, some are duplicates. I am trying to track the rest down. I marked one as duplicate recently and I think I can track back from there.

Comment 17 Carlo de Wolf 2015-11-27 12:44:02 UTC
Note that using the work-around mentioned in the description gives an error in the parser:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[34,51]
Message: found: CHARACTERS, expected START_ELEMENT or END_ELEMENT
	at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.nextTag(XMLStreamReaderImpl.java:1250)
	at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:64)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.AbstractEJBBoundMetaDataParser.processElements(AbstractEJBBoundMetaDataParser.java:66)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.IIOPMetaDataParser.parse(IIOPMetaDataParser.java:50)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.IIOPMetaDataParser.parse(IIOPMetaDataParser.java:45)
	at org.jboss.metadata.ejb.parser.spec.ExtendingMetaDataParser.processElement(ExtendingMetaDataParser.java:83)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.JBossAssemblyDescriptorMetaDataParser.processElement(JBossAssemblyDescriptorMetaDataParser.java:59)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.JBossAssemblyDescriptorMetaDataParser.processElement(JBossAssemblyDescriptorMetaDataParser.java:42)
	at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:65)
	at org.jboss.metadata.ejb.parser.spec.ExtendingMetaDataParser.parse(ExtendingMetaDataParser.java:59)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.JBossEjb3MetaDataParser.parseAssemblyDescriptor(JBossEjb3MetaDataParser.java:107)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.JBossEjb3MetaDataParser.processElement(JBossEjb3MetaDataParser.java:148)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.JBossEjb3MetaDataParser.processElement(JBossEjb3MetaDataParser.java:42)
	at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:65)
	at org.jboss.metadata.ejb.parser.jboss.ejb3.JBossEjb3MetaDataParser.parse(JBossEjb3MetaDataParser.java:102)
	at org.jboss.metadata.ejb.test.common.UnmarshallingHelper.unmarshalJboss(UnmarshallingHelper.java:104)
	at org.jboss.metadata.ejb.test.common.UnmarshallingHelper.unmarshalJboss(UnmarshallingHelper.java:91)
	at org.jboss.metadata.ejb.test.common.UnmarshallingHelper.unmarshalJboss(UnmarshallingHelper.java:85)
	at org.jboss.metadata.ejb.test.bz1192591.IIOPParserTestCase.testIIOPWorkaround(IIOPParserTestCase.java:80)

Comment 18 Carlo de Wolf 2015-11-27 13:03:31 UTC
https://github.com/jboss/metadata/pull/98

Comment 19 Mike McCune 2016-03-28 22:23:55 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions

Comment 20 Rob Stryker 2016-04-20 22:48:06 UTC
For what versions of EAP / Wildfly does this workaround actually work? Can we, for example, push the workaround to the eap7-quickstarts repository?

Comment 21 sgilda 2017-01-05 16:52:15 UTC
Created attachment 1237760 [details]
Screenshot of errors reported in duplicate bug 1193543

Comment 25 Petr Penicka 2017-09-06 13:35:56 UTC
Released on 2017-09-05 as part of the EAP 6.4.17 release.


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