You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/01/19 21:44:22 UTC

DO NOT REPLY [Bug 33168] New: - [Betwixt] release 0.6 can't generate XML schema for cyclic bean.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33168

           Summary: [Betwixt] release 0.6 can't generate XML schema for
                    cyclic bean.
           Product: Commons
           Version: unspecified
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Betwixt
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: xialiu@auto-trol.com


I am trying to write xml schema for a cyclic Bean(A include B, B  
include A).

 The Bean definition used LoopBean.java in the example:

 public class LoopBean
 {
    private static int count = 0;
    private static final int max_count = 100;

    private LoopBean friend;

    private String name;
   .........................

 }


 The code to generate the XML Schema for this Bean: (from the example)

      SchemaTranscriber transcriber = new SchemaTranscriber();

 transcriber.getXMLIntrospector().getConfiguration().setElementNameMapper(
                          new HyphenatedNameMapper());

 transcriber.getXMLIntrospector().getConfiguration().setAttributeNameMapper
                          (new HyphenatedNameMapper());

 transcriber.getXMLIntrospector().getConfiguration().setAttributesForPrimitives 
                          (false);

 transcriber.getXMLIntrospector().getConfiguration().setWrapCollectionsInElement
(false);
     //transcriber.getXMLIntrospector().setMapIDs(true);

       System.out.println("before generate schema:");
       Schema schema = transcriber.generate(LoopBean.class);

    .........................


 A StackOverflowException was caught when executing the:
 transcriber.generate(LoopBean.class).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org