running cineast-rest example from github

289 views
Skip to first unread message

Maykel Farha

unread,
Jan 24, 2012, 2:28:52 PM1/24/12
to ne...@googlegroups.com
Hi,

I am trying to run the cineast example using spring+rest that is found in github:


i imported the project to eclipse (STS) and everything was fine  but when i try to run the project i get this exception:

any ideas?!

thanks in advance!

################################################

Context initialization failed

java.lang.IllegalStateException: Cannot load configuration class: org.springframework.data.neo4j.aspects.config.Neo4jAspectConfiguration

at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:249)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:163)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:602)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)

at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)

at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)

at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)

at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)

at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

at org.mortbay.jetty.deployer.ContextDeployer.deploy(ContextDeployer.java:268)

at org.mortbay.jetty.deployer.ContextDeployer.redeploy(ContextDeployer.java:287)

at org.mortbay.jetty.deployer.ContextDeployer.access$100(ContextDeployer.java:67)

at org.mortbay.jetty.deployer.ContextDeployer$ScannerListener.fileChanged(ContextDeployer.java:99)

at org.mortbay.util.Scanner.reportChange(Scanner.java:464)

at org.mortbay.util.Scanner.reportDifferences(Scanner.java:330)

at org.mortbay.util.Scanner.scan(Scanner.java:280)

at org.mortbay.util.Scanner$1.run(Scanner.java:232)

at java.util.TimerThread.mainLoop(Timer.java:512)

at java.util.TimerThread.run(Timer.java:462)

Caused by: java.lang.NoClassDefFoundError: org/neo4j/graphdb/GraphDatabaseService

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)

at java.lang.Class.getDeclaredMethods(Class.java:1791)

at net.sf.cglib.core.ReflectUtils.addAllMethods(ReflectUtils.java:348)

at net.sf.cglib.core.ReflectUtils.addAllMethods(ReflectUtils.java:351)

at net.sf.cglib.proxy.Enhancer.getMethods(Enhancer.java:421)

at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:456)

at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)

at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)

at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)

at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)

at org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:118)

at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:89)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:241)

... 23 more

Caused by: java.lang.ClassNotFoundException: org.neo4j.graphdb.GraphDatabaseService

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401)

at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)

... 37 more

2012-01-24 13:09:20.655:WARN::Failed startup of context org.mortbay.jetty.webapp.WebAppContext@30e4f894{/cineasts-rest,/Users/mklfarha/Dropbox/Springroo/jetty-6.1.26/webapps/cineasts-rest.war}

java.lang.IllegalStateException: Cannot load configuration class: org.springframework.data.neo4j.aspects.config.Neo4jAspectConfiguration

at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:249)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:163)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:602)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)

at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)

at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)

at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)

at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)

at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

at org.mortbay.jetty.deployer.ContextDeployer.deploy(ContextDeployer.java:268)

at org.mortbay.jetty.deployer.ContextDeployer.redeploy(ContextDeployer.java:287)

at org.mortbay.jetty.deployer.ContextDeployer.access$100(ContextDeployer.java:67)

at org.mortbay.jetty.deployer.ContextDeployer$ScannerListener.fileChanged(ContextDeployer.java:99)

at org.mortbay.util.Scanner.reportChange(Scanner.java:464)

at org.mortbay.util.Scanner.reportDifferences(Scanner.java:330)

at org.mortbay.util.Scanner.scan(Scanner.java:280)

at org.mortbay.util.Scanner$1.run(Scanner.java:232)

at java.util.TimerThread.mainLoop(Timer.java:512)

at java.util.TimerThread.run(Timer.java:462)

Harald Wellmann

unread,
Jan 24, 2012, 3:36:21 PM1/24/12
to ne...@googlegroups.com
Don't know if this helps:

I had a similar problem (and a whole lot of trouble in general) with the
cineasts demo (cineasts, not cineasts-rest), using Eclipse and m2e (not
STS).

The neo4j-kernel dependency did not resolve correctly. The problem
disappeared after I deleted the neo4j-kernel:test-jar dependency from
the POM.

Cheers,
Harald

Am 24.01.2012 20:28, schrieb Maykel Farha:
> Hi,
>
> I am trying to run the cineast example using spring+rest that is found
> in github:
>
> https://github.com/SpringSource/spring-data-neo4j/tree/master/spring-data-neo4j-examples/cineasts-rest
>
> i imported the project to eclipse (STS) and everything was fine but when
> i try to run the project i get this exception:

> Caused by: java.lang.ClassNotFoundException: org.neo4j.graphdb.GraphDatabaseService

Maykel Farha

unread,
Jan 24, 2012, 5:29:43 PM1/24/12
to ne...@googlegroups.com
it did help, thank you! 

i only had to add this dependency after that:

<dependency>
<groupId>opensymphony</groupId>
<artifactId>sitemesh</artifactId>
<version>2.4.2</version>
</dependency>

Michael Hunger

unread,
Jan 24, 2012, 7:11:16 PM1/24/12
to ne...@googlegroups.com
Thanks for resovling that,

any idea how to prevent m2e from messing this up?

Michael

Harald Wellmann

unread,
Jan 25, 2012, 3:44:50 AM1/25/12
to ne...@googlegroups.com
It's a known bug in m2e-wtp 0.14.0 which is fixed in 0.15 Dev builds
according to
https://issues.sonatype.org/browse/MECLIPSEWTP-207

Best regards,
Harald

Reply all
Reply to author
Forward
0 new messages