Re: NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into an EAR

2011-07-17 Thread viola lu
Problem is fixed. thanks, ivan.

On Sat, Jul 16, 2011 at 11:48 PM, Ivan xhh...@gmail.com wrote:

 Open a jira https://issues.apache.org/jira/browse/GERONIMO-6079 and went
 ahead commit some changes to trunk.


 2011/7/15 viola lu viola...@gmail.com

 Hi, Dev:

  I packaged a web app with jsf features into an EAR, and deployed it, but
 got an NPE when starting MyFacesWebAppContext gbean. This is related with
 code line in MyFacesModuleBuilderExtension

 *AbstractName myFacesWebAppContextName =
 moduleContext.getNaming().createChildName(moduleName,
 myFacesWebAppContext, MyFacesWebAppContext);*
 *
 *

 In an EAR,  ModuleContext abstract name is  like:

 org.apache.geronimo.daytrader/daytrader/
 3.0.0.0/car?j2eeType=J2EEApplication,name=org.apache.geronimo.daytrader/daytrader/3.0.0.0/car

 The result won't contain WebModule

 But in an WAR is like

  com.apache.geronimo.samples/jsf/3.0.0.0/car?J2EEApplication=null,*
 WebModule=com.apache.geronimo.samples/jsf/3.0.0.0/car # **contaning
 WebModule*

 The result contains WebModule

 After constructing  MyFacesWebAppContext GBean, and start it as below,

 *public String getWebModuleName(){*
 *return abName.getNameProperty(NameFactory.WEB_MODULE); **# 
 **NameFactory.WEB_MODULE
 value is WebModule*
 *}*
 *
 *
 *@Override*
 *public void doStart() throws Exception {*
 *MYFACES_WEBAPP_CONTEXTS.put(getWebModuleName(), this);*
 *}*


  trying to find a *WebModule* string in its abstract name, but if jsf web
 app is in an ear, its abstractname doesn't contain *WebModule*, coz of
 its parent  is an EAR, whose abstract name doesn't include WebModule. This
 code only work when jsf web app is standalone.

 What i think is change MyFacesWebAppContext mapping way or change
 myfaceswebappcontext abstractname generation way,not sure which is better.

 Appreciate if somebody can shadow some lights on it.

 --
 viola

 Apache Geronimo




 --
 Ivan




-- 
viola

Apache Geronimo


[jira] [Closed] (GERONIMO-6079) NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into an EAR

2011-07-17 Thread viola.lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/GERONIMO-6079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

viola.lu closed GERONIMO-6079.
--

Resolution: Fixed

it's fixed.close it.

 NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into 
 an EAR
 

 Key: GERONIMO-6079
 URL: https://issues.apache.org/jira/browse/GERONIMO-6079
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: myfaces
Affects Versions: 3.0
Reporter: Ivan
Assignee: Ivan
 Fix For: 3.0


 Hi, Dev:
  I packaged a web app with jsf features into an EAR, and deployed it, but got 
 an NPE when starting MyFacesWebAppContext gbean. This is related with code 
 line in MyFacesModuleBuilderExtension
 AbstractName myFacesWebAppContextName = 
 moduleContext.getNaming().createChildName(moduleName, myFacesWebAppContext, 
 MyFacesWebAppContext);
 In an EAR,  ModuleContext abstract name is  like:
 org.apache.geronimo.daytrader/daytrader/3.0.0.0/car?j2eeType=J2EEApplication,name=org.apache.geronimo.daytrader/daytrader/3.0.0.0/car
 The result won't contain WebModule
 But in an WAR is like
  
 com.apache.geronimo.samples/jsf/3.0.0.0/car?J2EEApplication=null,WebModule=com.apache.geronimo.samples/jsf/3.0.0.0/car
  # contaning WebModule
 The result contains WebModule
 After constructing  MyFacesWebAppContext GBean, and start it as below, 
 public String getWebModuleName(){
 return abName.getNameProperty(NameFactory.WEB_MODULE); # 
 NameFactory.WEB_MODULE value is WebModule
 }
 @Override
 public void doStart() throws Exception {
 MYFACES_WEBAPP_CONTEXTS.put(getWebModuleName(), this);
 }
  trying to find a WebModule string in its abstract name, but if jsf web app 
 is in an ear, its abstractname doesn't contain WebModule, coz of its parent  
 is an EAR, whose abstract name doesn't include WebModule. This code only work 
 when jsf web app is standalone. 
 What i think is change MyFacesWebAppContext mapping way or change 
 myfaceswebappcontext abstractname generation way,not sure which is better.
 Appreciate if somebody can shadow some lights on it.
 -- 
 viola
 Apache Geronimo

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




[jira] [Created] (GERONIMO-6079) NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into an EAR

2011-07-16 Thread Ivan (JIRA)
NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into 
an EAR


 Key: GERONIMO-6079
 URL: https://issues.apache.org/jira/browse/GERONIMO-6079
 Project: Geronimo
  Issue Type: Bug
  Security Level: public (Regular issues)
  Components: myfaces
Affects Versions: 3.0
Reporter: Ivan
Assignee: Ivan
 Fix For: 3.0


Hi, Dev:

 I packaged a web app with jsf features into an EAR, and deployed it, but got 
an NPE when starting MyFacesWebAppContext gbean. This is related with code line 
in MyFacesModuleBuilderExtension

AbstractName myFacesWebAppContextName = 
moduleContext.getNaming().createChildName(moduleName, myFacesWebAppContext, 
MyFacesWebAppContext);

In an EAR,  ModuleContext abstract name is  like:
org.apache.geronimo.daytrader/daytrader/3.0.0.0/car?j2eeType=J2EEApplication,name=org.apache.geronimo.daytrader/daytrader/3.0.0.0/car
The result won't contain WebModule

But in an WAR is like
 
com.apache.geronimo.samples/jsf/3.0.0.0/car?J2EEApplication=null,WebModule=com.apache.geronimo.samples/jsf/3.0.0.0/car
 # contaning WebModule
The result contains WebModule

After constructing  MyFacesWebAppContext GBean, and start it as below, 

public String getWebModuleName(){
return abName.getNameProperty(NameFactory.WEB_MODULE); # 
NameFactory.WEB_MODULE value is WebModule
}

@Override
public void doStart() throws Exception {
MYFACES_WEBAPP_CONTEXTS.put(getWebModuleName(), this);
}

 trying to find a WebModule string in its abstract name, but if jsf web app is 
in an ear, its abstractname doesn't contain WebModule, coz of its parent  is an 
EAR, whose abstract name doesn't include WebModule. This code only work when 
jsf web app is standalone. 

What i think is change MyFacesWebAppContext mapping way or change 
myfaceswebappcontext abstractname generation way,not sure which is better.

Appreciate if somebody can shadow some lights on it.

-- 
viola

Apache Geronimo


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




[jira] [Commented] (GERONIMO-6079) NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into an EAR

2011-07-16 Thread Ivan (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-6079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13066447#comment-13066447
 ] 

Ivan commented on GERONIMO-6079:


Commit changes to trunk at r1147443.

 NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into 
 an EAR
 

 Key: GERONIMO-6079
 URL: https://issues.apache.org/jira/browse/GERONIMO-6079
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: myfaces
Affects Versions: 3.0
Reporter: Ivan
Assignee: Ivan
 Fix For: 3.0


 Hi, Dev:
  I packaged a web app with jsf features into an EAR, and deployed it, but got 
 an NPE when starting MyFacesWebAppContext gbean. This is related with code 
 line in MyFacesModuleBuilderExtension
 AbstractName myFacesWebAppContextName = 
 moduleContext.getNaming().createChildName(moduleName, myFacesWebAppContext, 
 MyFacesWebAppContext);
 In an EAR,  ModuleContext abstract name is  like:
 org.apache.geronimo.daytrader/daytrader/3.0.0.0/car?j2eeType=J2EEApplication,name=org.apache.geronimo.daytrader/daytrader/3.0.0.0/car
 The result won't contain WebModule
 But in an WAR is like
  
 com.apache.geronimo.samples/jsf/3.0.0.0/car?J2EEApplication=null,WebModule=com.apache.geronimo.samples/jsf/3.0.0.0/car
  # contaning WebModule
 The result contains WebModule
 After constructing  MyFacesWebAppContext GBean, and start it as below, 
 public String getWebModuleName(){
 return abName.getNameProperty(NameFactory.WEB_MODULE); # 
 NameFactory.WEB_MODULE value is WebModule
 }
 @Override
 public void doStart() throws Exception {
 MYFACES_WEBAPP_CONTEXTS.put(getWebModuleName(), this);
 }
  trying to find a WebModule string in its abstract name, but if jsf web app 
 is in an ear, its abstractname doesn't contain WebModule, coz of its parent  
 is an EAR, whose abstract name doesn't include WebModule. This code only work 
 when jsf web app is standalone. 
 What i think is change MyFacesWebAppContext mapping way or change 
 myfaceswebappcontext abstractname generation way,not sure which is better.
 Appreciate if somebody can shadow some lights on it.
 -- 
 viola
 Apache Geronimo

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




Re: NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into an EAR

2011-07-16 Thread Ivan
Open a jira https://issues.apache.org/jira/browse/GERONIMO-6079 and went
ahead commit some changes to trunk.

2011/7/15 viola lu viola...@gmail.com

 Hi, Dev:

  I packaged a web app with jsf features into an EAR, and deployed it, but
 got an NPE when starting MyFacesWebAppContext gbean. This is related with
 code line in MyFacesModuleBuilderExtension

 *AbstractName myFacesWebAppContextName =
 moduleContext.getNaming().createChildName(moduleName,
 myFacesWebAppContext, MyFacesWebAppContext);*
 *
 *

 In an EAR,  ModuleContext abstract name is  like:

 org.apache.geronimo.daytrader/daytrader/
 3.0.0.0/car?j2eeType=J2EEApplication,name=org.apache.geronimo.daytrader/daytrader/3.0.0.0/car

 The result won't contain WebModule

 But in an WAR is like

  com.apache.geronimo.samples/jsf/3.0.0.0/car?J2EEApplication=null,*
 WebModule=com.apache.geronimo.samples/jsf/3.0.0.0/car # **contaning
 WebModule*

 The result contains WebModule

 After constructing  MyFacesWebAppContext GBean, and start it as below,

 *public String getWebModuleName(){*
 *return abName.getNameProperty(NameFactory.WEB_MODULE); **# 
 **NameFactory.WEB_MODULE
 value is WebModule*
 *}*
 *
 *
 *@Override*
 *public void doStart() throws Exception {*
 *MYFACES_WEBAPP_CONTEXTS.put(getWebModuleName(), this);*
 *}*


  trying to find a *WebModule* string in its abstract name, but if jsf web
 app is in an ear, its abstractname doesn't contain *WebModule*, coz of its
 parent  is an EAR, whose abstract name doesn't include WebModule. This code
 only work when jsf web app is standalone.

 What i think is change MyFacesWebAppContext mapping way or change
 myfaceswebappcontext abstractname generation way,not sure which is better.

 Appreciate if somebody can shadow some lights on it.

 --
 viola

 Apache Geronimo




-- 
Ivan


NPE in MyFacesWebAppContext.doStart() if jsf web application is packaged into an EAR

2011-07-15 Thread viola lu
Hi, Dev:

 I packaged a web app with jsf features into an EAR, and deployed it, but
got an NPE when starting MyFacesWebAppContext gbean. This is related with
code line in MyFacesModuleBuilderExtension

*AbstractName myFacesWebAppContextName =
moduleContext.getNaming().createChildName(moduleName,
myFacesWebAppContext, MyFacesWebAppContext);*
*
*

In an EAR,  ModuleContext abstract name is  like:

org.apache.geronimo.daytrader/daytrader/
3.0.0.0/car?j2eeType=J2EEApplication,name=org.apache.geronimo.daytrader/daytrader/3.0.0.0/car

The result won't contain WebModule

But in an WAR is like

 com.apache.geronimo.samples/jsf/3.0.0.0/car?J2EEApplication=null,*
WebModule=com.apache.geronimo.samples/jsf/3.0.0.0/car # **contaning
WebModule*

The result contains WebModule

After constructing  MyFacesWebAppContext GBean, and start it as below,

*public String getWebModuleName(){*
*return abName.getNameProperty(NameFactory.WEB_MODULE); **#
**NameFactory.WEB_MODULE
value is WebModule*
*}*
*
*
*@Override*
*public void doStart() throws Exception {*
*MYFACES_WEBAPP_CONTEXTS.put(getWebModuleName(), this);*
*}*


 trying to find a *WebModule* string in its abstract name, but if jsf web
app is in an ear, its abstractname doesn't contain *WebModule*, coz of its
parent  is an EAR, whose abstract name doesn't include WebModule. This code
only work when jsf web app is standalone.

What i think is change MyFacesWebAppContext mapping way or change
myfaceswebappcontext abstractname generation way,not sure which is better.

Appreciate if somebody can shadow some lights on it.

-- 
viola

Apache Geronimo