Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7349

Bundle wiring loading issue: getting No XPathFactory implementation found for the object model: http://saxon.sf.net/jaxp/xpath/om

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-6.x-GA
    • jboss-fuse-6.3
    • Camel, Karaf
    • None
    • % %

      There is a reproducer example attached. Here's what the issue description is:

      When enabling the karaf.lock option, the bundle explicitly using Saxon as XPathFactory fail to start when JBoss Fuse is starting.

      karaf.lock.level=100
      karaf.lock=true
      karaf.lock.class=org.apache.karaf.main.MySQLJDBCLock
      karaf.lock.jdbc.url=jdbc:mysql://127.0.0.1:3306/test
      karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
      karaf.lock.jdbc.user=root
      karaf.lock.jdbc.password=
      karaf.lock.jdbc.table=KARAF_LOCK
      karaf.lock.jdbc.clustername=karaf
      karaf.lock.jdbc.timeout=30
      

      Then have the below entry in the /bin/karaf script:

      # Add the jars in the lib dir
          for file in "$KARAF_HOME"/lib/karaf*.jar
          do
              if [ -z "$CLASSPATH" ]; then
                  CLASSPATH="$file"
              else
                  CLASSPATH="$CLASSPATH:$file"
              fi
          done
          CLASSPATH="$CLASSPATH:$KARAF_HOME/lib/mysql-connector-java-5.0.8-bin.jar"
      
      
      • First, my Fuse server instance and already running and the bundle is already deployed. I then modify the system.properties with the karaf.lock.level=100 entry and i do not see any issues.
      • Next, i then uninstall the bundle. I install the bundle again, but can't see any issues.
      • Then i do a 'dev:restart' of Fuse, with the bundle deployed and i can see the ERROR message on the logs.
      • After that, if i simply do a refresh <bundle-id>, the problem goes away.

      Below is the error message i can see:

      15:11:54,030 | ERROR | FelixStartLevel  | BlueprintCamelContext            | 234 - org.apache.camel.camel-blueprint - 2.17.0.redhat-630254 | Error occurred during starting Camel: CamelContext(saxon-test) due No XPathFctory implementation found for the object model: http://saxon.sf.net/jaxp/xpath/om
      javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://saxon.sf.net/jaxp/xpath/om
      	at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)[:2.7.0]
      

      Also, customer reports that if we set the start-level for all bundles using XPath to a value > lock-level everything works as expected. I believe a manual intervention should not be required for this to load after Fuse has been restarted.

        1. active_bundles_lock_level.txt
          13 kB
          Viral Gohel

              ggrzybek Grzegorz Grzybek
              rhn-support-vgohel Viral Gohel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: