Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Not able to start a stand alone spring bundle with spring-osgi-2.0.0.M1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Not able to start a stand alone spring bundle with spring-osgi-2.0.0.M1

    Hi all,

    While trying to create a "Hello World" application with spring-osgi-2.0.0.M1(using the provided org.eclipse.osgi-3.5.1.R35x_v20090827 run-time) I'm getting some exceptions.

    Please find the details below :

    java version :
    -------------
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

    My applications structure
    ------------------------
    hello-world-springdm
    |
    |---bundles(folder which contains required bundles)
    |
    |---configuration (configuration folder created by runtime, which holds my config.ini)
    |
    |-- src
    |
    |-- bin

    Exception trace (configuration/*.log)
    ============================

    !SESSION 2011-08-17 11:43:28.053 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=1.6.0_24
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments: -console

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.631
    !MESSAGE Bundle bundles/com.springsource.aop-3.0.0.RC1.jar@start not found.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.631
    !MESSAGE Bundle bundles/com.springsource.asm-3.0.0.RC1.jar@start not found.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.631
    !MESSAGE Bundle bundles/com.springsource.beans-3.0.0.RC1.jar@start not found.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.647
    !MESSAGE Bundle bundles/com.springsource.context-3.0.0.RC1.jar@start not found.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.647
    !MESSAGE Bundle bundles/com.springsource.core-3.0.0.RC1.jar@start not found.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.647
    !MESSAGE Bundle bundles/com.springsource.expression-3.0.0.RC1.jar@start not found.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.647
    !MESSAGE Bundle bundles/spring-osgi-extender-2.0.0.M1.jar@start not found.

    !ENTRY org.springframework.osgi.core 4 0 2011-08-17 11:43:28.694
    !MESSAGE
    !STACK 0
    org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.springframework.aop; version="[3.0.0,4.0.0)"
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.getResolverError(AbstractBundle.java:1313)
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.getResolutionFailureException(AbstractBundle .java:1297)
    at org.eclipse.osgi.framework.internal.core.BundleHos t.startWorker(BundleHost.java:309)
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework .resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.resumeBundles(StartLevelManager.java:557)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.incFWSL(StartLevelManager.java:464)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.doSetStartLevel(StartLevelManager.java:24 8)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.dispatchEvent(StartLevelManager.java:445)
    at org.eclipse.osgi.framework.eventmgr.EventManager.d ispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.EventManager$E ventThread.run(EventManager.java:337)

    !ENTRY org.springframework.osgi.io 4 0 2011-08-17 11:43:28.710
    !MESSAGE
    !STACK 0
    org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.springframework.core.io; version="[3.0.0,4.0.0)"
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.getResolverError(AbstractBundle.java:1313)
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.getResolutionFailureException(AbstractBundle .java:1297)
    at org.eclipse.osgi.framework.internal.core.BundleHos t.startWorker(BundleHost.java:309)
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.resume(AbstractBundle.java:370)
    at org.eclipse.osgi.framework.internal.core.Framework .resumeBundle(Framework.java:1068)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.resumeBundles(StartLevelManager.java:557)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.incFWSL(StartLevelManager.java:464)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.doSetStartLevel(StartLevelManager.java:24 8)
    at org.eclipse.osgi.framework.internal.core.StartLeve lManager.dispatchEvent(StartLevelManager.java:445)
    at org.eclipse.osgi.framework.eventmgr.EventManager.d ispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.EventManager$E ventThread.run(EventManager.java:337)

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.710
    !MESSAGE Bundle initial@reference:file:bundles/sprin...e-2.0.0.M1.jar/ was not resolved.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.710
    !MESSAGE Bundle initial@reference:file:bundles/sprin...o-2.0.0.M1.jar/ was not resolved.

    !ENTRY org.eclipse.osgi 4 0 2011-08-17 11:43:28.710
    !MESSAGE Application error
    !STACK 1
    java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:74)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:179)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ma in(EclipseStarter.java:150)

    !ENTRY org.eclipse.osgi 2 0 2011-08-17 11:43:28.741
    !MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
    !SUBENTRY 1 org.eclipse.osgi 2 0 2011-08-17 11:43:28.741
    !MESSAGE Bundle initial@reference:file:bundles/sprin...e-2.0.0.M1.jar/ was not resolved.
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.beans.factory.config_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.context.event_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.core.enums_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.core.convert_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.beans.factory.support_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.beans.factory_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.context_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.aop_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.core_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.context.support_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.util_[3.0.0,4.0.0).
    !SUBENTRY 2 org.springframework.osgi.core 2 0 2011-08-17 11:43:28.741
    !MESSAGE Missing imported package org.springframework.beans.propertyeditors_[3.0.0,4.0.0).
    ..........................

    config.ini file
    -----------------
    osgi.bundles=bundles/com.springsource.aop-3.0.0.RC1.jar@start,bundles/com.springsource.asm-3.0.0.RC1.jar@start,bundles/com.springsource.beans-3.0.0.RC1.jar@start,bundles/com.springsource.context-3.0.0.RC1.jar@start,bundles/com.springsource.core-3.0.0.RC1.jar@start,bundles/com.springsource.expression-3.0.0.RC1.jar@start,bundles/spring-osgi-core-2.0.0.M1.jar@start,bundles/spring-osgi-extender-2.0.0.M1.jar@start,bundles/spring-osgi-io-2.0.0.M1.jar@start,bundles/com.springsource.org.aopalliance-1.0.0.jar@start,bundles/com.springsource.slf4j.api-1.5.6.jar@start,bundles/com.springsource.slf4j.nop-1.5.6.jar,bundles/[email protected]

    All the bundles mentioned in the "config.ini" is available in the bundles folder and a few bundles are getting registered other than the spring ones.

    Console output
    ============
    D:\WORKSPACES\DM_workspace\bundle\hello-world-springdm>java -jar org.eclipse.osgi-3.5.1.R35x_v20090827.jar -console

    osgi> ss

    Framework is launched.

    id State Bundle
    0 ACTIVE org.eclipse.osgi_3.5.1.R35x_v20090827
    1 INSTALLED org.springframework.osgi.core_2.0.0.M1
    2 INSTALLED org.springframework.osgi.io_2.0.0.M1
    3 ACTIVE com.springsource.org.aopalliance_1.0.0
    4 ACTIVE com.springsource.slf4j.api_1.5.6
    Fragments=5
    5 RESOLVED com.springsource.slf4j.nop_1.5.6
    Master=4
    6 ACTIVE com.springsource.slf4j.org.apache.commons.logging_ 1.5.6

    osgi>



    Since I'm very new to Spring DM, dont have a clue to solve this issue. Please help me.

    Regards,
    Kallada

  • #2
    It was due to a mistake in the config.ini file, sorry for the post

    This error was due to some simple mistake in my config.ini file. Really sorry for the post

    Comment

    Working...
    X