You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Dana Shaw <ds...@medata.com> on 2018/06/02 01:06:56 UTC

Session.removeAttribute is not working as expected

Posted a while back, am still struggling with the same issue.  Really want to use ignite but am struggling to get this working correctly.

What I'm noticing is that  session.removeAttribute doesn't really remove the
attribute, it only sets the value to null.  I'm not sure if this is a setup
issue on my end or what.  I thought this might be related to jsf, removed jsf and the issue persists.

Any input would be helpful, has anyone else seen this?

Thanks in advance and please help!

dshaw

The closest issue that I could find to my particular issue was:
https://github.com/apache/ignite/pull/2243

I patched my local ignite repo with #2243 , redeployed to tomcat and 2
ignite nodes but am seeing the same issue.

The closest issue that I could find to my particular issue was: 
https://github.com/apache/ignite/pull/2243


My setup (client/server): 
- Ignite 2.5.0 (2 node cluster)
- Apache Tomcat 7
- Java 9 

tomcat setenv.sh 
#!/bin/sh 
export JAVA_HOME=/opt/java/jdk-10.0.1 
export PATH=$JAVA_HOME/bin:$PATH 
export CATALINA_OPTS="--add-exports java.base/jdk.internal.misc=ALL-UNNAMED 
    --add-exports java.base/sun.nio.ch=ALL-UNNAMED 
    --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED 
    --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED 
    --add-modules java.xml.bind" 
export CATALINA_HOME=/opt/apache/apache-tomcat-7.0.86_node 


##### Config use by 3 tomcat notes
client-config.xml (used by tomcat 7) 


<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">





<!--
        Alter configuration below as needed.
    -->
    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
      <property name="clientMode" value="true"/>

      <property name="discoverySpi">
    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
      <property name="ipFinder">
        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
          <property name="addresses">
            <list>
              <value>172.24.2.156:47500..47509</value>
              <value>172.24.3.28:47500..47509</value>
            </list>
          </property>
        </bean>
      </property>
    </bean>
  </property>
   </bean>
</beans>



##### Config use by 2 ignite nodes

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util" 
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/util
       http://www.springframework.org/schema/util/spring-util.xsd">
    <!--
        Alter configuration below as needed.
    -->
    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">

        <!-- Enable cache events. -->
        <property name="includeEventTypes">
                <util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/>
        </property>

        <property name="cacheConfiguration">
            <list>
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <!-- Cache name. -->
                    <property name="name" value="medata-replicated"/>
                    <!-- Cache mode. -->
                    <property name="cacheMode" value="REPLICATED"/>
                </bean>
            </list>
        </property>
        <property name="discoverySpi">
                <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                        <property name="ipFinder">
                                <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                                        <property name="addresses">
                                                <list>
                                                        <value>172.24.2.156:47500..47509</value>
                                                        <value>172.24.3.28:47500..47509</value>
                                                </list>
                                        </property>
                                </bean>
                        </property>
                </bean>
        </property>
    </bean>
</beans>
~        





Re: Session.removeAttribute is not working as expected

Posted by Roman Guseinov <ro...@gromtech.ru>.
Hi,

Thanks for the sample project. I will take a look.

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Session.removeAttribute is not working as expected

Posted by Roman Guseinov <ro...@gromtech.ru>.
Hi,

I was not able to run your project. But I created a small Maven one and
reproduced the same issue.

I changed a little bit the ticket description
https://issues.apache.org/jira/browse/IGNITE-8786 . I hope it will help
contributors to reproduce the issue and create a fix.

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Session.removeAttribute is not working as expected

Posted by Dana Shaw <ds...@medata.com>.
I've updated: https://github.com/daynok/ignite-webapp

Made sure all dependencies where compiled against jdk8 (ignite, spring) and retested with

-  jdk8
- tomcat 7
- ignite 2.5

Still seeing the same issue... no idea why.

In the git project I've included both ignite nodes.
----- Original Message -----
From: Dana Shaw <ds...@medata.com>
To: user@ignite.apache.org
Sent: Mon, 04 Jun 2018 19:28:21 -0700 (PDT)
Subject: Re: Session.removeAttribute is not working as expected

Thanks for the response!

Session.removeattibute is not removing the attributes, its just setting the value to null.  

Sample project: https://github.com/daynok/ignite-webapp

I've seen this behavior in both java 9 and 10.  

I will try java 8 and and see if that fixes things. 

Thanks again!

----- Original Message -----
From: Roman Guseinov <ro...@gromtech.ru>
To: user@ignite.apache.org
Sent: Sun, 03 Jun 2018 21:48:43 -0700 (PDT)
Subject: Re: Session.removeAttribute is not working as expected

Hi,

1. Could you please clarify what exactly doesn't work as expected? Does
session.attributeNames() result include removed attributes?

2. JAVA_HOME=/opt/java/jdk-10.0.1 - I'm not sure that Apache Ignite was
tested on Java 10. Could you try to reproduce the issue on JDK8?

3. Could you share a reproducer - simple project on GitHub?

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/



Re: Session.removeAttribute is not working as expected

Posted by Dana Shaw <ds...@medata.com>.
Thanks for the response!

Session.removeattibute is not removing the attributes, its just setting the value to null.  

Sample project: https://github.com/daynok/ignite-webapp

I've seen this behavior in both java 9 and 10.  

I will try java 8 and and see if that fixes things. 

Thanks again!

----- Original Message -----
From: Roman Guseinov <ro...@gromtech.ru>
To: user@ignite.apache.org
Sent: Sun, 03 Jun 2018 21:48:43 -0700 (PDT)
Subject: Re: Session.removeAttribute is not working as expected

Hi,

1. Could you please clarify what exactly doesn't work as expected? Does
session.attributeNames() result include removed attributes?

2. JAVA_HOME=/opt/java/jdk-10.0.1 - I'm not sure that Apache Ignite was
tested on Java 10. Could you try to reproduce the issue on JDK8?

3. Could you share a reproducer - simple project on GitHub?

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Session.removeAttribute is not working as expected

Posted by Roman Guseinov <ro...@gromtech.ru>.
Hi,

1. Could you please clarify what exactly doesn't work as expected? Does
session.attributeNames() result include removed attributes?

2. JAVA_HOME=/opt/java/jdk-10.0.1 - I'm not sure that Apache Ignite was
tested on Java 10. Could you try to reproduce the issue on JDK8?

3. Could you share a reproducer - simple project on GitHub?

Best Regards,
Roman



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/