Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1 M1
-
Fix Version/s: 1.3.4
-
Component/s: XML code generator
-
Labels:None
-
Environment:suse 10.1
eclipse 3.2
java 1.5
-
Number of attachments :6
Description
With the resolution of CASTOR-1659 new compile errors are being generated from the attached xsd files.
I checked out the latest from the svn this morning.
I am still working on the same set of xsd files as in CASTOR-1710 and CASTOR-1717.
There seems to be missing a types attribute and a large number of casting exceptions generally around the class TEXTTYPE.
These two must be generated together or a large number of errors are created from missing class definitions.
The full generation of the entire schema throws 741 compile errors but the sample of errors generated from these two xsd files shows most of the errors.
Sorry guys, I don't really have a good idea on whats going on with this set of errors.
Thanks
Quince
-
- jxdm.xsd
- 11/Dec/06 11:14 AM
- 2.69 MB
- Quince D. Wilson
-
Hide
- jxdm-3.0.3.zip
- 11/Dec/06 1:09 PM
- 647 kB
- Quince D. Wilson
-
- jxdm/3.0.3/jxdm.xsd 2.69 MB
- jxdm/3.0.3/proxy/.../1.0.1/ansi_d20.xsd 24 kB
- jxdm/3.0.3/proxy/cap/1.0.1/cap.xsd 4 kB
- jxdm/3.0.3/proxy/census/1.0/census.xsd 2 kB
- jxdm/3.0.3/proxy/.../1.0/dod_exec-12958.xsd 2 kB
- jxdm/3.0.3/.../1.0/dod_jcs-pub2.0-misc.xsd 2 kB
- jxdm/3.0.3/proxy/.../1.0/dod_misc.xsd 2 kB
- jxdm/3.0.3/proxy/.../1.0/fips_10-4.xsd 3 kB
- jxdm/3.0.3/proxy/.../1.0/fips_5-2.xsd 3 kB
- jxdm/3.0.3/proxy/.../1.0/fips_6-4.xsd 2 kB
- jxdm/3.0.3/proxy/.../1.0/iso_3166.xsd 3 kB
- jxdm/3.0.3/proxy/.../1.0/iso_4217.xsd 2 kB
- jxdm/3.0.3/proxy/.../1.0/iso_639-2b.xsd 2 kB
- jxdm/3.0.3/proxy/.../1.0/iso_639-2t.xsd 2 kB
- jxdm/3.0.3/proxy/lasd/1.0/lasd.xsd 2 kB
- jxdm/3.0.3/proxy/.../1.0/mn_offense.xsd 3 kB
- jxdm/3.0.3/proxy/.../1.0.2/ncic_2000.xsd 33 kB
- jxdm/3.0.3/proxy/.../1.0.1/nibrs_misc.xsd 15 kB
- jxdm/3.0.3/.../1.0/nonauthoritative-code.xsd 3 kB
- jxdm/3.0.3/proxy/.../1.0/post-canada.xsd 2 kB
- jxdm/3.0.3/proxy/ucr/1.0/ucr.xsd 2 kB
- jxdm/3.0.3/.../1.0/unece_rec20-misc.xsd 4 kB
- jxdm/3.0.3/proxy/.../1.0/usps_states.xsd 2 kB
- jxdm/3.0.3/.../ut_offender-tracking-misc.xsd 5 kB
- jxdm/3.0.3/proxy/xsd/1.0/xsd.xsd 9 kB
- jxdm/ansi_d20/1.0.1/ansi_d20.xsd 163 kB
- jxdm/appinfo/1/appinfo.xsd 0.9 kB
- jxdm/cap/1.0.1/cap.xsd 9 kB
- jxdm/census/1.0/census.xsd 104 kB
- jxdm/dod_exec-12958/.../dod_exec-12958.xsd 4 kB
-
- patch_C1729_20070306.txt
- 06/Mar/07 2:46 PM
- 5 kB
- Steven Dolg
-
- TestGen1.java
- 12/Dec/06 7:37 AM
- 7 kB
- Quince D. Wilson
-
Hide
- xml.zip
- 06/Mar/07 2:52 PM
- 659 kB
- Steven Dolg
-
- xml/c1729/GenerateTestCase.java 0.5 kB
- xml/c1729/jxdm/3.0.3/jxdm.xsd 2.69 MB
- xml/c1729/jxdm/.../1.0.1/ansi_d20.xsd 24 kB
- xml/c1729/jxdm/3.0.3/.../cap/1.0.1/cap.xsd 4 kB
- xml/c1729/jxdm/.../census/1.0/census.xsd 2 kB
- xml/c1729/jxdm/.../1.0/dod_exec-12958.xsd 2 kB
- xml/c1729/.../1.0/dod_jcs-pub2.0-misc.xsd 2 kB
- xml/c1729/jxdm/.../dod_misc/1.0/dod_misc.xsd 2 kB
- xml/c1729/jxdm/.../1.0/fips_10-4.xsd 3 kB
- xml/c1729/jxdm/.../fips_5-2/1.0/fips_5-2.xsd 3 kB
- xml/c1729/jxdm/.../fips_6-4/1.0/fips_6-4.xsd 2 kB
- xml/c1729/jxdm/.../iso_3166/1.0/iso_3166.xsd 3 kB
- xml/c1729/jxdm/.../iso_4217/1.0/iso_4217.xsd 2 kB
- xml/c1729/jxdm/.../1.0/iso_639-2b.xsd 2 kB
- xml/c1729/jxdm/.../1.0/iso_639-2t.xsd 2 kB
- xml/c1729/jxdm/3.0.3/.../lasd/1.0/lasd.xsd 2 kB
- xml/c1729/jxdm/.../1.0/mn_offense.xsd 3 kB
- xml/c1729/jxdm/.../1.0.2/ncic_2000.xsd 33 kB
- xml/c1729/jxdm/.../1.0.1/nibrs_misc.xsd 15 kB
- xml/c1729/.../1.0/nonauthoritative-code.xsd 3 kB
- xml/c1729/jxdm/.../1.0/post-canada.xsd 2 kB
- xml/c1729/jxdm/3.0.3/.../ucr/1.0/ucr.xsd 2 kB
- xml/c1729/jxdm/.../1.0/unece_rec20-misc.xsd 4 kB
- xml/c1729/jxdm/.../1.0/usps_states.xsd 2 kB
- xml/c1729/.../ut_offender-tracking-misc.xsd 5 kB
- xml/c1729/jxdm/3.0.3/.../xsd/1.0/xsd.xsd 9 kB
- xml/c1729/jxdm/.../1.0.1/ansi_d20.xsd 163 kB
- xml/c1729/jxdm/appinfo/1/appinfo.xsd 0.9 kB
- xml/c1729/jxdm/cap/1.0.1/cap.xsd 9 kB
- xml/c1729/jxdm/census/1.0/census.xsd 104 kB
-
- xsd.xsd
- 11/Dec/06 11:14 AM
- 9 kB
- Quince D. Wilson
Activity
Werner,
Back on version 1.0.2 the only problem was CASTOR-1710 - static initializer. When I moved up to 1.0.5 I was getting CASTOR-1659.
So I guess the direct answer is I have not been able to get this far. I think CASTOR-1659 was stopping these from appearing. These errors are more in line with CASTOR-1717 but that is only a guess.
Thanks
Quince
Okay, I'll have a look later on today. In general, it would be great if you could isolate a problem and provide me with a trimmed down XML schema, as debugging/analysing such big schemas never is easy ....
Let me just repeat that: the jxdm schema has way too many dependencies to be used in a meaningful way, and I don't want to be responsible to building an environment where I can run the source generator successfully. Can you please either trim down the XML schema(s) involved, or present me with a complete set of files where all dependencies are resolved ? Thanks in advance ...
Werner,
Attached is a complete set of xsd files.
Also, when I created CASTOR-1710 I attached and eclipse environment with the complete set of files and with a TestGen1 class for generating all the necessary classes.
I have tried to trim it down to a better test case but ran into to may dependancy issues. Using the two attached xsd files with the case does not cause any dependancy issues that I could see, only the compile issues. These two files create by themselves, all the errors. Eclipse does not want to show me all the errors even though I have increased the max number for the project and the workspace but the number of errors match exactly.
Thanks
Quince
It's funny, Eclipse crashes on me however much memory I assign to it .. ;-(.
That class TestGen1 is not attached any more to CASTOR-1710 (as I might have deleted it). Anyhow, when you generate the sources, are you setting setGenerateImportedSchemas() to true ?
Okay, some random observations (from the limited set of generated classes, before my JVM dies):
Class: VictimOffenseChargeText.java
has
public static xml.c1729.generated.TextType unmarshal(java.io.Reader reader)
extends: TextType.java
has:
public static xml.c1729.generated.TextType unmarshal(java.io.Reader reader)
extends: String.java (not java.util.String)
has:
public static xml.c1729.generated.String unmarshal(java.io.Reader reader)
Apparently, that's wrong, as both VictimOffenseChargeText.unmarshal() and TextType.unmarshal() should return xml.c1729.generated.String, and not xml.c1729.generated.TextType.
Werner,
Attached is the TestGen1 class I have been using. This should answer your questions. Let me know if I should add the parameter you mentioned.
Also, I was having the same problem with eclipse crashing, come to find out, I had some bad memory modules. I had to let the memory test run all night before it would identify a problem, of course by that time I had reformatted my drives and everything else.
Thanks
Quince
The problem with the wrong method signature is a result of generating the schemas individually.
That way the inheritance across multiple schemas is not generated correctly.
This can be corrected by using the "-generateImportedSchemas" option and only calling the SourceGenerator for the top schema (in this case "jxdm/3.0.3/jxdm.xsd").
However currently this will result in some other problems:
- Inheritance is still broken
- Package names are not used correctly.
I attached a patch that fixes both problems.
This is a test case that uses the Source Generator in the way described above.
On my machine this succesfully generates compileable code. (Although there are 6 name conflicts).
WARNING: If you execute this test case the Source Generator will create more than 10,000 files.
This is likely going to take 5 minutes or more and use approximately 500MB of RAM.
When compile this with Eclipse (and probably with other IDEs as well) this is going to take very long.
Also your disk is going to be stressed enormously. (I used a RAM disk to speed up things...)
Steven, would it be possible for you to come up with a minimal test case that we could integrate into the CTF suite ?
Quince, are these new compilation errors a result of fixing
CASTOR-1659, or have you never been able to get this far ?