You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by kris16 <kr...@tietoenator.com> on 2006/12/14 08:30:48 UTC

Error Duplicate attribute group

Hi,
im trying to use xmlbeans together with OAGS 9.0 and their XSD files.
It seems to work fine when I generate the java code for one XSD file,
GetItemMaster.xsd.

scomp -verbose -src D:\java\src -out itemmaster.jar
D:\temp\oagis-release-9_0-XSD-GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd 

When I try to generate java code from more than one XSD file then I run into
trubble.
If I add the xsd file "ListItemMaster.xsd" to the command line for scomp the
Java code generation fails.
Probably because both XSD files,GetItemMaster.xsd and ListItemMaster.xsd,
uses the same include files.

scomp -verbose -src D:\java\src2 -out itemmaster.jar
D:\temp\oagis-release-9_0-XSD-GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd
D:\temp\oagis-release-9_0-XSD-GA\OAGIS\9.0\BODs\Standalone\ListItemMaster.xsd

I get the following error when I use:
ListItemMaster.xsd:22:9: error: sch-props-correct.2: Duplicate attribute
group: CodeListAttributeGroup@http://www.openapplications.org/oagis/9
(Original attribute group found in file: GetItemMaster.xsd)

How can I solve this problem ?
Is there a workaround ?
/Regards Krister
-- 
View this message in context: http://www.nabble.com/Error-Duplicate-attribute-group-tf2818956.html#a7867963
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Classes simplifying

Posted by Den Grigorenko <d....@compassplus.ru>.
Good day.
We try to use XmlBeans in the project executed by Java-machine inside  
Oracle 10 database.
That is why all  the classes we have created should be loaded to the  
database. Our Xml-schemes are large (more than 100 Kbyte) and they are 
multiple.

Thus, their compilation through the use of scomp utility results in the  
rather large *.jar files (several mb) whose loading to the database
is a time consuming process (deploy and resolve are executed for 
thousands classes and resources correspondingly).
At that, the resulting classes contain the most methods we don't apply.
We have a question (wish):
Are there any appropriate settings "simplifying" the classes being
generated ?
E.g, DO NOT include methods xgetXXX(), xsetXXX() in the interfaces,
reduce the number of parse(...) methods in the inner Factory class,
give up all the possible variants and leave the ones which are really
needed.


-- 
Den Grigorenko
Compass Plus


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: Error Duplicate attribute group

Posted by kris16 <kr...@tietoenator.com>.
Hi,
thanks for the reply.
It seems to work with the -cp switch in combination with the xsdconfig file,
at least for the common xsd files that are included :-)
In the xsdconfig file I define in what package the should be placed, cant i
otherwise end up with collisions or can xmlBeans handle that ?

I mean if an elemet with the same name exists in two different xsd files,
will that not cause a collission ?

/Regards Krister




Cezar Andrei wrote:
> 
> There is a -cp switch for this. If a schema is split in two: s1 and s2,
> where s1 is stand alone (i.e. doesn't have references to items in s2)
> and s2 uses item from s1 by reference so that there will not be multiple
> definitions of the same name in the s1 + s2 union, they can be compiled
> separately using the classpath for compiled references.
> 
> Compile s1 first as usual, and than compile only s2 putting s1.jar on
> the classpath.
> 
> scomp -out s1.jar s1.xsd
> scomp -out s2.jar -cp [path_to]xbeans.jar;s1.jar s2.xsd
> 
> In your case you might find it useful to split it in three: base, get,
> list, following the same idea.
> 
> Cezar
> 
> 
>> -----Original Message-----
>> From: kris16 [mailto:krister.o.jonsson@tietoenator.com]
>> Sent: Thursday, December 14, 2006 6:58 AM
>> To: user@xmlbeans.apache.org
>> Subject: Re: Error Duplicate attribute group
>> 
>> 
>> Hi again,
>> I tried to solve this problem by running the scomp command twice.
>> Generating
>> two different jar files, one for getitemmaster and one for
> listitemmaster,
>> and it seems to work.
>> The common parts like codelists, currencycode etc. are included in
> both
>> jarfiles and thats not so nice.
>> I noticed that it is possible to use a xsdconfig file and i have
> managed
>> to
>> place GetItemMaster and ListItemMaster in different packages.
>> 
>> It has to be a better solution then the one i have come up with ?
>> Is there a solution to the "Duplicate attribute group" error ?
>> /Regards Krister
>> 
>> 
>> 
>> 
>> 
>> kris16 wrote:
>> >
>> > Hi,
>> > im trying to use xmlbeans together with OAGS 9.0 and their XSD
> files.
>> > It seems to work fine when I generate the java code for one XSD
> file,
>> > GetItemMaster.xsd.
>> >
>> > scomp -verbose -src D:\java\src -out itemmaster.jar
>> > D:\temp\oagis-release-9_0-XSD-
>> GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd
>> >
>> > When I try to generate java code from more than one XSD file then I
> run
>> > into trubble.
>> > If I add the xsd file "ListItemMaster.xsd" to the command line for
> scomp
>> > the Java code generation fails.
>> > Probably because both XSD files,GetItemMaster.xsd and
>> ListItemMaster.xsd,
>> > uses the same include files.
>> >
>> > scomp -verbose -src D:\java\src2 -out itemmaster.jar
>> > D:\temp\oagis-release-9_0-XSD-
>> GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd
>> > D:\temp\oagis-release-9_0-XSD-
>> GA\OAGIS\9.0\BODs\Standalone\ListItemMaster.xsd
>> >
>> > I get the following error when I use:
>> > ListItemMaster.xsd:22:9: error: sch-props-correct.2: Duplicate
> attribute
>> > group:
> CodeListAttributeGroup@http://www.openapplications.org/oagis/9
>> > (Original attribute group found in file: GetItemMaster.xsd)
>> >
>> > How can I solve this problem ?
>> > Is there a workaround ?
>> > /Regards Krister
>> >
>> 
>> --
>> View this message in context: http://www.nabble.com/Error-Duplicate-
>> attribute-group-tf2818956.html#a7871978
>> Sent from the Xml Beans - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
>> For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-Duplicate-attribute-group-tf2818956.html#a7892115
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: Error Duplicate attribute group

Posted by Cezar Andrei <ce...@bea.com>.
There is a -cp switch for this. If a schema is split in two: s1 and s2,
where s1 is stand alone (i.e. doesn't have references to items in s2)
and s2 uses item from s1 by reference so that there will not be multiple
definitions of the same name in the s1 + s2 union, they can be compiled
separately using the classpath for compiled references.

Compile s1 first as usual, and than compile only s2 putting s1.jar on
the classpath.

scomp -out s1.jar s1.xsd
scomp -out s2.jar -cp [path_to]xbeans.jar;s1.jar s2.xsd

In your case you might find it useful to split it in three: base, get,
list, following the same idea.

Cezar


> -----Original Message-----
> From: kris16 [mailto:krister.o.jonsson@tietoenator.com]
> Sent: Thursday, December 14, 2006 6:58 AM
> To: user@xmlbeans.apache.org
> Subject: Re: Error Duplicate attribute group
> 
> 
> Hi again,
> I tried to solve this problem by running the scomp command twice.
> Generating
> two different jar files, one for getitemmaster and one for
listitemmaster,
> and it seems to work.
> The common parts like codelists, currencycode etc. are included in
both
> jarfiles and thats not so nice.
> I noticed that it is possible to use a xsdconfig file and i have
managed
> to
> place GetItemMaster and ListItemMaster in different packages.
> 
> It has to be a better solution then the one i have come up with ?
> Is there a solution to the "Duplicate attribute group" error ?
> /Regards Krister
> 
> 
> 
> 
> 
> kris16 wrote:
> >
> > Hi,
> > im trying to use xmlbeans together with OAGS 9.0 and their XSD
files.
> > It seems to work fine when I generate the java code for one XSD
file,
> > GetItemMaster.xsd.
> >
> > scomp -verbose -src D:\java\src -out itemmaster.jar
> > D:\temp\oagis-release-9_0-XSD-
> GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd
> >
> > When I try to generate java code from more than one XSD file then I
run
> > into trubble.
> > If I add the xsd file "ListItemMaster.xsd" to the command line for
scomp
> > the Java code generation fails.
> > Probably because both XSD files,GetItemMaster.xsd and
> ListItemMaster.xsd,
> > uses the same include files.
> >
> > scomp -verbose -src D:\java\src2 -out itemmaster.jar
> > D:\temp\oagis-release-9_0-XSD-
> GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd
> > D:\temp\oagis-release-9_0-XSD-
> GA\OAGIS\9.0\BODs\Standalone\ListItemMaster.xsd
> >
> > I get the following error when I use:
> > ListItemMaster.xsd:22:9: error: sch-props-correct.2: Duplicate
attribute
> > group:
CodeListAttributeGroup@http://www.openapplications.org/oagis/9
> > (Original attribute group found in file: GetItemMaster.xsd)
> >
> > How can I solve this problem ?
> > Is there a workaround ?
> > /Regards Krister
> >
> 
> --
> View this message in context: http://www.nabble.com/Error-Duplicate-
> attribute-group-tf2818956.html#a7871978
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: Error Duplicate attribute group

Posted by kris16 <kr...@tietoenator.com>.
Hi again,
I tried to solve this problem by running the scomp command twice. Generating
two different jar files, one for getitemmaster and one for listitemmaster,
and it seems to work.
The common parts like codelists, currencycode etc. are included in both
jarfiles and thats not so nice.
I noticed that it is possible to use a xsdconfig file and i have managed to
place GetItemMaster and ListItemMaster in different packages.

It has to be a better solution then the one i have come up with ?
Is there a solution to the "Duplicate attribute group" error ?
/Regards Krister





kris16 wrote:
> 
> Hi,
> im trying to use xmlbeans together with OAGS 9.0 and their XSD files.
> It seems to work fine when I generate the java code for one XSD file,
> GetItemMaster.xsd.
> 
> scomp -verbose -src D:\java\src -out itemmaster.jar
> D:\temp\oagis-release-9_0-XSD-GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd 
> 
> When I try to generate java code from more than one XSD file then I run
> into trubble.
> If I add the xsd file "ListItemMaster.xsd" to the command line for scomp
> the Java code generation fails.
> Probably because both XSD files,GetItemMaster.xsd and ListItemMaster.xsd,
> uses the same include files.
> 
> scomp -verbose -src D:\java\src2 -out itemmaster.jar
> D:\temp\oagis-release-9_0-XSD-GA\OAGIS\9.0\BODs\Standalone\GetItemMaster.xsd
> D:\temp\oagis-release-9_0-XSD-GA\OAGIS\9.0\BODs\Standalone\ListItemMaster.xsd
> 
> I get the following error when I use:
> ListItemMaster.xsd:22:9: error: sch-props-correct.2: Duplicate attribute
> group: CodeListAttributeGroup@http://www.openapplications.org/oagis/9
> (Original attribute group found in file: GetItemMaster.xsd)
> 
> How can I solve this problem ?
> Is there a workaround ?
> /Regards Krister
> 

-- 
View this message in context: http://www.nabble.com/Error-Duplicate-attribute-group-tf2818956.html#a7871978
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org