Results 1 to 4 of 4

Thread: RepositoryManager not available in service registry when starting RC1

Hybrid View

  1. #1

    Default RepositoryManager not available in service registry when starting RC1

    I noticed a context initialization failure in my log file when starting RC1 with -clean.

    ------------- START --

    [2009-12-24 15:03:34.671] start-signalling-1 org.springframework.web.servlet.DispatcherServlet Context initialization failed org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'controller' defined in ServletContext resource [/WEB-INF/hostedrepo-servlet.xml]: Cannot create inner bean 'com.springsource.server.repository.hosted.web.Rep ositoryManagerFactoryBean#efccb1' of type [com.springsource.server.repository.hosted.web.Repo sitoryManagerFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'com.springsource.server.repository.hosted.web.Rep ositoryManagerFactoryBean#efccb1': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: RepositoryManager must be available in the service registry
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveInnerBean(BeanDefinitio nValueResolver.java:281)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:120)
    at org.springframework.beans.factory.support.Construc torResolver.resolveConstructorArguments(Constructo rResolver.java:600)

    ------------- END --

    Subsequently, when the server tried to start my web bundle, it threw:

    ------------- START --

    [2009-12-24 15:05:02.734] start-signalling-3 org.springframework.web.context.ContextLoader Context initialization failed org.springframework.context.ApplicationContextExce ption: Failed to load custom context class [com.springsource.server.web.dm.ServerOsgiBundleXml WebApplicationContext]; nested exception is java.lang.ClassNotFoundException: com.springsource.server.web.dm.ServerOsgiBundleXml WebApplicationContext
    at org.springframework.web.context.ContextLoader.dete rmineContextClass(ContextLoader.java:280)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:233)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:192)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)

    ------------- END --

    I tried another route - installing the bundles one by one instead of a par. All the bundles were installed and started successfully. The web bundle was recognized as such, but its associated context wasn't installed at all. Seems to me some steps were missing from the manual process.

  2. #2
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    I couldn't reproduce this. Please could you try to reproduce it and if possible raise a JIRA so we can diagnose. Thanks.
    Glyn Normington
    SpringSource

  3. #3

    Default

    Glyn,

    I tried running a fresh copy of RC1 on another installation of XP, and that problem went away.

    This time, it threw:

    Code:
    [2010-01-04 13:11:02.024] start-signalling-3           org.springframework.web.context.ContextLoader                     Context initialization failed org.springframework.context.ApplicationContextException: Failed to load custom context class [com.springsource.server.web.dm.ServerOsgiBundleXmlWebApplicationContext]; nested exception is java.lang.ClassNotFoundException: com.springsource.server.web.dm.ServerOsgiBundleXmlWebApplicationContext
    	at org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:280)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:233)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3983)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4483)
    Am I missing any imports? Thanks.

  4. #4
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    Yes, you are missing a package import of com.springsource.server.web.dm because your application uses ServerOsgiBundleXmlWebApplicationContext.

    The Spring Travel sample uses this application context and codes an import-bundle of com.springsource.server.web.dm in the manifest. This is over-kill as the com.springsource.server.web.dm bundle only contains the one package com.springsource.server.web.dm, so import--package is sufficient.

    dm Server 1.0.x adds this import automatically, but dm Server 2.0 does not. We've found that adding imports automatically tends to confuse users and produce essentially unpredictable behaviour.

    If you generate the manifest using bundlor, that import should be added automatically.
    Glyn Normington
    SpringSource

Posting Permissions

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