Monday 27 June 2011

Context Initialization failed, OXD version 1.2

I get this error below. I have visited http://techieth8s.blogspot.com/2011/04/unable-to-locate-spring.html, so I added the would-be missing jars to the classpath/maven repo. The error persists.
Will be happy to get some pointers.


ERROR - ContextLoader.
initWebApplicationContext(214) |2011-06-26 20:48:43,197| Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [openxdata-server-applicationContext-security.xml]
Offending resource: class path resource [openxdata-applicationContext.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
Offending resource: class path resource [openxdata-server-applicationContext-security.xml]

    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:201)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:489)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:384)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:296)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:447)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:543)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:421)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1035)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:783)
    at com.google.gwt.dev.DevMode.main(DevMode.java:275)

Copying a VirtualBox image to another

Having spent a whole day figuring out how to restore my data, I decided to make use of google. The hard-disk's bootloader was already gone. My work for the Virtual Machine was still intact, thank God! VM in use was VirtualBox. I found Jen3ral's blog helpful. Here is the link . Incase you find the link inactive, am pasting his work here.
To copy the image to another computer:
  1. Close VirtualBox if it’s running.
  2. Go to your home folder and enable show hidden files through the View menu.
  3. Find the .VirtualBox folder, go to the HardDisks folder and copy the .vdi file you want to use.  In my case  I burned the file to a DVD because we have so many people who will be needing to save this in their home directory.
  4. Now go to the other host computer you want to use that .vdi file on and open VirtualBox if you’ve never opened it on the new host machine before.  This will create the .VirtualBox folder.  Then paste it in the same place (user’s home directory -> show hidden files -> .VirtualBox -> HardDisks).  You might need to create the HardDisks folder yourself.
  5. Edit the permissions of the file in order for it to work.  All I did was right-click on it after moving the file over and give read & write permissions to the owner, which should have your username there.  You can change the permissions to the group and others sections if needed later, but that wasn’t necessary for me.
Once you’ve copied the disk image you need to create a new machine and register that hard disk with VirtualBox on the target host machine:
  1. From the VirtualBox window click the New button.  This will open the New Virtual Machine Wizard.
  2. VM Name and OS Type – Give it a name and pick the type & version of the virtual machine OS.
  3. Memory – Just leave it as the default.  You can change it later if you notice any problems.
  4. Virtual Hard Disk – This is where you select the hard disk you copied in to the home directory earlier.  So click on existing and when the Virtual Media Manager window comes up choose to Add.  It should take you to the correct folder so just select the image file and click open, then select.
  5. You’re done, it’ll take you back to the main window with the new virtual machine you just created based off the existing image file.
I hope you enjoy it!