facebook

‘Generate XML Schema’ has encountered a problem…

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #350701 Reply

    Steve
    Participant

    I received the following error when attempting to ‘Generate XML schema’ from a UML1 model. An internal error occurred during: “Generate XML Schema”.
    com.genuitec.eclipse.uml.uml2xml.xsom.DelayedReferenceContentType cannot be cast to com.sun.xml.xsom.impl.Ref$SimpleType

    What you should know is that the ‘Generate XML Schema’ function worked perfectly until I made a single change. I repointed a generalization for a simpleType definition from xs:string to xs:integer. It is the first time anything in my model is utilizing xs:integer. With just that single change, the generate function failed.

    The attached screenshot may provide more context. When the arrow pointed from ByteSize7_Type to string, the Generate XML Schema feature worked. When the arrow was changed to point to integer instead, as this screenshot shows, the error occurred.

    Do you have any insight into this error?

    Installation details:
    *** Date:
    Tuesday, July 29, 2014 8:44:37 PM PDT

    *** System properties:
    OS=Windows7
    OS version=6.1.0
    OS arch=x86
    Profile arch=x86
    Window system=win32
    Java version=1.6.0_43
    Workspace=file:/C:/Users/sedward/Workspaces/MyEclipse Professional/
    VM Args=-Xmx512m
    -XX:MaxPermSize=256m
    -XX:ReservedCodeCacheSize=64m
    -Dosgi.nls.warnings=ignore
    -Djava.class.path=C:\Users\sedward\AppData\Local\MYECLI~1\plugins/OR47CC~1.JAR

    *** Subscription information
    Product Id: E3MP (MyEclipse Professional Subscription)
    License version: 3.0
    Full Maintenance Included
    Subscription expiration date (YYYYMMDD): 20151111
    Number of users: 1

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 2013
    Build id: 11.0-20130401

    Blueprint: N/A

    com.genuitec.eclipse.mobile.feature – 11.0.0.201304021118
    com.genuitec.myeclipse.database – 11.0.0.me201303311935
    com.genuitec.myeclipse.desktop – 11.0.0.me201303311935
    com.genuitec.myeclipse.enterprise.workbench – 11.0.0.me201303311935
    com.genuitec.myeclipse.geronimo – 11.0.0.me201303311935
    com.genuitec.myeclipse.glassfish – 11.0.0.me201303311935
    com.genuitec.myeclipse.icefaces.feature – 11.0.0.me201303311935
    com.genuitec.myeclipse.imageeditor – 11.0.0.me201303311935
    com.genuitec.myeclipse.jboss – 11.0.0.me201303311935
    com.genuitec.myeclipse.jetty – 11.0.0.me201303311935
    com.genuitec.myeclipse.jonas – 11.0.0.me201303311935
    com.genuitec.myeclipse.jrun – 11.0.0.me201303311935
    com.genuitec.myeclipse.jsf – 11.0.0.me201303311935
    com.genuitec.myeclipse.maven – 11.0.0.me201303311935
    com.genuitec.myeclipse.oracle – 11.0.0.me201303311935
    com.genuitec.myeclipse.orion – 11.0.0.me201303311935
    com.genuitec.myeclipse.persistence – 11.0.0.me201303311935
    com.genuitec.myeclipse.reports – 11.0.0.me201303311935
    com.genuitec.myeclipse.resin – 11.0.0.me201303311935
    com.genuitec.myeclipse.struts – 11.0.0.me201303311935
    com.genuitec.myeclipse.sun – 11.0.0.me201303311935
    com.genuitec.myeclipse.tomcat – 11.0.0.me201303311935
    com.genuitec.myeclipse.uml2 – 11.0.0.me201303311935
    com.genuitec.myeclipse.visualvm – 11.0.0.me201303311935
    com.genuitec.myeclipse.visualvm.server – 11.0.0.me201303311935
    com.genuitec.myeclipse.weblogic – 11.0.0.me201303311935
    com.genuitec.myeclipse.websphere – 11.0.0.me201303311935
    com.genuitec.myeclipse.ws – 11.0.0.me201303311935
    org.eclipse.birt – 4.2.1.me201303311935
    org.eclipse.datatools.connectivity.feature – 1.10.1.me201303311935
    org.eclipse.datatools.enablement.feature – 1.10.1.me201303311935
    org.eclipse.datatools.modelbase.feature – 1.10.1.v201208161415-7707FCcNBHLCgLUEdUb
    org.eclipse.datatools.sqldevtools.feature – 1.10.1.me201303311935
    org.eclipse.emf – 2.8.1.v20120917-0436
    org.eclipse.gef – 3.8.1.201208200205
    org.eclipse.graphiti.feature – 0.9.0.v20120613-0805
    org.eclipse.jpt.jpa.feature – 3.2.1.me201303311935
    org.eclipse.jpt.jpadiagrameditor.feature – 1.1.1.me201303311935
    org.eclipse.jst.common.fproj.enablement.jdt – 3.4.0.me201303311935
    org.eclipse.jst.enterprise_ui.feature – 3.4.0.me201303311935
    org.eclipse.jst.server_adapters.ext.feature – 3.3.101.me201303311935
    org.eclipse.jst.server_adapters.feature – 3.2.200.me201303311935
    org.eclipse.jst.server_ui.feature – 3.4.0.me201303311935
    org.eclipse.jst.ws.axis2tools.feature – 1.1.200.me201303311935
    org.eclipse.m2e.feature – 1.2.0.me201303311935
    org.eclipse.sapphire.platform – 0.3.0.201106221325
    org.eclipse.wst.common.fproj – 3.4.0.me201303311935
    org.eclipse.wst.server_adapters.feature – 3.2.201.me201303311935
    org.eclipse.xsd – 2.8.0.v20120917-0436
    org.springframework.ide.eclipse.feature – 2.9.1.me201303311935

    com.serena.eclipse.dimensions – 3.0.8.100301-02
    fr.obeo.acceleo.bridge.feature – 2.6.0.200906261742
    org.eclipse.cvs – 1.3.201.v20130116-085741-7B79FJKAkF7BG7NGE4IAJT
    org.eclipse.draw2d – 3.8.1.201208200205
    org.eclipse.epp.mpc – 1.1.1.I20110907-0947
    org.eclipse.equinox.p2.core.feature – 1.1.0.v20121211-153934-8297FndFWmE7h7Bpz-vcqkxyKz0
    org.eclipse.equinox.p2.discovery.feature – 1.0.100.v20120524-0542-4-Bh9oB58B5W8E28KKNEK
    org.eclipse.equinox.p2.extras.feature – 1.1.0.v20121211-153934-7A6FEcDiVOTg2RYDuZuFz-L2z00w
    org.eclipse.equinox.p2.rcp.feature – 1.1.0.v20121211-153934-785EoBqNKNZz-DW7sUc8hFwz00wd
    org.eclipse.equinox.p2.user.ui – 2.2.0.v20121212-204731-62DG9JXTlTj-UXcQ2y3NLn6U4Z3H
    org.eclipse.help – 1.4.1.v20120912-145617-8R7xFOXFLWUl7PpMEeZNIGkb4
    org.eclipse.jdt – 3.8.2.v20130116-090414-8-8nFu3FNOfwKLRttdWQJ-2z-_83
    org.eclipse.jsf.feature – 3.4.1.me201303311935
    org.eclipse.ocl – 3.1.0.v20110606-1427
    org.eclipse.pde – 3.8.2.v20130116-091538-7c7wFj0FFt6Zr9bc77L7JFNNa
    org.eclipse.platform – 3.8.1.v20130118-180812-9jF7oIBFG8eU2pim-VbIlTuQjY0RWWK3x-bv4I
    org.eclipse.rcp – 3.8.2.v20130118-180157-96BuGOZFxwOAeG8Ofmqicz0tPK
    org.eclipse.wb.core.feature – 1.5.0.r38x201206111201
    org.eclipse.wb.core.ui.feature – 1.5.0.r38x201206111213
    org.eclipse.wb.core.xml.feature – 1.5.0.r38x201206111216
    org.eclipse.wb.doc.user.feature – 1.5.0.r38x201206111211
    org.eclipse.wb.layout.group.feature – 1.5.0.r38x201206111249
    org.eclipse.wb.rcp.SWT_AWT_support – 1.5.0.r38x201206111333
    org.eclipse.wb.rcp.doc.user.feature – 1.5.0.r38x201206111236
    org.eclipse.wb.rcp.feature – 1.5.0.r38x201206111317
    org.eclipse.wb.swing.doc.user.feature – 1.5.0.r38x201206111240
    org.eclipse.wb.swing.feature – 1.5.0.r38x201206111310
    org.eclipse.wb.swt.feature – 1.5.0.r38x201206111304
    org.eclipse.wb.xwt.feature – 1.5.0.r38x201206111323
    org.sonatype.m2e.mavenarchiver.feature – 0.15.0.201207090125

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Users\sedward\AppData\Local\MyEclipse Professional\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    C:\Users\sedward\AppData\Local\MyEclipse Professional\plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_3.2.0.v201103301700\eclipse_3215.dll
    -startup
    C:\Users\sedward\AppData\Local\MyEclipse Professional\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
    -install
    C:\Users\sedward\AppData\Local\MyEclipse Professional
    -vm
    C:\Users\sedward\AppData\Local\MyEclipse Professional\binary/com.sun.java.jdk.win32.x86_1.6.0.u43/jre/bin/client/jvm.dll

    Attachments:
    You must be logged in to view attached files.
    #350706 Reply

    QWest-8,

    Can you please attach your UML model file (.umr) to try to replicate the issue at our end ? Also please attach the full stack trace of the error ?

    As an alternative, I suggest you to try the UML2 tools which is significantly more recent than the UML1 tooling. You can also convert your existing UML1 models to UML2 models by right clicking on the UML1 file and selecting MyEclipse > Genereate UML2 model from UML1.

    #350710 Reply

    Steve
    Participant

    Attached is the .umr file you requested.

    The .umr file is currently configured where the ‘Generate XML Schema’ function will WORK.

    To replicate my issue:
    * Open the .umr file.
    * From a Diagram-Centric view, make sure you are looking at Class Diagram 1. (It should be the default diagram you see when you open the .umr file.)
    * From Class Diagram 1, notice that the ByteSize7_Type currently has an arrow (anon Generalization) from ByteSize7_Type to string.
    * If you do not make any changes to the diagram, you can select UML from the menu, select ‘Generate XML Schema’ from the dropdown, provide a folder for the resulting XSD files, and you will see that the schema generation WORKS PROPERLY.

    Now, go back to Class Diagram 1 and make the following change.
    * Delete the arrow (anon Generalization) from ByteSize7_Type to string.
    * Draw a ‘New Generalization’ arrow from ByteSize7_Type to integer instead.
    * Save this update to the .umr file.
    * Now try to generate the schemas. You can select UML from the menu, select ‘Generate XML Schema’ from the dropdown, provide a folder for the resulting XSD files, and you will see that the schema generation will FAIL. (Even though the ONLY change was to modify the ‘restriction’ on that type from string to integer.)

    At this time, I am unable to convert this model from UML1 to UML2. They represent industry standards, and such a conversion needs to be negotiated amongst multiple committee members before undergoing such a change. Thus, I really need the UML1 model to properly generate XSD schema regardless of whether I have type definitions with xs:restriction using string or integer or any of the other standard data types used for schema definition. Reminder, this is the first time any type in our schema needed to use a data type other than string. Schema generation has always worked when using string. But it seems to fail when using any other data type. (Integer just happens to be the current test case.)

    Note: If you need me to provide a second .umr file, configured in a Failure State that matches the changes I suggest you test above, let me know.

    Note: I do not know how to provide the stack trace you are asking for. I only see a popup with this message: ‘An internal error occurred during: “Generate XML Schema”.
    com.genuitec.eclipse.uml.uml2xml.xsom.DelayedReferenceContentType cannot be cast to com.sun.xml.xsom.impl.Ref$SimpleType’ If you are unable to replicate the behavior using the instructions above, please let me know how I can obtain the stack trace information you desire.

    #350728 Reply

    Steve,

    Thanks for the details provided.

    Sorry that you are seeing this issue. We could replicate the issue with the uml file provided and have raised a bug report for it.

    As a workaround, can you please change the class names from ‘integer’ to ‘Integer’ and ‘string’ to ‘String’ and then try generating the XML schema ?

    Let us know how it works for you.

    #350741 Reply

    Steve
    Participant

    Hi Pradeep.

    I changed the name from integer to Integer, and the XML Schema Generation no longer produced an error, and ran to completion.

    HOWEVER, it did not generate the proper XSD datatype in the resulting output.

    Rather than producing:
    <xs:restriction base=”xs:integer”>
    </xs:restriction>

    It produced:
    <xs:restriction base=”xs:int”>
    </xs:restriction>

    These are not the same. For schema definition, xs:int represents a signed 32-bit integer, while xs:integer represents an integer of unbounded value. See the ‘Numeric Data Types’ table here for reference: http://www.w3schools.com/schema/schema_dtypes_numeric.asp
    I need xs:integer for my schema.

    But, based on your suggestion, I have begun to assume that MyEclipse might be generating the schema in this way (incorrectly) because of your “focus” on JAVA, rather than SCHEMA. For example, XJC (Java) generates Integer for xs:int and BigInteger for xs:integer.

    So I tried a different workaround, and renamed the valid XSD datatype “integer” to the invalid XSD datatype (but valid JAVA datatype) of “BigInteger”. Doing so and then using MyEclipse to generate the schema worked, and produced the xs:integer restriction I needed.

    So, it looks like, as a workaround, I actually have to rename my integer class to BigInteger within my XMLSchemaDatatypes package to force MyEclipse Schema Generation to actually generate a valid XSD integer datatype. As you might surmise, this would be totally NOT INTUITIVE for schema developers, since there is no such thing as BigInteger in the list of XSD Numeric Datatypes.

    So, please issue a bug report and please make correcting this a high priority item. And, when submitting the bug report, please do not limit the bug to just my integer datatype example. This problem is happening with ALL valid XSD datatypes except string and boolean. I suspect all of your other datatypes are expecting JAVA datatype names (which is why string and boolean work) to generate SCHEMA datatype names. Perhaps the UML tool needs to consider both valid JAVA datatype names and valid XSD datatype names.

    For example, if I want to generate the valid XSD Numeric Types of <xs:negativeInteger> or <xs:nonNegativeInteger> or <xs:positiveInteger> or <xs:nonPositiveInteger> what workaround names do I need to use in MyEclipse until this bug is resolved? Simply changing the case sensitivity of the valid XSD numeric datatype names above is not always working. (For example neither the valid XSD datatype of nonNegativeInteger nor using NonNegativeInteger, works. Those still get exceptions during the schema generation process.) I suspect I need to know how each of your JAVA datatype names resolves to these kinds of schema datatype names in order to implement this workaround until MyEclipse can fix the bug. (And please make sure the bug is corrected in both UML1 and UML2 modeling approaches.)

    So please, could you reply with a cross-reference list of all the names MyEclipse uses and how they will currently translate to XSD schema names? For example:

    Java Name –> XSD Name
    string –> xs:string
    boolean –> xs:boolean
    Integer –> xs:int
    BigInteger –> xs:integer
    ???? –> xs:nonNegativeInteger
    ???? –> xs:negativeInteger
    ???? –> xs:positiveInteger
    ???? –> xs:nonPositiveInteger
    ???? –> xs:dateTime
    …and so on and so on and so on…

    That will at least allow our committee work to proceed with a workaround, until the bug can be fixed.

    Thanks for your investigation so far and for your reply, as it was your comment that made me realize you might be expecting JAVA datatype naming conventions for generating schemas, rather than valid XSD datatype naming conventions.

    Our industry standards committee is looking forward to the bug fix and an ETA on when that might be ready.

    Thanks again!

    #350761 Reply

    Steve,

    I have escalated this to our dev team member and they will get back to you soon.
    Sorry for the inconvenience caused.

    #350804 Reply

    Brian Fernandes
    Moderator

    Steve,

    1) I went through the UML1 code and found the following mapping information from base type to schema type.

    Date    date
    dateTime    dateTime
    String    string
    string    string
    Boolean    boolean
    boolean    boolean
    BigDecimal    decimal
    BigInteger    integer
    Byte    byte
    byte    byte
    Char    string
    char    string
    Double    double
    double    double
    Float    float
    float    float
    Integer    int
    int    int
    Long    long
    long    long
    Short    short
    short    short
    anyType    anyType
    

    This schema type is then used to look up the the corresponding xs type which you can find in the attached datatypes schema file.

    2) We will also take a look at state of this issue in UML 2, if a problem exists, we will fix it there.

    3) Unfortunately we cannot fix the problem in UML 1, given its legacy status and the fact that it is superseded by the UML 2 tooling. I have emailed Steve Edwards from CenturyLink on this subject (you?) but have not heard back.

    Attachments:
    You must be logged in to view attached files.
    #351028 Reply

    Steve
    Participant

    Hi Brian,

    No, I never received any emails, not even one stating that this topic was updated by you…(strange). Anyway, I happened to check today on this forum to see if there had been any updates and found your posting.

    Thanks for the list. That indeed helps. But it also implies that MyEclipse currently has no support for generating some of the additional valid XSD numeric types like:
    xs:nonNegativeInteger , xs:negativeInteger, xs:positiveInteger, xs:nonPositiveInteger

    I was not aware that the UML2 tooling superseded the UML1 tooling. (I know that UML2 supersedes UML1, but did not translate that into the elimination/deprecation/no future support for UML1.)

    I had hoped that support for both would remain, as I have experienced some groups simply staying on UML1 as it met their needs. Does Genuitec have any kind of documentation/help/tutorials, etc. that would help describe the processes/steps for migrating a UML1 model to a UML2 model, while RETAINING all of the diagrams and artifacts currently available to me in my existing *.umr file? Documentation on using the UML modeling tool in general has been really sparse, so I am hoping that perhaps you have more information available (support/features/how to guides) regarding the nuances of Genuitec’s UML2 tooling that I could peruse? Transitioning from UML1 to UML2 would require assurances that the transition did not lose anything, and that everyone knows how to maintain their old models in the new paradigm.

    Thanks!

    #351294 Reply

    Steve
    Participant

    Still awaiting a reply to my previous posting on August 19th.

    Thanks!

    #351378 Reply

    Brian Fernandes
    Moderator

    Steve,

    Apologies, I though I had answered but it was only a mental note. I will send you the email I had earlier sent via PM.

    I was not aware that the UML2 tooling superseded the UML1 tooling. (I know that UML2 supersedes UML1, but did not translate that into the elimination/deprecation/no future support for UML1.) I had hoped that support for both would remain, as I have experienced some groups simply staying on UML1 as it met their needs.

    Agreed, this was implied and hasn’t been made clear. Most of our users interact with us on UML2 related issues and we’ll make the deprecation more clear going forward. As far as modifying the UML1 tooling, we are very hesitant to make changes in code that hasn’t seen any changes in several years. Especially in the generation department, changing the code that is generated suddenly (even if it may correct an issue) could be disruptive when that’s what users are used to using – of course, this only applies when the tooling is deprecated

    Transitioning from UML1 to UML2 would require assurances that the transition did not lose anything, and that everyone knows how to maintain their old models in the new paradigm

    We do not currently have any documentation other than what is publicly visible already, I assume most of the UML2 tooling is self explanatory. Still, I admit we have not created documentation guiding users on the path to UML2 from UML1 and how these projects can be converted, ensuring that no information is lost. I’ll follow up further on email / PM for your particular case.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: ‘Generate XML Schema’ has encountered a problem…

You must be logged in to post in the forum log in