0 Replies Latest reply on Jan 22, 2016 10:33 AM by Sanjeev Jinka

    JBoss JackRabbit XAPool - No connection allowed for anonymous user

    Sanjeev Jinka Newbie

      Hi,

       

      We are seeing these warning messages in our logs. Looks like JBoss is trying to create connections for the XA Pool and is running into this AnonymousConnection class. Application is working fine otherwise. User sessions are created and saved with no issues. Has this to do with how Jackrabbit security domain is configured?

       

      Below is the warning log and configuration. Appreciate you help.

       

      Environment --- JBoss EAP 6.1.1 (JBoss AS 7.2.1) / JackRabbit 2.8.1

       

      11:01:02,487 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016009: Caught:: java.lang.UnsupportedOperationException: No connection allowed for anonymous user. 
              at org.apache.jackrabbit.jca.AnonymousConnection.getConnection(AnonymousConnection.java:110) 
              at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.openConnection(XAResourceRecoveryImpl.java:426) 
              at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.getXAResources(XAResourceRecoveryImpl.java:176) 
              at com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper.getXAResources(XAResourceRecoveryHelperWrapper.java:51) [jbossjts-integration-4.17.7.Final-redhat-4.jar:4.17.7.Final-redhat-4] 
              at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:500) [jbossjts-jacorb-4.17.7.Final-redhat-4.jar:4.17.7.Final-redhat-4] 
              at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:158) [jbossjts-jacorb-4.17.7.Final-redhat-4.jar:4.17.7.Final-redhat-4] 
              at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:743) [jbossjts-jacorb-4.17.7.Final-redhat-4.jar:4.17.7.Final-redhat-4] 
              at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.7.Final-redhat-4.jar:4.17.7.Final-redhat-4] 
      

       

      Standalone-full.xml

              <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
                  <resource-adapters>
                      <resource-adapter id="jackrabbit-jca-2.8.1.rar">
                          <archive>
                              jackrabbit-jca-2.8.1.rar 
                          </archive>
                          <transaction-support>XATransaction</transaction-support>
                          <connection-definitions>
                              <connection-definition class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory" jndi-name="java:/jcr/local" enabled="true" use-java-context="true" pool-name="JCRPool" use-ccm="true">
                                  <config-property name="ConfigFile">
                                      /opt/jackrabbit/repository.xml 
                                  </config-property>
                                  <config-property name="HomeDir">
                                      /opt/jackrabbit 
                                  </config-property>
                                   <xa-pool>
                                      <min-pool-size>3</min-pool-size>
                                      <max-pool-size>40</max-pool-size>
                                      <prefill>true</prefill>
                                      <use-strict-min>true</use-strict-min>
                                  </xa-pool>
                                  <security>
                                      <security-domain>Jackrabbit</security-domain>
                                  </security>
                              </connection-definition>
                          </connection-definitions>
                      </resource-adapter>
                  </resource-adapters>
              </subsystem>
      
                      <security-domain name="Jackrabbit" cache-type="default">
                          <authentication>
                              <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
                                  <module-option name="unauthenticatedIdentity" value="ANONYMOUS"/>
                                  <module-option name="dsJndiName" value="java:/jdbc/jcr"/>
                                  <module-option name="principalsQuery" value="SELECT * FROM JCR_USER WHERE userid = ?"/>
                                  <module-option name="rolesQuery" value="SELECT ROLE_DESC, 'Roles' FROM JCR_PROJ_ROLE WHERE USERID=?"/>
                              </login-module>
                          </authentication>
                      </security-domain>
      

       

      repository.xml

          <Security appName="Jackrabbit">
              <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security">
              </SecurityManager>
               
              <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
                  
              </AccessManager>
          </Security>
      

       

      Response on JackRabbit forum

      this is a JBoss issue, not Jackrabbit.

      You got the security domain wrong. Either you provide the credentials (user/PW) as an xa property directly in the datasource or you choose the proper login module in the security domain.

      Hope these pointers help you further. I think it would be better to ask this question in a JBoss related forum.

      Thanks,

      Sanjeev