PDA

View Full Version : Unable to load or run greenhouse locally



glgrahamjr
Jan 9th, 2012, 01:09 AM
I just installed the latest version of STS and followed the directions for running greenhouse locally. That is, I downloaded the source code and imported the project. However, when I drag 'greenhouse' to the tc Server I keep getting the following:

ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Failed to import bean definitions from relative location [security-oauth-provider.xml]
Offending resource: class path resource [com/springsource/greenhouse/config/security.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Unexpected exception parsing XML document from class path resource [com/springsource/greenhouse/config/security-oauth-provider.xml]; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68)
at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:76)
etc. etc.

I was able to load and run a few of the spring social showcase samples, but no luck with greenhouse. Please advise. Thanks.

habuma
Jan 10th, 2012, 11:20 AM
I just installed Greenhouse into the tcServer in the latest version of STS and it worked fine. Note that this all happened on a new machine that until today didn't have Greenhouse on it at all...so this isn't a ghost of some previously successful installation.

Is there more stack trace behind the "etc. etc." that might prove useful in debugging your problem? The part of the stack trace you show is within some error-handling logic. But what error triggered that error-handling logic?

One thing you might do (if you've not done so already) is to refresh the project in STS and do a project clean. No guarantees that it will work, but when I see weird things like this, that's the first thing I try...and it often helps.

glgrahamjr
Jan 11th, 2012, 12:55 AM
Thanks for the reply. I tried cleaning the server and the project and redeploying. Same thing. Here is more of the trace (it won't let me paste the whole thing...too long):

ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Failed to import bean definitions from relative location [security-oauth-provider.xml]
Offending resource: class path resource [com/springsource/greenhouse/config/security.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Unexpected exception parsing XML document from class path resource [com/springsource/greenhouse/config/security-oauth-provider.xml]; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68)
at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:76)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.importBeanDefinitionResour ce(DefaultBeanDefinitionDocumentReader.java:271)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseDefaultElement(Defaul tBeanDefinitionDocumentReader.java:196)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:181)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.doRegisterBeanDefinitions( DefaultBeanDefinitionDocumentReader.java:140)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:111)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:174)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:209)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:180)
at org.springframework.context.annotation.Configurati onClassBeanDefinitionReader.loadBeanDefinitionsFro mImportedResources(ConfigurationClassBeanDefinitio nReader.java:293)
at org.springframework.context.annotation.Configurati onClassBeanDefinitionReader.loadBeanDefinitionsFor ConfigurationClass(ConfigurationClassBeanDefinitio nReader.java:118)
at org.springframework.context.annotation.Configurati onClassBeanDefinitionReader.loadBeanDefinitions(Co nfigurationClassBeanDefinitionReader.java:105)
at org.springframework.context.annotation.Configurati onClassPostProcessor.processConfigBeanDefinitions( ConfigurationClassPostProcessor.java:261)
at org.springframework.context.annotation.Configurati onClassPostProcessor.postProcessBeanDefinitionRegi stry(ConfigurationClassPostProcessor.java:178)
at org.springframework.context.support.AbstractApplic ationContext.invokeBeanFactoryPostProcessors(Abstr actApplicationContext.java:617)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:446)
at org.springframework.web.context.ContextLoader.conf igureAndRefreshWebApplicationContext(ContextLoader .java:384)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 111)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(St andardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(St andardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.beans.factory.BeanDefinitionSt oreException: Unexpected exception parsing XML document from class path resource [com/springsource/greenhouse/config/security-oauth-provider.xml]; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:412)