You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org> on 2007/09/13 17:34:32 UTC

[jira] Created: (TRINIDAD-708) NullPointerException with multiple XMLMenuModel beans in one page

NullPointerException with multiple XMLMenuModel beans in one page
-----------------------------------------------------------------

                 Key: TRINIDAD-708
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 1.0.2-core
         Environment: Trinidad 1.0.3-SNAPSHOT
            Reporter: Andrew Robinson
            Priority: Blocker


A page that uses more than one XMLMenuModel beans (two different sources) causes a NullPointerException. There doesn't seem to be any work-around except to not use XMLMenuModel functionality, hence why I reported this as a "Blocker".

See the forum reference for the details on the problem and how to reproduce it:

http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175

The problem seems to stem from the fact the code uses a single request variable to store the model. This means that if there are multiple models, only the first one gets stored, and all the rest are thrown out essentially. 

Suggested fix from what I have seen:
The root model should be cached per source, not just one instance.

Current code:
requestMap.put(_ROOT_MODEL_KEY, this); 

As you can see, only one instance can ever be created per request.

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


[jira] Updated: (TRINIDAD-708) NullPointerException with multiple XMLMenuModel beans in one page

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

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

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

> NullPointerException with multiple XMLMenuModel beans in one page
> -----------------------------------------------------------------
>
>                 Key: TRINIDAD-708
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.2-core, 1.2.2-core
>         Environment: Trinidad 1.0.3-SNAPSHOT
>            Reporter: Andrew Robinson
>            Assignee: Matthias Weßendorf
>            Priority: Blocker
>             Fix For:  1.2.12-core
>
>         Attachments: xmlMenuModel.patch
>
>
> A page that uses more than one XMLMenuModel beans (two different sources) causes a NullPointerException. There doesn't seem to be any work-around except to not use XMLMenuModel functionality, hence why I reported this as a "Blocker".
> See the forum reference for the details on the problem and how to reproduce it:
> http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175
> The problem seems to stem from the fact the code uses a single request variable to store the model. This means that if there are multiple models, only the first one gets stored, and all the rest are thrown out essentially. 
> Suggested fix from what I have seen:
> The root model should be cached per source, not just one instance.
> Current code:
> requestMap.put(_ROOT_MODEL_KEY, this); 
> As you can see, only one instance can ever be created per request.

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


[jira] Commented: (TRINIDAD-708) NullPointerException with multiple XMLMenuModel beans in one page

Posted by "Abhijit S Ghosh (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676625#action_12676625 ] 

Abhijit S Ghosh commented on TRINIDAD-708:
------------------------------------------

A fix is being worked upon.

Thanks,
Abhi

> NullPointerException with multiple XMLMenuModel beans in one page
> -----------------------------------------------------------------
>
>                 Key: TRINIDAD-708
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.2-core, 1.2.2-core
>         Environment: Trinidad 1.0.3-SNAPSHOT
>            Reporter: Andrew Robinson
>            Priority: Blocker
>
> A page that uses more than one XMLMenuModel beans (two different sources) causes a NullPointerException. There doesn't seem to be any work-around except to not use XMLMenuModel functionality, hence why I reported this as a "Blocker".
> See the forum reference for the details on the problem and how to reproduce it:
> http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175
> The problem seems to stem from the fact the code uses a single request variable to store the model. This means that if there are multiple models, only the first one gets stored, and all the rest are thrown out essentially. 
> Suggested fix from what I have seen:
> The root model should be cached per source, not just one instance.
> Current code:
> requestMap.put(_ROOT_MODEL_KEY, this); 
> As you can see, only one instance can ever be created per request.

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


[jira] Updated: (TRINIDAD-708) NullPointerException with multiple XMLMenuModel beans in one page

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

Abhijit S Ghosh updated TRINIDAD-708:
-------------------------------------

    Status: Patch Available  (was: Open)

> NullPointerException with multiple XMLMenuModel beans in one page
> -----------------------------------------------------------------
>
>                 Key: TRINIDAD-708
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.2-core, 1.2.2-core
>         Environment: Trinidad 1.0.3-SNAPSHOT
>            Reporter: Andrew Robinson
>            Priority: Blocker
>         Attachments: xmlMenuModel.patch
>
>
> A page that uses more than one XMLMenuModel beans (two different sources) causes a NullPointerException. There doesn't seem to be any work-around except to not use XMLMenuModel functionality, hence why I reported this as a "Blocker".
> See the forum reference for the details on the problem and how to reproduce it:
> http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175
> The problem seems to stem from the fact the code uses a single request variable to store the model. This means that if there are multiple models, only the first one gets stored, and all the rest are thrown out essentially. 
> Suggested fix from what I have seen:
> The root model should be cached per source, not just one instance.
> Current code:
> requestMap.put(_ROOT_MODEL_KEY, this); 
> As you can see, only one instance can ever be created per request.

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


[jira] Commented: (TRINIDAD-708) NullPointerException with multiple XMLMenuModel beans in one page

Posted by "Tauqueer Ali (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666442#action_12666442 ] 

Tauqueer Ali commented on TRINIDAD-708:
---------------------------------------

Hi Guys. We are building a presentation framework for a top banking company using Trinidad Faces and have run into this issue. We cannot make any progress unless Trinidad allows us to created two or menu models. Can you please let us know if any one is working on this issue or are there any plans of fixing this in the near future. Any work-around is also acceptable for time being. I couldn't find the name of the author from XMLMenuModel class, so, I don't know who to talk. The forum has some replies from Adam Winer from Oracle but I'm not sure if he's still associated with this. 

Thank you.

> NullPointerException with multiple XMLMenuModel beans in one page
> -----------------------------------------------------------------
>
>                 Key: TRINIDAD-708
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.2-core, 1.2.2-core
>         Environment: Trinidad 1.0.3-SNAPSHOT
>            Reporter: Andrew Robinson
>            Priority: Blocker
>
> A page that uses more than one XMLMenuModel beans (two different sources) causes a NullPointerException. There doesn't seem to be any work-around except to not use XMLMenuModel functionality, hence why I reported this as a "Blocker".
> See the forum reference for the details on the problem and how to reproduce it:
> http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175
> The problem seems to stem from the fact the code uses a single request variable to store the model. This means that if there are multiple models, only the first one gets stored, and all the rest are thrown out essentially. 
> Suggested fix from what I have seen:
> The root model should be cached per source, not just one instance.
> Current code:
> requestMap.put(_ROOT_MODEL_KEY, this); 
> As you can see, only one instance can ever be created per request.

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


[jira] Issue Comment Edited: (TRINIDAD-708) NullPointerException with multiple XMLMenuModel beans in one page

Posted by "Tauqueer Ali (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666442#action_12666442 ] 

tali62 edited comment on TRINIDAD-708 at 1/22/09 11:53 PM:
-----------------------------------------------------------------

Hi Guys. We are building a presentation framework for a top banking company using Trinidad Faces and have run into this issue. We cannot make any progress unless Trinidad allows us to create two or more XML menu models. Can you please let us know if any one is working on this issue or are there any plans of fixing this in the near future. Any work-around is also acceptable for time being. I couldn't find the name of the author from XMLMenuModel class, so, I don't know who to talk. The forum has some replies from Adam Winer from Oracle but I'm not sure if he's still associated with this. 

Thank you.

      was (Author: tali62):
    Hi Guys. We are building a presentation framework for a top banking company using Trinidad Faces and have run into this issue. We cannot make any progress unless Trinidad allows us to created two or menu models. Can you please let us know if any one is working on this issue or are there any plans of fixing this in the near future. Any work-around is also acceptable for time being. I couldn't find the name of the author from XMLMenuModel class, so, I don't know who to talk. The forum has some replies from Adam Winer from Oracle but I'm not sure if he's still associated with this. 

Thank you.
  
> NullPointerException with multiple XMLMenuModel beans in one page
> -----------------------------------------------------------------
>
>                 Key: TRINIDAD-708
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.2-core, 1.2.2-core
>         Environment: Trinidad 1.0.3-SNAPSHOT
>            Reporter: Andrew Robinson
>            Priority: Blocker
>
> A page that uses more than one XMLMenuModel beans (two different sources) causes a NullPointerException. There doesn't seem to be any work-around except to not use XMLMenuModel functionality, hence why I reported this as a "Blocker".
> See the forum reference for the details on the problem and how to reproduce it:
> http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175
> The problem seems to stem from the fact the code uses a single request variable to store the model. This means that if there are multiple models, only the first one gets stored, and all the rest are thrown out essentially. 
> Suggested fix from what I have seen:
> The root model should be cached per source, not just one instance.
> Current code:
> requestMap.put(_ROOT_MODEL_KEY, this); 
> As you can see, only one instance can ever be created per request.

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


[jira] Commented: (TRINIDAD-708) NullPointerException with multiple XMLMenuModel beans in one page

Posted by "Abhijit S Ghosh (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697459#action_12697459 ] 

Abhijit S Ghosh commented on TRINIDAD-708:
------------------------------------------

Please also apply the patch to 1.2.11.2.

Thanks,
Abhi

> NullPointerException with multiple XMLMenuModel beans in one page
> -----------------------------------------------------------------
>
>                 Key: TRINIDAD-708
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.2-core, 1.2.2-core
>         Environment: Trinidad 1.0.3-SNAPSHOT
>            Reporter: Andrew Robinson
>            Priority: Blocker
>         Attachments: xmlMenuModel.patch
>
>
> A page that uses more than one XMLMenuModel beans (two different sources) causes a NullPointerException. There doesn't seem to be any work-around except to not use XMLMenuModel functionality, hence why I reported this as a "Blocker".
> See the forum reference for the details on the problem and how to reproduce it:
> http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175
> The problem seems to stem from the fact the code uses a single request variable to store the model. This means that if there are multiple models, only the first one gets stored, and all the rest are thrown out essentially. 
> Suggested fix from what I have seen:
> The root model should be cached per source, not just one instance.
> Current code:
> requestMap.put(_ROOT_MODEL_KEY, this); 
> As you can see, only one instance can ever be created per request.

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