java.lang.IllegalStateException: Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath?

SpringSource Issue Tracker | Sam Brannen | 7 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Download build slices-1.0.0.CI-B27 and perform the following: - cd projects/com.springsource.osgi.slices.test/ - ant clean test You'll get the following build error: {code} test.do: [mkdir] Created dir: /opt/springsource/slices-1.0.0.CI-B27/projects/com.springsource.osgi.slices.test/target/test-classes [s:javac] Compiling 8 source files to /opt/springsource/slices-1.0.0.CI-B27/projects/com.springsource.osgi.slices.test/target/test-classes [copy] Copying 16 files to /opt/springsource/slices-1.0.0.CI-B27/projects/com.springsource.osgi.slices.test/target/test-classes [junit] Testsuite: com.springsource.osgi.slices.test.BasicDeployLifecycleTests [junit] Tests run: 0, Failures: 0, Errors: 1, Time elapsed: 2.01 sec [junit] [junit] Testcase: com.springsource.osgi.slices.test.BasicDeployLifecycleTests: Caused an ERROR [junit] Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath? [junit] java.lang.IllegalStateException: Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath? [junit] at com.springsource.osgi.launcher.FrameworkFactoryLocator.uniqueServiceFromLoader(FrameworkFactoryLocator.java:53) [junit] at com.springsource.osgi.launcher.FrameworkFactoryLocator.createFrameworkFactory(FrameworkFactoryLocator.java:44) [junit] at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:153) [junit] at com.springsource.osgi.test.framework.OsgiTestRunner.launchOsgi(OsgiTestRunner.java:93) [junit] at com.springsource.osgi.test.framework.OsgiTestRunner.run(OsgiTestRunner.java:50) {code}

    SpringSource Issue Tracker | 7 years ago | Sam Brannen
    java.lang.IllegalStateException: Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath?
  2. 0

    Download build slices-1.0.0.CI-B27 and perform the following: - cd projects/com.springsource.osgi.slices.test/ - ant clean test You'll get the following build error: {code} test.do: [mkdir] Created dir: /opt/springsource/slices-1.0.0.CI-B27/projects/com.springsource.osgi.slices.test/target/test-classes [s:javac] Compiling 8 source files to /opt/springsource/slices-1.0.0.CI-B27/projects/com.springsource.osgi.slices.test/target/test-classes [copy] Copying 16 files to /opt/springsource/slices-1.0.0.CI-B27/projects/com.springsource.osgi.slices.test/target/test-classes [junit] Testsuite: com.springsource.osgi.slices.test.BasicDeployLifecycleTests [junit] Tests run: 0, Failures: 0, Errors: 1, Time elapsed: 2.01 sec [junit] [junit] Testcase: com.springsource.osgi.slices.test.BasicDeployLifecycleTests: Caused an ERROR [junit] Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath? [junit] java.lang.IllegalStateException: Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath? [junit] at com.springsource.osgi.launcher.FrameworkFactoryLocator.uniqueServiceFromLoader(FrameworkFactoryLocator.java:53) [junit] at com.springsource.osgi.launcher.FrameworkFactoryLocator.createFrameworkFactory(FrameworkFactoryLocator.java:44) [junit] at com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:153) [junit] at com.springsource.osgi.test.framework.OsgiTestRunner.launchOsgi(OsgiTestRunner.java:93) [junit] at com.springsource.osgi.test.framework.OsgiTestRunner.run(OsgiTestRunner.java:50) {code}

    SpringSource Issue Tracker | 7 years ago | Sam Brannen
    java.lang.IllegalStateException: Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath?

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Unable to locate unique FrameworkFactory. Found 2 factories. Do you have multiple OSGi implementations on your classpath?

      at com.springsource.osgi.launcher.FrameworkFactoryLocator.uniqueServiceFromLoader()
    2. com.springsource.osgi
      OsgiTestRunner.run
      1. com.springsource.osgi.launcher.FrameworkFactoryLocator.uniqueServiceFromLoader(FrameworkFactoryLocator.java:53)
      2. com.springsource.osgi.launcher.FrameworkFactoryLocator.createFrameworkFactory(FrameworkFactoryLocator.java:44)
      3. com.springsource.osgi.launcher.FrameworkBuilder.start(FrameworkBuilder.java:153)
      4. com.springsource.osgi.test.framework.OsgiTestRunner.launchOsgi(OsgiTestRunner.java:93)
      5. com.springsource.osgi.test.framework.OsgiTestRunner.run(OsgiTestRunner.java:50)
      5 frames