You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Bruno Borges (JIRA)" <ji...@apache.org> on 2011/08/11 20:30:28 UTC

[jira] [Created] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
---------------------------------------------------------------

                 Key: WW-3670
                 URL: https://issues.apache.org/jira/browse/WW-3670
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - JSON
    Affects Versions: 2.2.3
            Reporter: Bruno Borges


If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.

The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085204#comment-13085204 ] 

Dave Newton commented on WW-3670:
---------------------------------

I suspect the patch *will* be applied--that's a different issue.

Just be aware that a *lot* of web app libs are not designed for shared usage like this, so be very careful.

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Bruno Borges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085232#comment-13085232 ] 

Bruno Borges commented on WW-3670:
----------------------------------

We are aware of the risks of using a Shared Library and we did take the necessary measures to avoid problems. And one of the consequences of these measures was this patch.

Of course we are not sure there are no more bugs, but we are sure our apps are running fine, at least for now.

Thank you all for the considerations.

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Bruno Borges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085186#comment-13085186 ] 

Bruno Borges commented on WW-3670:
----------------------------------

We manage app servers and we do not allow applications to add JARs into WEB-INF/lib. Only authorized JARs go into sharedlib. We had to fork json-plugin with this fix and we think that, because many are using the sharedlib feature, this patch should be applied.

It works with both SharedLib or per-app lib scenarios.

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Maurizio Cucchiara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085228#comment-13085228 ] 

Maurizio Cucchiara commented on WW-3670:
----------------------------------------

I agree with Dave.
Generally, I'm not a big fan of shared library, IMHO most of the times is an overload of work (you need to make aware CI server, you need to have an ad-hoc environment), furthermore IIRC (but it is very likely I'm wrong) even the S2 core does not work in a shared environment).
I haven't yet verified, but I'm afraid there is an high risk that sharing the json lib introduces a new kind of bug.


> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Bruno Borges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090496#comment-13090496 ] 

Bruno Borges commented on WW-3670:
----------------------------------

Any update on applying this patch?

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

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

Bruno Borges updated WW-3670:
-----------------------------

    Attachment: patch

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085180#comment-13085180 ] 

Dave Newton commented on WW-3670:
---------------------------------

IMO this isn't a critical issue, since the workaround is trivial--don't put framework classes in the shared lib, a practice I'm pretty leery of anyway for a variety of reasons.

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091129#comment-13091129 ] 

Hudson commented on WW-3670:
----------------------------

Integrated in Struts2 #347 (See [https://builds.apache.org/job/Struts2/347/])
    WW-3670: JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
Patch provided by Bruno Borges

jogep : 
Files : 
* /struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java


> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Assignee: Johannes Geppert
>            Priority: Critical
>              Labels: json, plugin, struts2
>             Fix For: 2.3
>
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Bruno Borges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091173#comment-13091173 ] 

Bruno Borges commented on WW-3670:
----------------------------------

No, thank you! :-)

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Assignee: Johannes Geppert
>            Priority: Critical
>              Labels: json, plugin, struts2
>             Fix For: 2.3
>
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

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

Johannes Geppert resolved WW-3670.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3
         Assignee: Johannes Geppert

Thank you for the Patch.

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Assignee: Johannes Geppert
>            Priority: Critical
>              Labels: json, plugin, struts2
>             Fix For: 2.3
>
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

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

Bruno Borges updated WW-3670:
-----------------------------

    Priority: Critical  (was: Major)

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Maurizio Cucchiara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085229#comment-13085229 ] 

Maurizio Cucchiara commented on WW-3670:
----------------------------------------

With that said I'm not against the patch.

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3670) JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Posted by "Bruno Borges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085181#comment-13085181 ] 

Bruno Borges commented on WW-3670:
----------------------------------

If workaroud is trivial (as the fix), why not applying it anyway? 

> JSONWriter cannot load CGLIB classes if its JAR is in SharedLib
> ---------------------------------------------------------------
>
>                 Key: WW-3670
>                 URL: https://issues.apache.org/jira/browse/WW-3670
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: Bruno Borges
>            Priority: Critical
>              Labels: json, plugin, struts2
>         Attachments: patch
>
>
> If one installs the struts2-json-plugin as a shared library (like in WebSphere, GlassFish and others), classes generated with CGLIB in an application level of class loader, JSONWriter does not find these classes.
> The problem occurs in JSONWriter, line 258

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira