I get a Nullpointer Exception when I add a log statement to my property getter.
Example:
---------------------------------------------------
@Name("editDataView")
public class EditDataViewAction ...
skuSelectionAction() {
...
Contexts.getSessionContext().set("skuModel", selectedSku);
...
}
----------------------------------------------------
@Scope(SESSION)
@Name("skuModel")
public class SkuModel ...
@Logger private Log log;
private List features = new ArrayList();
// lazy loading
public List getFeatures() {
if (features.size() < 1) {
log.info("features.size() was smaller than 1");
try {
features.addAll(featureDao.getFeaturesByFeatureListId(featureListId,
this));
} catch (ServerException e) {
e.printStackTrace();
}
}
return features;
}
Caused by: java.lang.NullPointerException
at com....model.SkuModel.getFeatures(SkuModel.java:196)
at
com....view.EditDataViewAction.skuSelectionAction(EditDataViewAction.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
If I take out the log statement, this works just fine ... looks like the Logger
has not been initialized at reflection time?
Seam version: 2.0.1.CR1
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124459#4124459
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124459
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user