• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error in

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am getting the following error in jboss-ejb3-spec-2_0.xsd :
cos-nonambig: "http://java.sun.com/xml/ns/javaee":assembly-descriptor and "http://java.sun.com/xml/ns/javaee":assembly-descriptor (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles. jboss-ejb3-spec-2_0.xsd /SampleEJB/ejbModule/META-INF line 126 XML Schema Problem

Its giving the error at this

<xs:complexType name="jboss-ejb-jarType">
<xs:complexContent>
<xs:extension base="javaee:ejb-jarType">
<xs:sequence>
<xs:element ref="jboss:enterprise-beans" minOccurs="0"/>
<xs:element name="assembly-descriptor" type="javaee:assembly-descriptorType" minOccurs="0"/> </xs:sequence>
<xs:attribute name="impl-version" type="javaee:dewey-versionType" fixed="2.0" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>


If I remove the above one in Bold, the error was not showing up

Is this a problem with jboss-ejb3-spec-2_0.xsd.
 
Vamsibvo Kris
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could Some one help me resolve this Please.I am getting this Unique Particle Attribution Error.Looks like its trying to refer to assembly-descriptor Tag in both
'jboss-ejb3-spec-2_0.xsd and ejb-jar_3_1.xsd.

Thanks
Vam
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is generating this error? I ask because I don't see how an ambiguous xsd could have been released as part of JBoss AS, especially since JBoss AS since about the 5.x release has been very picky about properly formatted xml files. So I suspect that JBoss AS is not generating the error that you are seeing.
 
Vamsibvo Kris
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:What is generating this error? I ask because I don't see how an ambiguous xsd could have been released as part of JBoss AS, especially since JBoss AS since about the 5.x release has been very picky about properly formatted xml files. So I suspect that JBoss AS is not generating the error that you are seeing.




Hi Peter,
Inside Jboss-ejb3.xml,
jboss-ejb3-2_0.xsd is being referenced.

Jboss-ejb3.xml is showing an error below
Referenced file contains errors (file:../../../ejbModule/META-INF/jboss-ejb3-2_0.xsd). For more information, right click on the message in the Problems View and select "Show Details..."
The exact error is:
The error below were detected when validating the file "jboss-ejb3-2.xsd" vai the file
"jboss-ejb3.xml".In most cases these errors can be detected by validating "jboss-ejb3-3_0.xsd" directly
However it is possible that errors will only occur when jboss-ejb3-2_0.xsd is
validated in the context of jboss-ejb3.xml.

src-resolve:canot resolve the name 'javaee:jboss-ejb-beanType' to a(n)' type definition' component line 34
src-reslve:canot resolve the name 'javaee:jboss-ejb-jarType' to a(n)' type definition component line 36.
src-resolve:Canot resolve the name 'javaee:jboss-enterprise-beansType' to a(n)'type definition' component. line 38

'javaee:jboss-ejb-beanType' is defined in jboss-ejb3-spec-2_0.xsd.
When I open the jboss-ejb3-spec-2_0.xsd in XML Editor ,its showing this error:
cos-nonambig: "http://java.sun.com/xml/ns/javaee":assembly-descriptor and "http://java.sun.com/xml/ns/javaee":assembly-descriptor (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.

I am not sure how to resolve the above error.

Thanks
Vam

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you seeing that error in your IDE? Does your application deploy fine?
 
Vamsibvo Kris
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jaikiran Pai wrote:Are you seeing that error in your IDE? Does your application deploy fine?



Kiran,
I am getting this error in the Eclipse IDE and all the different XML Editors.
The exact error is this.

In the Jboss-ejb3.xml,its trying to reference http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd something like this.


<?xml version="1.0" 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 jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1" impl-version="2.0">



In the above,We are referencing both Schemas

http://www.jboss.com/xml/ns/javaee jboss-ejb3-2_0.xsd (namespace is http://www.jboss.com/xml/ns/javaee ) and

http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd (namespace is http://java.sun.com/xml/ns/javaee) under xsi:schemaLocation.


jboss-ejb3-2_0.xsd inturn references jboss-ejb3-spec-2_0.xsd something like this


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

targetNamespace="http://www.jboss.com/xml/ns/javaee"

xmlns="http://www.jboss.com/xml/ns/javaee"

xmlns:javaee="http://java.sun.com/xml/ns/javaee"

elementFormDefault="qualified"

attributeFormDefault="unqualified"

version="2.0">

<!-- xs:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="ejb-jar_3_1.xsd"/ -->

<!-- xs:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"/ -->

<xs:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="jboss-ejb3-spec-2_0.xsd"/>




There is an ambiguity error or the Conflict that is Caused for the Element <assembly-descriptorType> in both jboss-ejb3-spec-2_0.xsd and ejb-jar_3_1.xsd



1.

jboss-ejb3-spec-2_0.xsd Defines the Defines the Element <assembly-descriptorType> as below:



<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

targetNamespace="http://java.sun.com/xml/ns/javaee"

xmlns:javaee="http://java.sun.com/xml/ns/javaee"

xmlns:jboss="http://www.jboss.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee jboss-ejb3-2_0.xsd"

elementFormDefault="qualified"

attributeFormDefault="unqualified"

version="2.0">


<!-- xs:include schemaLocation="ejb-jar_3_1.xsd"/ -->

<!--

<xs:include schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"/>

-->


<xs:import namespace="http://www.jboss.com/xml/ns/javaee" schemaLocation="jboss-ejb3-2_0.xsd"/>


<xs:redefine schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">

<xs:complexType name="assembly-descriptorType">

<xs:complexContent>

<xs:extension base="javaee:assembly-descriptorType">

<xs:sequence>

<xs:element ref="javaee:assembly-descriptor-entry" minOccurs="0" maxOccurs="unbounded"/>

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>

</xs:redefine>



It references assembly-descriptor like this:

<xs:complexType name="jboss-ejb-jarType">

<xs:complexContent>

<xs:extension base="javaee:ejb-jarType">

<xs:sequence>

<xs:element ref="jboss:enterprise-beans" minOccurs="0"/>

<xs:element name="assembly-descriptor" type="javaee:assembly-descriptorType" minOccurs="0"/>

</xs:sequence>

<xs:attribute name="impl-version" type="javaee:dewey-versionType" fixed="2.0" use="required"/>

</xs:extension>

</xs:complexContent>

</xs:complexType>







2.

http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd Defines the Element <assembly-descriptorType> something like this




<xsd:complexType name="assembly-descriptorType">

<xsd:annotation>

<xsd:documentation>


The assembly-descriptorType defines

application-assembly information.



The application-assembly information consists of the

following parts: the definition of security roles, the

definition of method permissions, the definition of

transaction attributes for enterprise beans with

container-managed transaction demarcation, the definition

of interceptor bindings, a list of

methods to be excluded from being invoked, and a list of

exception types that should be treated as application exceptions.



All the parts are optional in the sense that they are

omitted if the lists represented by them are empty.



Providing an assembly-descriptor in the deployment

descriptor is optional for the ejb-jar or .war file producer.



</xsd:documentation>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="security-role"

type="javaee:security-roleType"

minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="method-permission"

type="javaee:method-permissionType"

minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="container-transaction"

type="javaee:container-transactionType"

minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="interceptor-binding"

type="javaee:interceptor-bindingType"

minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="message-destination"

type="javaee:message-destinationType"

minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="exclude-list"

type="javaee:exclude-listType"

minOccurs="0"/>

<xsd:element name="application-exception"

type="javaee:application-exceptionType"

minOccurs="0"

maxOccurs="unbounded"/>

</xsd:sequence>

<xsd:attribute name="id"

type="xsd:ID"/>

</xsd:complexType>



Because of the above Scenario when I am trying to Validate the XML ,I am getting the following error:

cos-nonambig: "http://java.sun.com/xml/ns/javaee":assembly-descriptor and "http://java.sun.com/xml/ns/javaee":assembly-descriptor (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.


Attached are the xsd's. I renamed to xsd1.
 
Vamsibvo Kris
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kiran,
Could you please help me with the above error.
 
reply
    Bookmark Topic Watch Topic
  • New Topic