[weld-issues] [JBoss JIRA] Commented: (WELD-338) weld-numberguess example doesn't work with jboss-6.0.0.M1 in cluster

Martin Gencur (JIRA) jira-events at lists.jboss.org
Wed Dec 16 08:53:30 EST 2009


    [ https://jira.jboss.org/jira/browse/WELD-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12500320#action_12500320 ] 

Martin Gencur commented on WELD-338:
------------------------------------

I did some exploration through debugging jbossAS server. This warning:  "Problem accessing session data : class java.lang.NullPointerException null " is caused because session attributes are not set in the "distributed cache". 


Calling  getUnMarshalledValue(distributedCacheData.get(ATTRIBUTE_KEY)) from line 115 in file SessionBasedJBossCacheService.java  ( http://anonsvn.jboss.org/repos/jbossas/projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/SessionBasedJBossCacheService.java)  throws RuntimException because of null value of "obj" object on line 706 at file AbstractJBossCacheService.java   ( http://anonsvn.jboss.org/repos/jbossas/projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java). This object represents a Map (Map<String, Object>) of session attributes and those are not present 




> weld-numberguess example doesn't work with jboss-6.0.0.M1 in cluster
> --------------------------------------------------------------------
>
>                 Key: WELD-338
>                 URL: https://jira.jboss.org/jira/browse/WELD-338
>             Project: Weld
>          Issue Type: Bug
>          Components: Examples
>    Affects Versions: 1.0.0.GA
>            Reporter: Martin Gencur
>             Fix For: 1.0.1.CR1
>
>
> Trying to continue with the same session id on different jboss instance and web browser leads to the following exception on the instance's console:
> 12:41:21,767 WARN  [SessionBasedJBossCacheService] Problem accessing session data : class java.lang.NullPointerException null
> Steps to reproduce:
> 1) download jboss-6.0.0.M1 (for example from http://reports.qa.atl.jboss.com/release_tests/binaries/JBossAS/jboss-6.0.0.M1.zip)
> 2) unzip it twice to different folders
> 3) run the first instance from its bin directory: ./run.sh -c all -g DocsPartition -u 239.255.101.101 -b localhost -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-default
> 4) run the second instance from its bin directory: ./run.sh -c all -g DocsPartition -u 239.255.101.101 -b localhost -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-01
> (after a while both instances know about one another ( All Members of cluster = 2))
> 5) edit examples/jsf/numberguess/src/main/webapp-jboss5/WEB-INF/web.xml   (add <distributable/> as its first tag so that the application.....is enabled for a cluster environment ( !!! I don't know for sure if it is enough, maybe this is the problem !!!)
> 6) run mvn package in examples/jsf/numberguess
> 7) copy resulting war file (weld-numberguess.war) from numberguess/target/  directory  to serve/all/farm directory at first jbossAS instance
> 8) remove cookies for "localhost" domain from web browser, disable cookies
> 9) go to http://localhost:8080/weld-numberguess/home.jsf, play for 2-3 times with application (try to guess a number)
> 10) copy&paste the url (for example "http://localhost:8080/weld-numberguess/home.jsf;jsessionid=VBobYX3Itd9fUI-qXhcucw__") into another window with cookies disabled, change port number from 8080 to 8180 and go to the page
> 11) now you can see the exception in the second jboss instance's console and the application behaves like it doesn't know this session and starts from scratch

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list