You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by Benjamin Marwell <bm...@gmail.com> on 2020/01/11 15:15:13 UTC

[SHIRO-735] merge request

Hi,

I would like to see my PR [1] merged, because this causes a lit of trouble
for me and possibly other users. I do not think there are any side effects,
but another review might still be beneficial.

Also, one could write an integration test like this: start an affected
application server, e.g. OpenLiberty and run a htto request targeted at a
servlet whose method uses such a signature:

    public void getAction(final @Suspended asyncResponse asyncResponse);

Any help would be appreciated, although it could probably merged right away
even without such a test case.

Thanks,
Ben

[1] https://issues.apache.org/jira/browse/SHIRO-735
<https://issues.apache.org/jira/browse/SHIRO-735>

Re: [SHIRO-735] merge request

Posted by Francois Papon <fr...@openobject.fr>.
Hi Ben,

Thanks!

I will add the test classe and include this PR the release 1.5.0.

regards,

François
fpapon@apache.org

Le 14/01/2020 à 07:48, Benjamin Marwell a écrit :
> Thank YOU for looking into this!
>
> In case you want to adapt this as an integration test case, there are other
> ways to start openLiberty.
>
> One is through Arquillian, another by using test containers. You can find
> examples of both methods here:
> https://aguibert.github.io/openliberty-cheat-sheet/#_integration_testing
>
>
>
> On Mon, 13 Jan 2020, 22:40 Brian Demers, <br...@gmail.com> wrote:
>
>> Thanks Ben! this is very helpful!
>>
>> On Mon, Jan 13, 2020 at 3:06 PM Benjamin Marwell <bm...@gmail.com>
>> wrote:
>>
>>> Hello Brian,
>>>
>>> I just figured out that I opened two PMRs at IBM. One just recently,
>>> the other one about a year and a half ago. That one was closed because
>>> "the NPE is just a wrong error message" and therefore was converted to
>>> a RFE.
>>> This way is almost impossible to figure out what went wrong. I think
>>> the underlying problem is in fact Apache CXF.
>>>
>>> Here's a working example:
>>> https://github.com/bmhm/shiro-openliberty-npe
>>>
>>> just run `mvn liberty:dev` and press Enter to execute the IT.
>>>
>>> You will be able to see the stacktrace in STDOUT and it is also
>>> available in the README file.
>>>
>>> Fix:
>>> 1. Remove shiro-servlet-plugin
>>> 2. Insert the missing parts into a new file web.xml and add the two lines
>>> of PR.
>>>
>>> HTH
>>>
>>> You can use the code as an IT for apache shiro if you like.
>>>
>>>
>>> Am Mo., 13. Jan. 2020 um 19:14 Uhr schrieb Brian Demers
>>> <br...@gmail.com>:
>>>> Thanks Ben!
>>>>
>>>> Can you include the NPE stacktrace too? That might help us write a test
>>>> (and maybe push a fix into OpenLiberty, even if it's just a better
>>>> exception)
>>>>
>>>> On Sat, Jan 11, 2020 at 10:15 AM Benjamin Marwell <bm...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I would like to see my PR [1] merged, because this causes a lit of
>>> trouble
>>>>> for me and possibly other users. I do not think there are any side
>>> effects,
>>>>> but another review might still be beneficial.
>>>>>
>>>>> Also, one could write an integration test like this: start an
>> affected
>>>>> application server, e.g. OpenLiberty and run a htto request targeted
>>> at a
>>>>> servlet whose method uses such a signature:
>>>>>
>>>>>     public void getAction(final @Suspended asyncResponse
>>> asyncResponse);
>>>>> Any help would be appreciated, although it could probably merged
>> right
>>> away
>>>>> even without such a test case.
>>>>>
>>>>> Thanks,
>>>>> Ben
>>>>>
>>>>> [1] https://issues.apache.org/jira/browse/SHIRO-735
>>>>> <https://issues.apache.org/jira/browse/SHIRO-735>
>>>>>

Re: [SHIRO-735] merge request

Posted by Benjamin Marwell <bm...@gmail.com>.
Thank YOU for looking into this!

In case you want to adapt this as an integration test case, there are other
ways to start openLiberty.

One is through Arquillian, another by using test containers. You can find
examples of both methods here:
https://aguibert.github.io/openliberty-cheat-sheet/#_integration_testing



On Mon, 13 Jan 2020, 22:40 Brian Demers, <br...@gmail.com> wrote:

> Thanks Ben! this is very helpful!
>
> On Mon, Jan 13, 2020 at 3:06 PM Benjamin Marwell <bm...@gmail.com>
> wrote:
>
> > Hello Brian,
> >
> > I just figured out that I opened two PMRs at IBM. One just recently,
> > the other one about a year and a half ago. That one was closed because
> > "the NPE is just a wrong error message" and therefore was converted to
> > a RFE.
> > This way is almost impossible to figure out what went wrong. I think
> > the underlying problem is in fact Apache CXF.
> >
> > Here's a working example:
> > https://github.com/bmhm/shiro-openliberty-npe
> >
> > just run `mvn liberty:dev` and press Enter to execute the IT.
> >
> > You will be able to see the stacktrace in STDOUT and it is also
> > available in the README file.
> >
> > Fix:
> > 1. Remove shiro-servlet-plugin
> > 2. Insert the missing parts into a new file web.xml and add the two lines
> > of PR.
> >
> > HTH
> >
> > You can use the code as an IT for apache shiro if you like.
> >
> >
> > Am Mo., 13. Jan. 2020 um 19:14 Uhr schrieb Brian Demers
> > <br...@gmail.com>:
> > >
> > > Thanks Ben!
> > >
> > > Can you include the NPE stacktrace too? That might help us write a test
> > > (and maybe push a fix into OpenLiberty, even if it's just a better
> > > exception)
> > >
> > > On Sat, Jan 11, 2020 at 10:15 AM Benjamin Marwell <bm...@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I would like to see my PR [1] merged, because this causes a lit of
> > trouble
> > > > for me and possibly other users. I do not think there are any side
> > effects,
> > > > but another review might still be beneficial.
> > > >
> > > > Also, one could write an integration test like this: start an
> affected
> > > > application server, e.g. OpenLiberty and run a htto request targeted
> > at a
> > > > servlet whose method uses such a signature:
> > > >
> > > >     public void getAction(final @Suspended asyncResponse
> > asyncResponse);
> > > >
> > > > Any help would be appreciated, although it could probably merged
> right
> > away
> > > > even without such a test case.
> > > >
> > > > Thanks,
> > > > Ben
> > > >
> > > > [1] https://issues.apache.org/jira/browse/SHIRO-735
> > > > <https://issues.apache.org/jira/browse/SHIRO-735>
> > > >
> >
>

Re: [SHIRO-735] merge request

Posted by Brian Demers <br...@gmail.com>.
Thanks Ben! this is very helpful!

On Mon, Jan 13, 2020 at 3:06 PM Benjamin Marwell <bm...@gmail.com> wrote:

> Hello Brian,
>
> I just figured out that I opened two PMRs at IBM. One just recently,
> the other one about a year and a half ago. That one was closed because
> "the NPE is just a wrong error message" and therefore was converted to
> a RFE.
> This way is almost impossible to figure out what went wrong. I think
> the underlying problem is in fact Apache CXF.
>
> Here's a working example:
> https://github.com/bmhm/shiro-openliberty-npe
>
> just run `mvn liberty:dev` and press Enter to execute the IT.
>
> You will be able to see the stacktrace in STDOUT and it is also
> available in the README file.
>
> Fix:
> 1. Remove shiro-servlet-plugin
> 2. Insert the missing parts into a new file web.xml and add the two lines
> of PR.
>
> HTH
>
> You can use the code as an IT for apache shiro if you like.
>
>
> Am Mo., 13. Jan. 2020 um 19:14 Uhr schrieb Brian Demers
> <br...@gmail.com>:
> >
> > Thanks Ben!
> >
> > Can you include the NPE stacktrace too? That might help us write a test
> > (and maybe push a fix into OpenLiberty, even if it's just a better
> > exception)
> >
> > On Sat, Jan 11, 2020 at 10:15 AM Benjamin Marwell <bm...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I would like to see my PR [1] merged, because this causes a lit of
> trouble
> > > for me and possibly other users. I do not think there are any side
> effects,
> > > but another review might still be beneficial.
> > >
> > > Also, one could write an integration test like this: start an affected
> > > application server, e.g. OpenLiberty and run a htto request targeted
> at a
> > > servlet whose method uses such a signature:
> > >
> > >     public void getAction(final @Suspended asyncResponse
> asyncResponse);
> > >
> > > Any help would be appreciated, although it could probably merged right
> away
> > > even without such a test case.
> > >
> > > Thanks,
> > > Ben
> > >
> > > [1] https://issues.apache.org/jira/browse/SHIRO-735
> > > <https://issues.apache.org/jira/browse/SHIRO-735>
> > >
>

Re: [SHIRO-735] merge request

Posted by Benjamin Marwell <bm...@gmail.com>.
Hello Brian,

I just figured out that I opened two PMRs at IBM. One just recently,
the other one about a year and a half ago. That one was closed because
"the NPE is just a wrong error message" and therefore was converted to
a RFE.
This way is almost impossible to figure out what went wrong. I think
the underlying problem is in fact Apache CXF.

Here's a working example:
https://github.com/bmhm/shiro-openliberty-npe

just run `mvn liberty:dev` and press Enter to execute the IT.

You will be able to see the stacktrace in STDOUT and it is also
available in the README file.

Fix:
1. Remove shiro-servlet-plugin
2. Insert the missing parts into a new file web.xml and add the two lines of PR.

HTH

You can use the code as an IT for apache shiro if you like.


Am Mo., 13. Jan. 2020 um 19:14 Uhr schrieb Brian Demers
<br...@gmail.com>:
>
> Thanks Ben!
>
> Can you include the NPE stacktrace too? That might help us write a test
> (and maybe push a fix into OpenLiberty, even if it's just a better
> exception)
>
> On Sat, Jan 11, 2020 at 10:15 AM Benjamin Marwell <bm...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I would like to see my PR [1] merged, because this causes a lit of trouble
> > for me and possibly other users. I do not think there are any side effects,
> > but another review might still be beneficial.
> >
> > Also, one could write an integration test like this: start an affected
> > application server, e.g. OpenLiberty and run a htto request targeted at a
> > servlet whose method uses such a signature:
> >
> >     public void getAction(final @Suspended asyncResponse asyncResponse);
> >
> > Any help would be appreciated, although it could probably merged right away
> > even without such a test case.
> >
> > Thanks,
> > Ben
> >
> > [1] https://issues.apache.org/jira/browse/SHIRO-735
> > <https://issues.apache.org/jira/browse/SHIRO-735>
> >

Re: [SHIRO-735] merge request

Posted by Brian Demers <br...@gmail.com>.
Thanks Ben!

Can you include the NPE stacktrace too? That might help us write a test
(and maybe push a fix into OpenLiberty, even if it's just a better
exception)

On Sat, Jan 11, 2020 at 10:15 AM Benjamin Marwell <bm...@gmail.com>
wrote:

> Hi,
>
> I would like to see my PR [1] merged, because this causes a lit of trouble
> for me and possibly other users. I do not think there are any side effects,
> but another review might still be beneficial.
>
> Also, one could write an integration test like this: start an affected
> application server, e.g. OpenLiberty and run a htto request targeted at a
> servlet whose method uses such a signature:
>
>     public void getAction(final @Suspended asyncResponse asyncResponse);
>
> Any help would be appreciated, although it could probably merged right away
> even without such a test case.
>
> Thanks,
> Ben
>
> [1] https://issues.apache.org/jira/browse/SHIRO-735
> <https://issues.apache.org/jira/browse/SHIRO-735>
>