[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Attachment: RichBean.java
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> {code}
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Description:
Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
{code}
@PostConstruct
public void postContruct() {
TopicsContext topicsContext = TopicsContext.lookup();
if(topicsContext == null)
log(" - topicsContext is NULL");
pushTK = new TopicKey(PUSH_TOPIC);
// this will fail if topicsContext is null (NPE)
topicsContext.getOrCreateTopic(pushTK);
}
{code}
was:
Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
```
@PostConstruct
public void postContruct() {
TopicsContext topicsContext = TopicsContext.lookup();
if(topicsContext == null)
log(" - topicsContext is NULL");
pushTK = new TopicKey(PUSH_TOPIC);
// this will fail if topicsContext is null (NPE)
topicsContext.getOrCreateTopic(pushTK);
}
```
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> {code}
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Description:
Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
```
@PostConstruct
public void postContruct() {
TopicsContext topicsContext = TopicsContext.lookup();
if(topicsContext == null)
log(" - topicsContext is NULL");
pushTK = new TopicKey(PUSH_TOPIC);
// this will fail if topicsContext is null (NPE)
topicsContext.getOrCreateTopic(pushTK);
}
```
was:
Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
@PostConstruct
public void postContruct() {
TopicsContext topicsContext = TopicsContext.lookup();
if(topicsContext == null)
log(" - topicsContext is NULL");
pushTK = new TopicKey(PUSH_TOPIC);
// this will fail if topicsContext is null (NPE)
topicsContext.getOrCreateTopic(pushTK);
}
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> ```
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
> ```
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Workaround Description:
Workaround is to change the code as shown below
{code}
import javax.faces.context.FacesContext;
import org.richfaces.application.ServiceTracker;
import org.richfaces.application.push.PushContextFactory;
...
@PostConstruct
public void postContruct() {
TopicsContext topicsContext = TopicsContext.lookup();
if(topicsContext == null)
{
log(" - topicsContext is NULL");
FacesContext facesContext = FacesContext.getCurrentInstance();
ServiceTracker.getService(PushContextFactory.class).getPushContext().init(facesContext);
topicsContext = TopicsContext.lookup();
}
pushTK = new TopicKey(PUSH_TOPIC);
// this will fail if topicsContext is null (NPE)
topicsContext.getOrCreateTopic(pushTK);
...
}
{code}
was:
Workaround is to change the code as shown below
import javax.faces.context.FacesContext;
import org.richfaces.application.ServiceTracker;
import org.richfaces.application.push.PushContextFactory;
...
@PostConstruct
public void postContruct() {
TopicsContext topicsContext = TopicsContext.lookup();
if(topicsContext == null)
{
log(" - topicsContext is NULL");
FacesContext facesContext = FacesContext.getCurrentInstance();
ServiceTracker.getService(PushContextFactory.class).getPushContext().init(facesContext);
topicsContext = TopicsContext.lookup();
}
pushTK = new TopicKey(PUSH_TOPIC);
// this will fail if topicsContext is null (NPE)
topicsContext.getOrCreateTopic(pushTK);
...
}
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> {code}
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Steps to Reproduce:
1) Create RichFaces module in EAP 6 (copy modules.zip to EAP)
2) Deploy jboss-as-helloworld-rf.war
3) Open http://localhost:8080/jboss-as-helloworld-rf/. Everything should work normally.
4) Re-deploy the .war. There should be no errors during re-deployment.
5) Open http://localhost:8080/jboss-as-helloworld-rf/. This time you'll get an error page dealing with being unable to invoke the post construct method. This error ultimately is due to TopicsContext.lookup() returning null.
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> {code}
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Assignee: Brian Leathem
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Assignee: Brian Leathem
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> {code}
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Attachment: jboss-as-helloworld-rf.war
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
[ https://issues.jboss.org/browse/RF-12896?page=com.atlassian.jira.plugin.s... ]
Ilia Vassilev updated RF-12896:
-------------------------------
Attachment: modules.zip
> Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: RF-12896
> URL: https://issues.jboss.org/browse/RF-12896
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.2.3.Final
> Reporter: Ilia Vassilev
> Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
>
>
> Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
> @PostConstruct
> public void postContruct() {
> TopicsContext topicsContext = TopicsContext.lookup();
> if(topicsContext == null)
> log(" - topicsContext is NULL");
> pushTK = new TopicKey(PUSH_TOPIC);
> // this will fail if topicsContext is null (NPE)
> topicsContext.getOrCreateTopic(pushTK);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months
[JBoss JIRA] (RF-12896) Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
by Ilia Vassilev (JIRA)
Ilia Vassilev created RF-12896:
----------------------------------
Summary: Richfaces TopicsContext.lookup() returns null after redeployment when Richfaces is deployed as a module in JBoss EAP 6
Key: RF-12896
URL: https://issues.jboss.org/browse/RF-12896
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.2.3.Final
Reporter: Ilia Vassilev
Attachments: jboss-as-helloworld-rf.war, modules.zip, RichBean.java
Our application uses Richfaces push functionality and makes a call to lookup the TopicsContext in the constructor of one of a backing bean. The code looks like this below. This works fine when Richfaces is packaged in the war, however when we extract the richfaces jars into a module and have our applications declare a module dependency, there is an issue when we redeploy the application. It works fine when JBoss is first started, but if we redeploy the application while JBoss is running, we are getting a NullPointerException in our application because TopicsContext.lookup() is returning null.
@PostConstruct
public void postContruct() {
TopicsContext topicsContext = TopicsContext.lookup();
if(topicsContext == null)
log(" - topicsContext is NULL");
pushTK = new TopicKey(PUSH_TOPIC);
// this will fail if topicsContext is null (NPE)
topicsContext.getOrCreateTopic(pushTK);
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 12 months