Results 1 to 2 of 2

Thread: Spring Web MVC does not work with OSGi

  1. #1
    Join Date
    May 2006
    Posts
    10

    Unhappy Spring Web MVC does not work with OSGi

    Hi,

    Not directly a Spring Web MVC related issue, but as there is no Spring OSGi forum yet that's the most relevant one.

    I'm trying to get Spring Web MVC 2.5 RC1 running inside an OSGi container (equinox). However, Spring Web MVC does not get started. The state of my bundles after I start the OSGi container:

    Code:
    id      State       Bundle
    0       ACTIVE      system.bundle_3.2.1.R32x_v20060717
    1       ACTIVE      org.eclipse.osgi.util_3.1.100.v20060601
    2       ACTIVE      org.eclipse.osgi.services_3.1.100.v20060601
    3       INSTALLED   my-own-bundle-1-here
    4       ACTIVE      org.springframework.osgi.spring-osgi-core_1.0.0.m3
    5       ACTIVE      org.springframework.osgi.spring-osgi-extender_1.0.0.m3
    6       ACTIVE      org.springframework.osgi.spring-osgi-io_1.0.0.m3
    7       ACTIVE      org.springframework.bundle.spring.aop_2.5.0.rc1
    8       ACTIVE      org.springframework.bundle.spring.beans_2.5.0.rc1
    9       ACTIVE      org.springframework.bundle.spring.context_2.5.0.rc1
    10      ACTIVE      org.springframework.bundle.spring.core_2.5.0.rc1
    11      ACTIVE      org.springframework.osgi.aopalliance.osgi_1.0.0.SNAPSHOT
    12      ACTIVE      org.springframework.osgi.log4j.osgi_1.2.13
    13      ACTIVE      jcl104.over.slf4j_1.4.3
    14      ACTIVE      slf4j.api_1.4.3
    15      ACTIVE      slf4j.log4j12_1.4.3
    16      INSTALLED   my-own-bundle-2-here
    17      ACTIVE      my-own-bundle-3-here
    18      ACTIVE      org.springframework.bundle.spring.web_2.5.0.rc1
    19      INSTALLED   org.springframework.bundle.spring.webmvc_2.5.0.rc1
    20      ACTIVE      javax.servlet.jsp_2.0.0.v200706191603
    21      ACTIVE      javax.servlet_2.4.0.v200706111738
    22      ACTIVE      org.apache.commons.el_1.0.0.v200706111724
    23      ACTIVE      org.apache.commons.logging_1.0.4.v200706111724
    24      ACTIVE      org.eclipse.equinox.ds_1.0.0.v20070226
    25      ACTIVE      org.eclipse.equinox.http.jetty_1.0.1.R33x_v20070816
    26      ACTIVE      org.eclipse.equinox.http.servlet_1.0.1.R33x_v20070816
    27      INSTALLED   org.eclipse.equinox.jsp.jasper_1.0.1.R33x_v20070816
    28      ACTIVE      org.eclipse.equinox.log_1.0.100.v20070226
    29      ACTIVE      org.eclipse.osgi.services_3.1.200.v20070605
    30      ACTIVE      org.mortbay.jetty_5.1.11.v200706111724
    Watch the bundles 19 (Spring Web MVC) and 16 (my own bundle that depends on Spring Web MVC). As you can see, the Spring Web MVC does not get started. The reason:

    Code:
    osgi> diag 19
    initial@reference:file:2043365030.bundle/ [19]
      Missing imported package com.lowagie.text_0.0.0.
      Missing imported package com.lowagie.text.pdf_0.0.0.
      Missing imported package freemarker.cache_0.0.0.
      Missing imported package freemarker.core_0.0.0.
      Missing imported package freemarker.ext.jsp_0.0.0.
      [... and so on ...]
    Fine. That tells me that I have to install these bundles. However, in the MANIFEST.MF of Spring Web MVC these packages are declared as "optional":

    Code:
    Import-Package: com.lowagie.text;resolution:=optional,com.lowagie.text
     .pdf;resolution:=optional, [... and so on ...]
    Why can Spring Web MVC not get started without these optional dependencies? Did I overlook something?

    Bye,

    Daniel
    Last edited by dmitter; Nov 8th, 2007 at 07:42 AM. Reason: typos

  2. #2
    Join Date
    May 2006
    Posts
    10

    Default

    Just realized that there is a Google group for Spring OSGi. So I'll repost it there... (see http://groups.google.com/group/spring-osgi/)

Posting Permissions

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