Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1304

Resource Adapter configuration corrupts standalone.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • None
    • 7.0.0.Final
    • JCA
    • None

    Description

      When defining a resource adapter in the standalone.xml which includes a config-property it is overwriten by the server which modifies the config-properties in a manner which prevents the server from booting on the next restart

      From standalone:
      <resource-adapter>
      <archive>
      jackrabbit-jca.rar
      </archive>
      <transaction-support>
      XATransaction
      </transaction-support>
      <connection-definitions>
      <connection-definition class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory" jndi-name="java:/jcr/ConnectionFactory" enabled="true" use-java-context="true" pool-name="jackrabbit" use-ccm="true">
      <config-property name="HomeDir">${jboss.server.data.dir}/jackrabbit</config-property>
      <config-property name="ConfigFile">${jboss.server.data.dir}/jackrabbit/jackrabbit.xml</config-property>
      </connection-definition>
      </connection-definitions>
      </resource-adapter>

      The config-property then becomes in the overwritten standalone.xml:
      <config-property>(HomeDir => /opt/jboss7/standalone/data/jackrabbit)</config-property>

      this causes the server to fail to parse standalone.xml and subsequently does not start on the next restart with the following error:

      ERROR [stderr] Exception in thread "Controller Boot Thread" java.lang.RuntimeException: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration

      Also, the JCA connector is not getting the correct parameters, so the resource throws an exception:

      WARN [org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri] (http--127.0.0.1-8080-6) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Failed to create session: Unable to access a repository with the following settings:
      org.apache.jackrabbit.repository.conf: ("ConfigFile" => "/opt/jboss7/standalone/data/jackrabbit/jackrabbit.xml")
      org.apache.jackrabbit.repository.home: ("HomeDir" => "/opt/jboss7/standalone/data/jackrabbit")
      Perhaps the repository you are trying to access is not available at the moment.

      This error is thrown by Jackrabbit as it cannot access the configuration file. I'm guessing that it has trouble parsing the string passed.

      Attachments

        Activity

          People

            smaestri@redhat.com Stefano Maestri
            fastroller Andrew Wheeler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: