1 Reply Latest reply on Mar 11, 2016 9:05 AM by Galder Zamarreño

    Failing initializing external config.xml with Jboss eap 6.2 Infinispan 5.2.7

    Balasubramanian Ponmariappan Newbie

      Hi,

             i have Ear file with two web application. we have separate Jaas auth module. configured under <JBOSS_HOME>\module\. we have added cache for logged in user using Inifnispan at the JAAS Module. we are expecting configure for cluster mode. we are not configured infinispan configuration on standalone.xml or domain.xml. we have separate xml file. need to use same ear and auth module for weblogic environment also. At the time of initializing infinispan. its giving below error message.

       

      [Server:server-one] 20:44:37,175 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2) org.infinispan.config.ConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1]

      [Server:server-one] 20:44:37,176 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2) Message: Unexpected element '{urn:infinispan:config:5.2}infinispan'

      [Server:server-one]

      [Server:server-one] 20:44:37,176 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:87)

      [Server:server-one]

      [Server:server-one] 20:44:37,176 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:353)

      [Server:server-one]

      [Server:server-one] 20:44:37,176 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:326)

      [Server:server-one]

      [Server:server-one] 20:44:37,177 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:313)

      [Server:server-one]

      [Server:server-one] 20:44:37,177 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at com.gennext.core.security.authn.module.CustomInfiniSpanCache.<clinit>(CustomInfiniSpanCache.java:33)

      [Server:server-one]

      [Server:server-one] 20:44:37,177 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at com.gennext.core.security.authn.module.SDPDataSourceLoginModule.<clinit>(SDPDataSourceLoginModule.java:92)

      [Server:server-one]

      [Server:server-one] 20:44:37,177 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at java.lang.Class.forName0(Native Method)

      [Server:server-one]

      [Server:server-one] 20:44:37,178 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at java.lang.Class.forName(Class.java:278)

      [Server:server-one]

      [Server:server-one] 20:44:37,178 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:718)

      [Server:server-one]

      [Server:server-one] 20:44:37,178 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)

      [Server:server-one]

      [Server:server-one] 20:44:37,178 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690)

      [Server:server-one]

      [Server:server-one] 20:44:37,179 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688)

      [Server:server-one]

      [Server:server-one] 20:44:37,179 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at java.security.AccessController.doPrivileged(Native Method)

      [Server:server-one]

      [Server:server-one] 20:44:37,179 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687)

      [Server:server-one]

      [Server:server-one] 20:44:37,179 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at javax.security.auth.login.LoginContext.login(LoginContext.java:595)

      [Server:server-one]

      [Server:server-one] 20:44:37,180 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:408)

      [Server:server-one]

      [Server:server-one] 20:44:37,180 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:345)

      [Server:server-one]

      [Server:server-one] 20:44:37,181 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:323)

      [Server:server-one]

      [Server:server-one] 20:44:37,181 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:146)

      [Server:server-one]

      [Server:server-one] 20:44:37,181 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:216)

      [Server:server-one]

      [Server:server-one] 20:44:37,182 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:280)

      [Server:server-one]

      [Server:server-one] 20:44:37,182 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:391)

      [Server:server-one]

      [Server:server-one] 20:44:37,182 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134)

      [Server:server-one]

      [Server:server-one] 20:44:37,182 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99)

      [Server:server-one]

      [Server:server-one] 20:44:37,182 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92)

      [Server:server-one]

      [Server:server-one] 20:44:37,183 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64)

      [Server:server-one]

      [Server:server-one] 20:44:37,183 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)

      [Server:server-one]

      [Server:server-one] 20:44:37,183 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)

      [Server:server-one]

      [Server:server-one] 20:44:37,183 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)

      [Server:server-one]

      [Server:server-one] 20:44:37,183 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)

      [Server:server-one]

      [Server:server-one] 20:44:37,183 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)

      [Server:server-one]

      [Server:server-one] 20:44:37,184 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

      [Server:server-one]

      [Server:server-one] 20:44:37,184 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)

      [Server:server-one]

      [Server:server-one] 20:44:37,184 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)

      [Server:server-one]

      [Server:server-one] 20:44:37,184 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at java.lang.Thread.run(Thread.java:745)

      [Server:server-one]

      [Server:server-one] 20:44:37,184 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2) Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1]

      [Server:server-one] 20:44:37,185 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2) Message: Unexpected element '{urn:infinispan:config:5.2}infinispan'

      [Server:server-one]

      [Server:server-one] 20:44:37,185 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108)

      [Server:server-one]

      [Server:server-one] 20:44:37,185 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)

      [Server:server-one]

      [Server:server-one] 20:44:37,185 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:77)

      [Server:server-one]

      [Server:server-one] 20:44:37,185 ERROR [stderr] (http-127.0.0.1/127.0.0.1:18080-2)      ... 34 more

      [Server:server-one]

      [Server:server-one] 20:44:37,185 ERROR [org.apache.catalina.connector] (http-127.0.0.1/127.0.0.1:18080-2) JBWEB001018: An exception or error occurred in the container during the request processing: java.lang.ExceptionInInitializerE

      [Server:server-one]     at com.gennext.core.security.authn.module.SDPDataSourceLoginModule.<clinit>(SDPDataSourceLoginModule.java:92) [sdp-authmodules.jar:]

      [Server:server-one]     at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at java.lang.Class.forName(Class.java:278) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at javax.security.auth.login.LoginContext.invoke(LoginContext.java:718) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at javax.security.auth.login.LoginContext.login(LoginContext.java:595) [rt.jar:1.7.0_80-ea]

      [Server:server-one]     at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:408) [picketbox-infinispan-4.0.19.SP2-redhat-1.jar:4.0.19.SP2-redhat-1]

      [Server:server-one]     at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:345) [picketbox-infinispan-4.0.19.SP2-redhat-1.jar:4.0.19.SP2-redhat-1]

      [Server:server-one]     at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:323) [picketbox-infinispan-4.0.19.SP2-redhat-1.jar:4.0.19.SP2-redhat-1]

      [Server:server-one]     at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:146) [picketbox-infinispan-4.0.19.SP2-redhat-1.jar:4.0.19.SP2-redhat-1]

      [Server:server-one]     at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:216) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

      [Server:server-one]     at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:280) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:391) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

      [Server:server-one]     at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

      [Server:server-one]     at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

      [Server:server-one]     at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

      [Server:server-one]     at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

      [Server:server-one]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

      [Server:server-one]     at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80-ea]

      [Server:server-one] Caused by: java.lang.RuntimeException: Unable to Initialize Infini Cache Container

      [Server:server-one]     at com.gennext.core.security.authn.module.CustomInfiniSpanCache.<clinit>(CustomInfiniSpanCache.java:40) [sdp-authmodules.jar:]

      [Server:server-one]     ... 30 more

      [Server:server-one]

       

      Below is the jboss-deployment-structure.xml

      <?xml version="1.0"?>

      <jboss-deployment-structure>

        <ear-subdeployments-isolated>true</ear-subdeployments-isolated>

        <deployment>

        <exclusions>

        <module name="org.hibernate.validator"/>

        </exclusions>

            <dependencies>

            <module name="org.apache.log4j" />

            <module name="org.infinispan" services="import" />

             <!-- <module name="org.infinispan" services="import" export="true" /> -->

              <system>

              <paths>

              <path name="com/sun/org/apache/xerces/internal/jaxp/datatype"/>

              </paths>

              </system>

              </dependencies>

              <exclude-subsystems>

                  <subsystem name="jaxrs" />

              </exclude-subsystems>

        </deployment>

        <sub-deployment name="genextmain.war">

        <!-- Updated and merged this to enable SSO based on OpenAM document

        http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/install-guide/index.html#prep-jboss-600-601

        -->

          <exclusions>

            <module name="sun.jdk" />

            <module name="org.hibernate.validator"/>

          </exclusions>

          <exclude-subsystems>

           <subsystem name="jaxrs" />

           <subsystem name="webservices" />

          </exclude-subsystems>

         <dependencies>

           <module name="sun.jdk" >

               <imports>

            <exclude-set>

        <path name="com/sun/org/apache/xml/internal/security/transforms/implementations"/>

            </exclude-set>

            </imports>

          </module>

        <!-- <module name="com.sun.xml.bind"/> or try to put exactly from openAM doc-->

              <module name="org.jboss.remote-naming"/>

        <module name="org.jboss.xnio"/>

        <module name="org.hornetq"/>

        <module name="org.infinispan" services="import" />

          <system>

           <paths>

            <path name="sun/security/x509" />

            <path name="com/sun/org/apache/xpath/internal" />

            <path name="com/sun/org/apache/xerces/internal/dom" />

            <path name="com/sun/org/apache/xml/internal/utils" />

           </paths>

          </system>

         </dependencies>

       

       

        </sub-deployment>

        <sub-deployment name="genextrest.war">

        <exclusions>

        <module name="org.hibernate.validator"/>

        </exclusions>

          <dependencies>

            <module name="com.sun.xml.bind"/>

            <module name="org.jboss.remote-naming"/>

        <module name="org.jboss.xnio"/>

        <module name="org.hornetq"/>

        <module name="org.infinispan" services="import" />

          </dependencies>

        </sub-deployment>

      </jboss-deployment-structure>

       

       

      Below is my module.xml file

      <module xmlns="urn:jboss:module:1.1" name="com.genext.auth">

          <resources>

              <resource-root path="genext-authmodules.jar"/>

              <!-- Insert resources here -->

          </resources>

       

       

          <dependencies>

              <module name="javax.api"/>

              <module name="javax.security.jacc.api"/>

              <module name="javax.xml.bind.api"/>

              <module name="org.jboss.as.web" />

        <module name="org.apache.http"/>

        <module name="org.infinispan" services="import" export="true" />

          </dependencies>

       

       

      </module>

       

      Below is my infinispan configuration file.

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

      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd" xmlns="urn:infinispan:config:5.2">

          <global>

       

       

            <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">

               <properties>

                  <property name="threadNamePrefix" value="EvictionThread"/>

               </properties>

            </evictionScheduledExecutor>

       

       

              <replicationQueueScheduledExecutor

                  factory="org.infinispan.executors.DefaultScheduledExecutorFactory">

                  <properties>

                      <property name="threadNamePrefix"

                          value="ReplicationQueueThread" />

                  </properties>

              </replicationQueueScheduledExecutor>

       

       

              <globalJmxStatistics enabled="false" jmxDomain="infinispan" />

       

       

              <transport clusterName="PC_SITE_1"

                  distributedSyncTimeout="50000"

                  transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"

                  nodeName="">

                  <properties>

                      <property name="configurationFile"

                          value="jgroups-udp.xml" />

                  </properties>

              </transport>

       

       

              <serialization

                  marshallerClass="org.infinispan.marshall.VersionAwareMarshaller"

                  version="1.0" />

       

       

       

       

              <shutdown hookBehavior="DEFAULT" />

       

      <!-- <transport>

               <properties>

                  <property name="configurationFile" value="jgroups-udp.xml" />

               </properties>

            </transport>-->

       

       

          </global>

       

       

          <default>

              <locking isolationLevel="READ_COMMITTED"

                  lockAcquisitionTimeout="60000" writeSkewCheck="false"

                  concurrencyLevel="5000" useLockStriping="false" />

              <jmxStatistics enabled="false" />

              <storeAsBinary enabled="true"/>

          </default>

       

       

       

       

          <namedCache name="SDP_LOGIN_CACHE">

            <clustering mode="replication">

                  <sync replTimeout="360000" />

                 <stateTransfer timeout="360000"  fetchInMemoryState="true" />

            </clustering>

         <eviction maxEntries="1000" strategy="FIFO" />

            <expiration wakeUpInterval="500" lifespan="60000" maxIdle="1000" />

           </namedCache>

       

       

      </infinispan>

       

      i  tried with same configuration for my test my Java Standard Edition. it was working fine.

       

      Please suggest me to solve this issue.