1 Reply Latest reply on Aug 24, 2006 8:52 AM by Kamil Demecki

    problem with session, logging log4j

    Kamil Demecki Novice

      Hi

      I have app which were running in cluster and was configured in that way. Now i need run this app on one host. I have problem when my app calls function request.getSession(). It returns null and i got NullPointerException in code like below.

      request.getSession().getAttribute(...);
      request.getSession().setAttribute(..., ....);
      


      Something is strange, because i see this behavoiur only if I set up log4j with ERROR for com.myapp (turn off debugging in production env). When I turn debug on, everything is OK.

      Version: 4.0.3SP1(build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)
      JVM Version: 1.5.0-b64 (Sun Microsystems Inc.)
      OS: Linux 2.6.11.4-20a-smp (i386)

      Any suggestions? It's problem with session replication?

      Structure catalogs (show somoething about running services)
      conf:
      jacorb.properties jboss-service.xml log4j-20060823.xml login-config.xml standardjaws.xml standardjboss.xml
      jboss-minimal.xml jndi.properties log4j.xml props standardjbosscmp-jdbc.xml xmdesc
      
      data:
      hypersonic xmbean-attrs
      
      deploy:
      bsh-deployer.xml httpha-invoker.sar jms scheduler-service.xml
      cache-invalidation-service.xml iiop-service.xml jmx-console.war snmp-adaptor.sar
      client-deployer-service.xml jboss-aop-jdk50.deployer jmx-invoker-service.xml sqlexception-service.xml
      cluster-service.xml jboss-bean.deployer jsr88-service.xml myapp-ds.xml
      deploy-hasingleton-service.xml jboss-ha-local-jdbc.rar juddi-service.sar myapp-ear-1.1.0.ear
      deploy.last jboss-ha-xa-jdbc.rar mail-ra.rar myapp-modul-autentykacja-1.0.0.sar
      ear-deployer.xml jbossjca-service.xml mail-service.xml myapp-service.xml
      ejb3.deployer jboss-local-jdbc.rar management myapp-xa-ds.bak
      ejb3-interceptors-aop.xml jbossweb-tomcat55.sar monitoring-service.xml tc5-cluster-service.xml
      ejb-deployer.xml jboss-ws4ee.sar properties-service.xml uuid-key-generator.sar
      hsqldb-ds.xml jboss-xa-jdbc.rar schedule-manager-service.xml
      
      deploy-hasingleton:
      jms
      
      farm:
      cluster-examples-service.xml
      
      lib:
      activation.jar cglib-2.1_2jboss.jar jbossha.jar jbossmq.jar log4j.jar
      antlr-2.7.5H3.jar commons-collections.jar jboss-hibernate.jar jboss-remoting.jar mail.jar
      asm-attrs.jar commons-httpclient.jar jboss-iiop.jar jboss-saaj.jar mail-plugin.jar
      asm.jar commons-logging.jar jboss-j2ee.jar jbosssx.jar pgsql-20051125.jar
      autonumber-plugin.jar hsqldb.jar jboss.jar jboss-transaction.jar properties-plugin.jar
      avalon-framework.jar hsqldb-plugin.jar jboss-jaxrpc.jar jboss-xb.jar scheduler-plugin-example.jar
      bcel.jar jacorb.jar jboss-jca.jar jgroups.jar scheduler-plugin.jar
      bindingservice-plugin.jar javax.servlet.jar jboss-jsr77.jar jmx-adaptor-plugin.jar snmp-support.jar
      bsf.jar javax.servlet.jsp.jar jboss-jsr88.jar jnpserver.jar xmlentitymgr.jar
      bsh-1.3.0.jar jboss-cache.jar jboss-management.jar jpl-pattern.jar
      bsh-deployer.jar jboss-common-jdbc-wrapper.jar jboss-monitoring.jar jpl-util.jar
      
      log:
      boot.log server.log
      
      tmp:
      aopdynclasses deploy server58045.xml
      
      work:
      jboss.web