Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

No beans defined in application context

Help
2012-06-26
2013-05-15
  • Dan Lockett
    Dan Lockett
    2012-06-26

    I'm having some issues installing Glassbox on Tomcat 7 on Windows. I can see that others have installed without issue on Tomcat and I've probably done something stupid, but I can't see what!

    The short version is that it seems to install and startup fine, but when you try to access a Glassbox page it 404s. Spring appears to be accessing springapp-servlet.xml to get the path to the beans it needs, but springapp-servlet.xml is empty. I think it's quite possible that it should be empty however, and that this is symptom rather than cause. I'm basically proper stuck, any help would be vastly appreciated.

    I've listed the steps I've taken so far below :-


    Copied Tomcat to Windows 7 (via zip file)
    Started Tomcat
    Drop Glassbox.war into webapps directory
    Deployment successful
    Go to Install.form in browser
    Go to http://localhost:8080/glassbox/Install.form. Set using startup scripts option
    Click "Install Now"
    Install appears successful.

    Install log :-

    ==========================================================
    install.info:
          -- Installing Glassbox version: 2.0 --
          target.system=Tomcat
          install.resource.dir=C:\Temp\apache-tomcat-7.0.28\webapps\glassbox\install
          scripts.install.dir=C:\Temp\apache-tomcat-7.0.28\webapps\glassbox\install\tomcat\1.5
          host.url=192.168.xx.xx
          glassbox.home=C:\Temp\apache-tomcat-7.0.28\common\lib\glassbox
          bin.dir=C:\Temp\apache-tomcat-7.0.28\bin
          lib.dir=C:\Temp\apache-tomcat-7.0.28\common\lib
          launch.command=C:\Temp\apache-tomcat-7.0.28\bin\startup.bat
          java14=${java14}

          lib.files=aspectjweaver.jar;glassboxMonitor.jar
          resource.files=glassbox.properties;runtime.properties;sample.log4j.properties;sample.logging.properties;sample.tomcat.logging.properties
          script.files=catalina_with_glassbox.bat;catalina_with_glassbox.sh;startup_with_glassbox.bat;startup_with_glassbox.sh

          lib.files.14=aspectj14Adapter.jar;createJavaAdapter.jar
          resource.files.14=glassbox.properties;readme.txt;runtime.properties

    init:

    install.libs:
          Installing Glassbox Libraries.
          Copying 2 files to C:\Temp\apache-tomcat-7.0.28\common\lib

    install.resources:
          Installing Glassbox Resources.
          Copying 5 files to C:\Temp\apache-tomcat-7.0.28\common\lib\glassbox

    filters:

    install.scripts:
          Installing run Scripts.
          Copying 1 file to C:\Temp\apache-tomcat-7.0.28\bin
          Copying 4 files to C:\Temp\apache-tomcat-7.0.28\bin

    install.libs.14:

    install.resources.14:

    create.java14.adapter:

    install.14.support:

    install:

    BUILD SUCCESSFUL
    Total time: 0 seconds
    ==========================================================

    Stop Tomcat.
    Restart Tomcat using startup_with_glassbox.bat

    Startup log

    26-Jun-2012 15:31:36 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
    26-Jun-2012 15:31:36 org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive C:\Temp\apache-tomcat-7.0.28\webapps\gla
    ssbox.war
    26-Jun-2012 15:31:36 uk.ltd.getahead.dwr.util.CommonsLoggingOutput info
    INFO: Logging using commons-logging.
    26-Jun-2012 15:31:36 glassbox.installer.perContainer.Weblogic8GlassboxInstaller
    matchesContext
    INFO: Detect Weblogic8: webLogicName=false, startsWith=false, classloaderMatch=f
    alse
    26-Jun-2012 15:31:36 glassbox.installer.perContainer.WeblogicGlassboxInstaller g
    etWebLogicDomainDir
    INFO: Exploded WebLogic resource directory is C:\localhost\glassbox
    26-Jun-2012 15:31:36 glassbox.installer.perContainer.WeblogicGlassboxInstaller m
    atchesContext
    INFO: Detect Weblogic: startsWith=false, domainDir=false, classloader=false
    26-Jun-2012 15:31:36 glassbox.installer.GlassboxInstallerFactory getInstaller
    INFO: Chose glassbox.installer.perContainer.TomcatGlassboxInstaller@2682d210 for
    Glassbox Installer.
    26-Jun-2012 15:31:37 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Temp\apache-tomcat-7.0.28\webapps\R
    OOT
    26-Jun-2012 15:31:37 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler
    26-Jun-2012 15:31:37 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler
    26-Jun-2012 15:31:37 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 968 ms
    ==========================================================

    In browser goto localhost:8080/glassbox/VerifyInstall.form

    404 returned. Logs below

    ==========================================================
    26-Jun-2012 15:33:13 org.springframework.web.servlet.HttpServletBean init
    INFO: Initializing servlet 'springapp'
    26-Jun-2012 15:33:13 org.springframework.core.CollectionFactory <clinit>
    INFO: JDK 1.4+ collections available
    26-Jun-2012 15:33:13 org.springframework.core.CollectionFactory <clinit>
    INFO: Commons Collections 3.x available
    26-Jun-2012 15:33:13 org.springframework.web.servlet.FrameworkServlet initServletBean
    INFO: FrameworkServlet 'springapp': initialization started
    26-Jun-2012 15:33:13 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from ServletContext resource
    26-Jun-2012 15:33:13 org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory
    INFO: Bean factory for application context : org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans ; root of BeanFactory hierarchy
    26-Jun-2012 15:33:13 org.springframework.context.support.AbstractApplicationContext refresh
    INFO: No beans defined in application context
    26-Jun-2012 15:33:13 org.springframework.context.support.AbstractApplicationContext initMessageSource
    INFO: Unable to locate MessageSource with name 'messageSource': using default
    26-Jun-2012 15:33:13 org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster
    INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default
    26-Jun-2012 15:33:13 org.springframework.ui.context.support.UiApplicationContextUtils initThemeSource
    INFO: Unable to locate ThemeSource with name 'themeSource': using default
    26-Jun-2012 15:33:13 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans ; root of BeanFactory hierarchy]
    26-Jun-2012 15:33:13 org.springframework.web.servlet.FrameworkServlet initWebApplicationContext
    INFO: Using context class  for servlet 'springapp'
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet initMultipartResolver
    INFO: Unable to locate MultipartResolver with name 'multipartResolver': no multipart request handling provided
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet initLocaleResolver
    INFO: Unable to locate LocaleResolver with name 'localeResolver': using default
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet initThemeResolver
    INFO: Unable to locate ThemeResolver with name 'themeResolver': using default
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet initHandlerMappings
    INFO: No HandlerMappings found in servlet 'springapp': using default
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet initHandlerAdapters
    INFO: No HandlerAdapters found in servlet 'springapp': using default
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet initRequestToViewNameTranslator
    INFO: Unable to locate RequestToViewNameTranslator with name 'viewNameTranslator': using default
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet initViewResolvers
    INFO: No ViewResolvers found in servlet 'springapp': using default
    26-Jun-2012 15:33:13 org.springframework.web.servlet.FrameworkServlet initServletBean
    INFO: FrameworkServlet 'springapp': initialization completed in 224 ms
    26-Jun-2012 15:33:13 org.springframework.web.servlet.HttpServletBean init
    INFO: Servlet 'springapp' configured successfully
    26-Jun-2012 15:33:13 org.springframework.web.servlet.DispatcherServlet noHandlerFound
    WARNING: No mapping for  in DispatcherServlet with name 'springapp'

    =========================================================