You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Zebensui Méndez (JIRA)" <ji...@apache.org> on 2012/05/07 09:22:26 UTC

[jira] [Created] (CXF-4291) Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection

Zebensui Méndez created CXF-4291:
------------------------------------

             Summary: Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection
                 Key: CXF-4291
                 URL: https://issues.apache.org/jira/browse/CXF-4291
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS, Tooling
    Affects Versions: 2.6
            Reporter: Zebensui Méndez


With several examples tha includes distinct grammars external schemes, the wadl2java tool fails if no executed "mvn generate-sources" with memory tunning java params. The error message:
 

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.815s
[INFO] Finished at: Mon May 07 08:13:29 BST 2012
[INFO] Final Memory: 5M/27M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:2.6.0:wadl2java (generate-sources) on project cxf_2_6_0_wadl: java.lang.RuntimeException: No XmlSchema in SchemaInfo -> [Help 1]
[ERROR] 


The problem is the class "org.apache.cxf.service.model.SchemaInfo" that uses "org.apache.cxf.service.model.SoftReference". This implies that
the garbage collector resets Namespaces declared in a previous import.


Example:

    <grammars>
        <include href="../sdmx21/SDMXMessage.xsd"/>
    	<include href="SDMXRestTypes.xsd"/>
    </grammars> 

And the SDMXRestTypes.xsd references SDMXMessage.xsd namespaces.



Executed maven task with for example -Xms512M -Xmx1024M is successful.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CXF-4291) Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270444#comment-13270444 ] 

Sergey Beryozkin commented on CXF-4291:
---------------------------------------

I agree. I see SourceGenerator does not initialize XmlSchema reference on SchemaInfo, but only its DOM Element representation.
I'll investigate later on what else can be done...
                
> Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4291
>                 URL: https://issues.apache.org/jira/browse/CXF-4291
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.6
>            Reporter: Zebensui Méndez
>         Attachments: cxf_2_6_0_wadl.zip
>
>
> With several examples tha includes distinct grammars external schemes, the wadl2java tool fails if no executed "mvn generate-sources" with memory tunning java params. The error message:
>  
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8.815s
> [INFO] Finished at: Mon May 07 08:13:29 BST 2012
> [INFO] Final Memory: 5M/27M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:2.6.0:wadl2java (generate-sources) on project cxf_2_6_0_wadl: java.lang.RuntimeException: No XmlSchema in SchemaInfo -> [Help 1]
> [ERROR] 
> The problem is the class "org.apache.cxf.service.model.SchemaInfo" that uses "org.apache.cxf.service.model.SoftReference". This implies that
> the garbage collector resets Namespaces declared in a previous import.
> Example:
>     <grammars>
>         <include href="../sdmx21/SDMXMessage.xsd"/>
>     	<include href="SDMXRestTypes.xsd"/>
>     </grammars> 
> And the SDMXRestTypes.xsd references SDMXMessage.xsd namespaces.
> Executed maven task with for example -Xms512M -Xmx1024M is successful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CXF-4291) Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection

Posted by "Zebensui Méndez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zebensui Méndez updated CXF-4291:
---------------------------------

    Attachment: cxf_2_6_0_wadl.zip

Example project with bug
                
> Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4291
>                 URL: https://issues.apache.org/jira/browse/CXF-4291
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.6
>            Reporter: Zebensui Méndez
>         Attachments: cxf_2_6_0_wadl.zip
>
>
> With several examples tha includes distinct grammars external schemes, the wadl2java tool fails if no executed "mvn generate-sources" with memory tunning java params. The error message:
>  
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8.815s
> [INFO] Finished at: Mon May 07 08:13:29 BST 2012
> [INFO] Final Memory: 5M/27M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:2.6.0:wadl2java (generate-sources) on project cxf_2_6_0_wadl: java.lang.RuntimeException: No XmlSchema in SchemaInfo -> [Help 1]
> [ERROR] 
> The problem is the class "org.apache.cxf.service.model.SchemaInfo" that uses "org.apache.cxf.service.model.SoftReference". This implies that
> the garbage collector resets Namespaces declared in a previous import.
> Example:
>     <grammars>
>         <include href="../sdmx21/SDMXMessage.xsd"/>
>     	<include href="SDMXRestTypes.xsd"/>
>     </grammars> 
> And the SDMXRestTypes.xsd references SDMXMessage.xsd namespaces.
> Executed maven task with for example -Xms512M -Xmx1024M is successful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CXF-4291) Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection

Posted by "Zebensui Méndez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270285#comment-13270285 ] 

Zebensui Méndez commented on CXF-4291:
--------------------------------------

Is a quickly solution, i don't know if is a good resolution. The problem is the error message: "java.lang.RuntimeException: No XmlSchema in SchemaInfo", it not leads to the obvious solution to increase the heap space.But reading the doc is a good solution.

Thank you.
                
> Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4291
>                 URL: https://issues.apache.org/jira/browse/CXF-4291
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.6
>            Reporter: Zebensui Méndez
>         Attachments: cxf_2_6_0_wadl.zip
>
>
> With several examples tha includes distinct grammars external schemes, the wadl2java tool fails if no executed "mvn generate-sources" with memory tunning java params. The error message:
>  
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8.815s
> [INFO] Finished at: Mon May 07 08:13:29 BST 2012
> [INFO] Final Memory: 5M/27M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:2.6.0:wadl2java (generate-sources) on project cxf_2_6_0_wadl: java.lang.RuntimeException: No XmlSchema in SchemaInfo -> [Help 1]
> [ERROR] 
> The problem is the class "org.apache.cxf.service.model.SchemaInfo" that uses "org.apache.cxf.service.model.SoftReference". This implies that
> the garbage collector resets Namespaces declared in a previous import.
> Example:
>     <grammars>
>         <include href="../sdmx21/SDMXMessage.xsd"/>
>     	<include href="SDMXRestTypes.xsd"/>
>     </grammars> 
> And the SDMXRestTypes.xsd references SDMXMessage.xsd namespaces.
> Executed maven task with for example -Xms512M -Xmx1024M is successful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (CXF-4291) Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-4291.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.4
                   2.6.1
         Assignee: Sergey Beryozkin

Hi, I can not reproduce an actual issue on my laptop, presumably due to it having enough memory for the schema compilation to succeed.

However, I updated the generator to attempt to prevent such issues,
http://svn.apache.org/viewvc?rev=1343210&view=rev

Please try with the snapshots or the soon to be released CXF 2.5.4 or 2.6.1, thanks
                
> Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4291
>                 URL: https://issues.apache.org/jira/browse/CXF-4291
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.6
>            Reporter: Zebensui Méndez
>            Assignee: Sergey Beryozkin
>             Fix For: 2.6.1, 2.5.4
>
>         Attachments: cxf_2_6_0_wadl.zip
>
>
> With several examples tha includes distinct grammars external schemes, the wadl2java tool fails if no executed "mvn generate-sources" with memory tunning java params. The error message:
>  
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8.815s
> [INFO] Finished at: Mon May 07 08:13:29 BST 2012
> [INFO] Final Memory: 5M/27M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:2.6.0:wadl2java (generate-sources) on project cxf_2_6_0_wadl: java.lang.RuntimeException: No XmlSchema in SchemaInfo -> [Help 1]
> [ERROR] 
> The problem is the class "org.apache.cxf.service.model.SchemaInfo" that uses "org.apache.cxf.service.model.SoftReference". This implies that
> the garbage collector resets Namespaces declared in a previous import.
> Example:
>     <grammars>
>         <include href="../sdmx21/SDMXMessage.xsd"/>
>     	<include href="SDMXRestTypes.xsd"/>
>     </grammars> 
> And the SDMXRestTypes.xsd references SDMXMessage.xsd namespaces.
> Executed maven task with for example -Xms512M -Xmx1024M is successful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CXF-4291) Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269728#comment-13269728 ] 

Sergey Beryozkin commented on CXF-4291:
---------------------------------------

I've added the following hint to the WADL-first section:
"Note that the minimum and maximum memory limits may need to be increased when using the plugin to process large WADL documents, for example, add '-Xms512M -Xmx1024M' to the list of Maven options."

IMHO this would be a good resolution to this issue ?
                
> Wadl2java tool executing by cxf-wadl2java-plugin fails if run without tuning JAVA Garbage Collection
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4291
>                 URL: https://issues.apache.org/jira/browse/CXF-4291
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.6
>            Reporter: Zebensui Méndez
>         Attachments: cxf_2_6_0_wadl.zip
>
>
> With several examples tha includes distinct grammars external schemes, the wadl2java tool fails if no executed "mvn generate-sources" with memory tunning java params. The error message:
>  
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8.815s
> [INFO] Finished at: Mon May 07 08:13:29 BST 2012
> [INFO] Final Memory: 5M/27M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:2.6.0:wadl2java (generate-sources) on project cxf_2_6_0_wadl: java.lang.RuntimeException: No XmlSchema in SchemaInfo -> [Help 1]
> [ERROR] 
> The problem is the class "org.apache.cxf.service.model.SchemaInfo" that uses "org.apache.cxf.service.model.SoftReference". This implies that
> the garbage collector resets Namespaces declared in a previous import.
> Example:
>     <grammars>
>         <include href="../sdmx21/SDMXMessage.xsd"/>
>     	<include href="SDMXRestTypes.xsd"/>
>     </grammars> 
> And the SDMXRestTypes.xsd references SDMXMessage.xsd namespaces.
> Executed maven task with for example -Xms512M -Xmx1024M is successful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira