You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Morgan M. Thompson" <mt...@istreamfs.com> on 2016/07/28 19:49:51 UTC

Error when trying to configure web session clustering

I'm trying to follow the instructions listed here () to set up web session clustering with my company's already existing application. If I don't configure a default-config.xml in the web.xml, ignite starts and both nodes see each other; however it doesn't appear that data is being stored in an ignite cache.

If I configure a default-config.xml in the web.xml, I get the following error.

Caused by: class org.apache.ignite.IgniteException: Failed to load Ignite configuration.
                at org.apache.ignite.startup.servlet.ServletContextListenerStartup.contextInitialized(ServletContextListenerStartup.java:135)
                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5396)
                at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:743)
                at org.apache.catalina.core.StandardContext.start(StandardContext.java:5965)
                ... 26 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context [springUrl=jndi:/server/META-INF/config/default-config.xml, err=Error creating bean with name 'org.apache.ignite.configuration.IgniteConfiguration#0' defined in URL [jndi:/server/META-INF/config/default-config.xml]: Cannot create inner bean 'org.apache.ignite.configuration.CacheConfiguration#487ee2da' of type [org.apache.ignite.configuration.CacheConfiguration] while setting bean property 'cacheConfiguration'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.configuration.CacheConfiguration#487ee2da' defined in URL [jndi:/server/META-INF/config/default-config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.String] for property 'name'; nested exception is java.lang.IllegalArgumentException: Method must not be null]
                at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:391)
                at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
                at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
                at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:639)
                at org.apache.ignite.startup.servlet.ServletContextListenerStartup.contextInitialized(ServletContextListenerStartup.java:132)
                ... 29 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.configuration.IgniteConfiguration#0' defined in URL [jndi:/server/META-INF/config/default-config.xml]: Cannot create inner bean 'org.apache.ignite.configuration.CacheConfiguration#487ee2da' of type [org.apache.ignite.configuration.CacheConfiguration] while setting bean property 'cacheConfiguration'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.configuration.CacheConfiguration#487ee2da' defined in URL [jndi:/server/META-INF/config/default-config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.String] for property 'name'; nested exception is java.lang.IllegalArgumentException: Method must not be null

Is my default-config.xml configured improperly? I tried finding examples online, but it's sparse.


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

<bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="cacheConfiguration">
            <bean class="org.apache.ignite.configuration.CacheConfiguration">
                <property name="name" value="session-cache"/>
                <property name="cacheMode" value="PARTITIONED"/>
                <property name="backups" value="1"/>
                <property name="evictionPolicy">
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                            <property name="maxSize" value="150000"/>
                        </bean>
                    </property>
            </bean>
        </property>
  </bean>
</beans>

Re: Error when trying to configure web session clustering

Posted by Vladislav Pyatkov <vp...@gridgain.com>.
Hello,

I see in you case, exception of class loader.
I think it will be happened because you incorrect build application
Please, see my sample.
It will deploy correctly to Glassfish full profile.

On Mon, Aug 1, 2016 at 4:30 PM, mthompson <mt...@istreamfs.com> wrote:

> I get basically the same error on Wildfly server.
>
>
> 08:41:23,677 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8)
> MSC000001: Failed to start service
> jboss.deployment.unit."tc.war".POST_MODULE:
> org.jboss.msc.service.StartException in service
> jboss.deployment.unit."tc.war".POST_MODULE: WFLYSRV0153: Failed to process
> phase POST_MODULE of deployment "tc.war"
>         at
>
> org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
>         at
>
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
>         at
>
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting
> reflective
> information for class org.apache.ignite.cache.websession.WebSessionFilter
> with ClassLoader ModuleClassLoader for Module "deployment.tc.war:main" from
> Service Module Loader
>         at
>
> org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
>         at
>
> org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
>         at
>
> org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
>         at
>
> org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
>         at
>
> org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
>         at
>
> org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
>         ... 5 more
> Caused by: java.lang.NoClassDefFoundError: javax/cache/CacheException
>         at java.lang.Class.getDeclaredFields0(Native Method)
>         at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
>         at java.lang.Class.getDeclaredFields(Class.java:1916)
>         at
>
> org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
>         at
>
> org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
>         ... 10 more
> Caused by: java.lang.ClassNotFoundException: javax.cache.CacheException
> from
> [Module "deployment.tc.war:main" from Service Module Loader]
>         at
> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
>         at
>
> org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
>         at
>
> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
>         at
>
> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
>         ... 15 more
>
> 08:41:23,682 ERROR [org.jboss.as.controller.management-operation]
> (management task-9) WFLYCTL0013: Operation ("add") failed - address:
> ([("deployment" => "tc.war")]) - failure description: {"WFLYCTL0080: Failed
> services" => {"jboss.deployment.unit.\"tc.war\".POST_MODULE" =>
> "org.jboss.msc.service.StartException in service
> jboss.deployment.unit.\"tc.war\".POST_MODULE: WFLYSRV0153: Failed to
> process
> phase POST_MODULE of deployment \"tc.war\"
>     Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting
> reflective information for class
> org.apache.ignite.cache.websession.WebSessionFilter with ClassLoader
> ModuleClassLoader for Module \"deployment.tc.war:main\" from Service Module
> Loader
>     Caused by: java.lang.NoClassDefFoundError: javax/cache/CacheException
>     Caused by: java.lang.ClassNotFoundException: javax.cache.CacheException
> from [Module \"deployment.tc.war:main\" from Service Module Loader]"}}
> 08:41:23,684 ERROR [org.jboss.as.server] (management task-9) WFLYSRV0021:
> Deploy of deployment "tc.war" was rolled back with the following failure
> message:
> {"WFLYCTL0080: Failed services" =>
> {"jboss.deployment.unit.\"tc.war\".POST_MODULE" =>
> "org.jboss.msc.service.StartException in service
> jboss.deployment.unit.\"tc.war\".POST_MODULE: WFLYSRV0153: Failed to
> process
> phase POST_MODULE of deployment \"tc.war\"
>     Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting
> reflective information for class
> org.apache.ignite.cache.websession.WebSessionFilter with ClassLoader
> ModuleClassLoader for Module \"deployment.tc.war:main\" from Service Module
> Loader
>     Caused by: java.lang.NoClassDefFoundError: javax/cache/CacheException
>     Caused by: java.lang.ClassNotFoundException: javax.cache.CacheException
> from [Module \"deployment.tc.war:main\" from Service Module Loader]"}}
> 08:41:23,956 INFO  [org.jboss.as.server.deployment] (MSC service thread
> 1-2)
> WFLYSRV0028: Stopped deployment tc.war (runtime-name: tc.war) in 271ms
>
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Error-when-trying-to-configure-web-session-clustering-tp6596p6656.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Error when trying to configure web session clustering

Posted by mthompson <mt...@istreamfs.com>.
I get basically the same error on Wildfly server.


08:41:23,677 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8)
MSC000001: Failed to start service
jboss.deployment.unit."tc.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."tc.war".POST_MODULE: WFLYSRV0153: Failed to process
phase POST_MODULE of deployment "tc.war"
        at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
        at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
        at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective
information for class org.apache.ignite.cache.websession.WebSessionFilter
with ClassLoader ModuleClassLoader for Module "deployment.tc.war:main" from
Service Module Loader
        at
org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
        at
org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
        at
org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
        at
org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
        at
org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
        at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
        ... 5 more
Caused by: java.lang.NoClassDefFoundError: javax/cache/CacheException
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
        at java.lang.Class.getDeclaredFields(Class.java:1916)
        at
org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
        at
org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
        ... 10 more
Caused by: java.lang.ClassNotFoundException: javax.cache.CacheException from
[Module "deployment.tc.war:main" from Service Module Loader]
        at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
        at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
        at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
        at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
        ... 15 more

08:41:23,682 ERROR [org.jboss.as.controller.management-operation]
(management task-9) WFLYCTL0013: Operation ("add") failed - address:
([("deployment" => "tc.war")]) - failure description: {"WFLYCTL0080: Failed
services" => {"jboss.deployment.unit.\"tc.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"tc.war\".POST_MODULE: WFLYSRV0153: Failed to process
phase POST_MODULE of deployment \"tc.war\"
    Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting
reflective information for class
org.apache.ignite.cache.websession.WebSessionFilter with ClassLoader
ModuleClassLoader for Module \"deployment.tc.war:main\" from Service Module
Loader
    Caused by: java.lang.NoClassDefFoundError: javax/cache/CacheException
    Caused by: java.lang.ClassNotFoundException: javax.cache.CacheException
from [Module \"deployment.tc.war:main\" from Service Module Loader]"}}
08:41:23,684 ERROR [org.jboss.as.server] (management task-9) WFLYSRV0021:
Deploy of deployment "tc.war" was rolled back with the following failure
message:
{"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit.\"tc.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"tc.war\".POST_MODULE: WFLYSRV0153: Failed to process
phase POST_MODULE of deployment \"tc.war\"
    Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting
reflective information for class
org.apache.ignite.cache.websession.WebSessionFilter with ClassLoader
ModuleClassLoader for Module \"deployment.tc.war:main\" from Service Module
Loader
    Caused by: java.lang.NoClassDefFoundError: javax/cache/CacheException
    Caused by: java.lang.ClassNotFoundException: javax.cache.CacheException
from [Module \"deployment.tc.war:main\" from Service Module Loader]"}}
08:41:23,956 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2)
WFLYSRV0028: Stopped deployment tc.war (runtime-name: tc.war) in 271ms




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-when-trying-to-configure-web-session-clustering-tp6596p6656.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Error when trying to configure web session clustering

Posted by vkulichenko <va...@gmail.com>.
It should work with GlassFish, but I would still try to run on another server
and see if it works there.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-when-trying-to-configure-web-session-clustering-tp6596p6634.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Error when trying to configure web session clustering

Posted by mthompson <mt...@istreamfs.com>.
Regarding environment, I am trying to run it on a Glassfish server, as that
is what we currently use. I'm willing to try another server if it is known
that ignite does not work with Glassfish.

*Web.xml*
<?xml version="1.0" encoding="UTF-8"?>
<web-app id=&quot;fs&quot; version=&quot;3.0&quot;
xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation=&quot;http:$
    &lt;distributable/>
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>SecureIt</web-resource-name>
            <url-pattern>/*</url-pattern>
            <http-method>PUT</http-method>
            <http-method>OPTIONS</http-method>
            <http-method>DELETE</http-method>
            <http-method>TRACE</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>NoOne</role-name>
        </auth-constraint>
    </security-constraint>
    <filter>
        <filter-name>IgniteWebSessionsFilter</filter-name>
       
<filter-class>org.apache.ignite.cache.websession.WebSessionFilter</filter-class>
    </filter>
    <filter>
        <filter-name>ResponseOverrideFilter</filter-name>
       
<filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
    </filter>
   <filter-mapping>
        <filter-name>IgniteWebSessionsFilter</filter-name>
        <url-pattern>/*</url-pattern>
   </filter-mapping>
<context-param>
   <param-name>IgniteConfigurationFilePath</param-name>
   <param-value>config/default-config.xml</param-value>
</context-param>
<context-param>
   <param-name>IgniteWebSessionsCacheName</param-name>
   <param-value>session-cache</param-value>
</context-param>
   <filter-mapping>
        <filter-name>ResponseOverrideFilter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>ResponseOverrideFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    
    <listener>
       
<listener-class>org.apache.ignite.startup.servlet.ServletContextListenerStartup</listener-class>
    </listener>
    <servlet>
        <servlet-name>AxisServlet</servlet-name>
        <servlet-class>
        org.apache.axis.transport.http.AxisServlet
    </servlet-class>
    </servlet>
    <servlet>
        <servlet-name>AdminServlet</servlet-name>
        <servlet-class>
        org.apache.axis.transport.http.AdminServlet
    </servlet-class>
        <load-on-startup>100</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>SOAPMonitorService</servlet-name>
        <servlet-class>
        org.apache.axis.monitor.SOAPMonitorService
    </servlet-class>
        <init-param>
            <param-name>SOAPMonitorPort</param-name>
            <param-value>5001</param-value>
        </init-param>
        <load-on-startup>100</load-on-startup>
    </servlet>
    
    <servlet>
        <servlet-name>action</servlet-name>
       
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml        
      </param-value>
        </init-param>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>detail</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>null</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
    
    
    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <mime-mapping>
        <extension>wsdl</extension>
        <mime-type>text/xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xsd</extension>
        <mime-type>text/xml</mime-type>
    </mime-mapping>
    
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

Log can be found  here <http://pastebin.com/HvUSSKBG>  



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-when-trying-to-configure-web-session-clustering-tp6596p6617.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Error when trying to configure web session clustering

Posted by vkulichenko <va...@gmail.com>.
Hi,

Can you provide the full log and your web.xml file? Actually, this behavior
is weird and looks like some kind of classloading issue. Is there anything
specific about your environment?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-when-trying-to-configure-web-session-clustering-tp6596p6605.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.