Results 1 to 6 of 6

Thread: What bundles should I deploy into Felix?

  1. #1
    Join Date
    Apr 2011
    Posts
    6

    Default What bundles should I deploy into Felix?

    Hello!
    I have developed a simple Hello bundle. I use Spring Dynamic Modules. The bundle only print "Hello Jose" when init-method is called. The manifest and Spring context file are:
    Manifest-Version: 1.0
    Bundle-ManifestVersion: 2
    Bundle-Name: Hello
    Bundle-SymbolicName: Hello
    Bundle-Version: 1.0.0
    Bundle-Vendor: Jose
    Bundle-Localization: plugin

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean name="hello" class="com.sample.osgi.spring.Hello"
    init-method="start" destroy-method="stop" >
    </bean>
    </beans>

    In Felix server I have the next config file which contains the bundles deployed:
    felix.auto.install.1= \
    ${felix.shell.baseurl}org.apache.felix.bundlerepos itory-1.6.2.jar \
    ${felix.shell.baseurl}org.apache.felix.gogo.comman d-0.8.0.jar \
    ${felix.shell.baseurl}org.apache.felix.gogo.runtim e-0.8.0.jar \
    ${felix.shell.baseurl}org.apache.felix.gogo.shell-0.8.0.jar \
    ${felix.shell.baseurl}Hello.jar \
    ${felix.shell.baseurl}com.springsource.net.sf.cgli b-2.1.3.jar \
    ${felix.shell.baseurl}org.apache.commons.logging.j ar \
    ${felix.shell.baseurl}framework-2.2.0.jar \
    ${felix.shell.baseurl}org.springframework.core-3.0.0.RC1.jar \
    ${felix.shell.baseurl}org.springframework.context-3.0.0.RC1.jar \
    ${felix.shell.baseurl}org.springframework.beans-3.0.0.RC1.jar \
    ${felix.shell.baseurl}org.springframework.aop-3.0.0.RC1.jar \
    ${felix.shell.baseurl}com.springsource.org.aopalli ance-1.0.0.jar \
    ${felix.shell.baseurl}spring-osgi-core-1.2.1.jar \
    ${felix.shell.baseurl}spring-osgi-io-1.2.1.jar \
    ${felix.shell.baseurl}spring-osgi-extender-1.2.1.jar \

    felix.auto.start.1= \
    ${felix.shell.baseurl}org.apache.felix.bundlerepos itory-1.6.2.jar \
    ${felix.shell.baseurl}org.apache.felix.gogo.comman d-0.8.0.jar \
    ${felix.shell.baseurl}org.apache.felix.gogo.runtim e-0.8.0.jar \
    ${felix.shell.baseurl}org.apache.felix.gogo.shell-0.8.0.jar \
    ${felix.shell.baseurl}com.springsource.net.sf.cgli b-2.1.3.jar \
    ${felix.shell.baseurl}org.apache.commons.logging.j ar \
    ${felix.shell.baseurl}framework-2.2.0.jar \
    ${felix.shell.baseurl}org.springframework.core-3.0.0.RC1.jar \
    ${felix.shell.baseurl}org.springframework.context-3.0.0.RC1.jar \
    ${felix.shell.baseurl}org.springframework.beans-3.0.0.RC1.jar \
    ${felix.shell.baseurl}org.springframework.aop-3.0.0.RC1.jar \
    ${felix.shell.baseurl}com.springsource.org.aopalli ance-1.0.0.jar \
    ${felix.shell.baseurl}spring-osgi-core-1.2.1.jar \
    ${felix.shell.baseurl}spring-osgi-io-1.2.1.jar \
    ${felix.shell.baseurl}spring-osgi-extender-1.2.1.jar \
    ${felix.shell.baseurl}Hello.jar \

    However when I run Felix, I get all bundles in ACTIVE state, but hte message is not shown:
    START LEVEL 1
    ID|State |Level|Name
    0|Active | 0|System Bundle (3.0.9)
    1|Active | 1|Apache Felix Bundle Repository (1.6.2)
    2|Active | 1|Apache Felix Gogo Command (0.8.0)
    3|Active | 1|Apache Felix Gogo Runtime (0.8.0)
    4|Active | 1|Apache Felix Gogo Shell (0.8.0)
    5|Active | 1|Logging (1.0.0)
    6|Active | 1|frameworkbundle (4.0.12)
    7|Active | 1|Spring Core (3.0.0.RC1)
    8|Active | 1|Spring Context (3.0.0.RC1)
    9|Active | 1|Spring Beans (3.0.0.RC1)
    10|Active | 1|Spring AOP (3.0.0.RC1)
    11|Active | 1|AOP Alliance API (1.0.0)
    12|Active | 1|spring-osgi-core (1.2.1)
    13|Active | 1|spring-osgi-io (1.2.1)
    14|Active | 1|spring-osgi-extender (1.2.1)
    15|Active | 1|Hello (1.0.0)
    16|Active | 1|CGLIB Code Generation Library (2.1.3)
    g! start 15
    g!

    Does someone know what is the problem? What bundles do I need? What is the order needed?

    Thanks!
    Regards!

  2. #2
    Join Date
    Sep 2006
    Location
    Russia
    Posts
    28

    Default

    Where is your context "xml" located?

  3. #3
    Join Date
    Apr 2011
    Posts
    6

    Default

    Quote Originally Posted by polosatiy View Post
    Where is your context "xml" located?
    On META-INF/spring folder

  4. #4
    Join Date
    Sep 2006
    Location
    Russia
    Posts
    28

    Default

    Quote Originally Posted by jhergar View Post
    On META-INF/spring folder

    try:
    stop 15
    start 15

  5. #5
    Join Date
    Apr 2011
    Posts
    6

    Default

    I had already tried it, but it doesn't run...

  6. #6
    Join Date
    Sep 2006
    Location
    Russia
    Posts
    28

    Default

    Quote Originally Posted by jhergar View Post
    I had already tried it, but it doesn't run...
    Can you post the felix log?

    It seems that you have wrong MANIFEST in your bundle.
    Try to add in your manifest:
    Import-Package: org.springframework.beans;version="3.0"

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •