Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3122

Blueprint bean loaded multiple times

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.6
    • None
    • None
    • None

    Description

      The attached jar contains following class

      package com;
      public class Test {
         public void init() throws Exception { System.out.println("Starting ..."); }
      }
      

      The attached blueprint file initializes the bean using the init method. If the both files are deployed using hot deploy, the method init seems to be called twice after Karaf restart.

      karaf@root> Starting ...
      Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
      Compiler warnings:
        WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
      Starting ...
      

      After deleting the data directory before starting Karaf, the method is called once

      karaf@root> Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
      Compiler warnings:
        WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
      Starting ...
      

      The bean is probably started once from the cached bundle and next is refreshed when it is detected in deploy directory.

      This effect does not occur in Karaf 2.x, 3.0.x and master

      Attachments

        1. test.xml
          0.4 kB
          Krzysztof Sobkowiak
        2. test.jar
          0.9 kB
          Krzysztof Sobkowiak

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sobkowiak Krzysztof Sobkowiak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: