You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Harald Kuhn (JIRA)" <de...@myfaces.apache.org> on 2010/03/10 16:41:28 UTC

[jira] Created: (TRINIDAD-1751) NPE if User-Agent header is missing

NPE if User-Agent header is missing
-----------------------------------

                 Key: TRINIDAD-1751
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1751
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 1.2.13-core 
            Reporter: Harald Kuhn


After a upgrade from trinidad 1.2.11 to Trinidad 1.2.13 I get a NullPointerException from one of our monitoring scripts.
Caused by: java.lang.NullPointerException
        at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl._populateAgentImpl(AgentFactoryImpl.java:115)
        at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:65)
        at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getAgent(RequestContextImpl.java:695)
        at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.chooseRenderKit(CoreRenderKit.java:139)
        at org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:52)

While tracking this issue further down it showed that the monitoring script doesn't send a User-Agent header along with the request.

This case isn't considered any more in AgentFactoryImpl._populateAgentImpl().
The version from Trinidad 1.2.11 used to have the following code block:
if (userAgent == null)
{
   _populateUnknownAgentImpl(null, agent);
   return;
}


it looks has been changed/removed in this rev:
http://svn.apache.org/viewvc?view=revision&revision=820104




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-1751) NPE if User-Agent header is missing

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849343#action_12849343 ] 

Matthias Weßendorf commented on TRINIDAD-1751:
----------------------------------------------

You can test the NULL case with curl => curl -A "" url_to_trinidad_app

By default almost all "user-agents" do submit an user-agent string, since they play nice...

> NPE if User-Agent header is missing
> -----------------------------------
>
>                 Key: TRINIDAD-1751
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1751
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.2.13-core 
>            Reporter: Harald Kuhn
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.14-core , 2.0.0.3-core
>
>         Attachments: TRINIDAD-1751.patch
>
>
> After a upgrade from trinidad 1.2.11 to Trinidad 1.2.13 I get a NullPointerException from one of our monitoring scripts.
> Caused by: java.lang.NullPointerException
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl._populateAgentImpl(AgentFactoryImpl.java:115)
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:65)
>         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getAgent(RequestContextImpl.java:695)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.chooseRenderKit(CoreRenderKit.java:139)
>         at org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:52)
> While tracking this issue further down it showed that the monitoring script doesn't send a User-Agent header along with the request.
> This case isn't considered any more in AgentFactoryImpl._populateAgentImpl().
> The version from Trinidad 1.2.11 used to have the following code block:
> if (userAgent == null)
> {
>    _populateUnknownAgentImpl(null, agent);
>    return;
> }
> it looks has been changed/removed in this rev:
> http://svn.apache.org/viewvc?view=revision&revision=820104

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TRINIDAD-1751) NPE if User-Agent header is missing

Posted by "Harald Kuhn (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harald Kuhn updated TRINIDAD-1751:
----------------------------------

    Status: Patch Available  (was: Open)

> NPE if User-Agent header is missing
> -----------------------------------
>
>                 Key: TRINIDAD-1751
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1751
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.2.13-core 
>            Reporter: Harald Kuhn
>
> After a upgrade from trinidad 1.2.11 to Trinidad 1.2.13 I get a NullPointerException from one of our monitoring scripts.
> Caused by: java.lang.NullPointerException
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl._populateAgentImpl(AgentFactoryImpl.java:115)
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:65)
>         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getAgent(RequestContextImpl.java:695)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.chooseRenderKit(CoreRenderKit.java:139)
>         at org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:52)
> While tracking this issue further down it showed that the monitoring script doesn't send a User-Agent header along with the request.
> This case isn't considered any more in AgentFactoryImpl._populateAgentImpl().
> The version from Trinidad 1.2.11 used to have the following code block:
> if (userAgent == null)
> {
>    _populateUnknownAgentImpl(null, agent);
>    return;
> }
> it looks has been changed/removed in this rev:
> http://svn.apache.org/viewvc?view=revision&revision=820104

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-1751) NPE if User-Agent header is missing

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846560#action_12846560 ] 

Matthias Weßendorf commented on TRINIDAD-1751:
----------------------------------------------

This issue has been created (introduced) by this commit:
http://svn.apache.org/viewvc?view=revision&revision=820104

> NPE if User-Agent header is missing
> -----------------------------------
>
>                 Key: TRINIDAD-1751
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1751
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.2.13-core 
>            Reporter: Harald Kuhn
>         Attachments: TRINIDAD-1751.patch
>
>
> After a upgrade from trinidad 1.2.11 to Trinidad 1.2.13 I get a NullPointerException from one of our monitoring scripts.
> Caused by: java.lang.NullPointerException
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl._populateAgentImpl(AgentFactoryImpl.java:115)
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:65)
>         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getAgent(RequestContextImpl.java:695)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.chooseRenderKit(CoreRenderKit.java:139)
>         at org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:52)
> While tracking this issue further down it showed that the monitoring script doesn't send a User-Agent header along with the request.
> This case isn't considered any more in AgentFactoryImpl._populateAgentImpl().
> The version from Trinidad 1.2.11 used to have the following code block:
> if (userAgent == null)
> {
>    _populateUnknownAgentImpl(null, agent);
>    return;
> }
> it looks has been changed/removed in this rev:
> http://svn.apache.org/viewvc?view=revision&revision=820104

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TRINIDAD-1751) NPE if User-Agent header is missing

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf updated TRINIDAD-1751:
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0.3-core
                   1.2.14-core 
         Assignee: Matthias Weßendorf
           Status: Resolved  (was: Patch Available)

> NPE if User-Agent header is missing
> -----------------------------------
>
>                 Key: TRINIDAD-1751
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1751
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.2.13-core 
>            Reporter: Harald Kuhn
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.14-core , 2.0.0.3-core
>
>         Attachments: TRINIDAD-1751.patch
>
>
> After a upgrade from trinidad 1.2.11 to Trinidad 1.2.13 I get a NullPointerException from one of our monitoring scripts.
> Caused by: java.lang.NullPointerException
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl._populateAgentImpl(AgentFactoryImpl.java:115)
>         at org.apache.myfaces.trinidadinternal.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:65)
>         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.getAgent(RequestContextImpl.java:695)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.chooseRenderKit(CoreRenderKit.java:139)
>         at org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:52)
> While tracking this issue further down it showed that the monitoring script doesn't send a User-Agent header along with the request.
> This case isn't considered any more in AgentFactoryImpl._populateAgentImpl().
> The version from Trinidad 1.2.11 used to have the following code block:
> if (userAgent == null)
> {
>    _populateUnknownAgentImpl(null, agent);
>    return;
> }
> it looks has been changed/removed in this rev:
> http://svn.apache.org/viewvc?view=revision&revision=820104

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.