Announcement Announcement Module
Collapse
No announcement yet.
Cineasts documentation issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cineasts documentation issue

    OK, this is not a big deal, and it is fine if it stays in there, but it is one of those things that bothers me. And probably only bothers me.

    But in the spring config file it has
    Code:
    <context:annotation-config/> 
    <context:spring-configured/> 
    <context:component-scan base-package="org.neo4j.cineasts">
         <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
    </context:component-scan>
    So my thing is that you have redundancy in there. <context:annotation-config/> is not needed in the config.

    <context:component-scan> will already include all 4 of the BeanPostProcessors that you get with annotation-config.

    Thanks

    Mark

  • #2
    Thanks,

    will fix it.

    Michael

    Comment


    • #3
      I mainly put it in there that when people don't use component-scan, they will not trip over the missing directive.

      Comment


      • #4
        Yeah, that is true. I didn't say it hurts it in any way, just redundant.

        And personally, I really think they should understand the difference between the two before they even go to more advanced stuff. So I guess I am a little sadistic in that way that I would rather it fail for them, post here and learn the difference, than it just always work.

        Mark

        Comment


        • #5
          OTOH, some of that is required by the framework and it would be harsh to punish them with it

          Comment


          • #6
            You mean we actually have to release something that always works. What fun is that?

            Don't answer that because I definitely have not had much fun so far trying to get things to totally work. I either want a Roo app with Groovy domain objects to work with Spring Data Neo4j 2.0 or a Grails app again with all that Groovy stuff. But I have been mostly fighting with IDE or build dependency issues.

            Mark

            Comment


            • #7
              Sounds like an ambitious goal.

              Does Roo + Groovy domain objects work on its own?
              And did you get Roo + SDN working? Perhaps start with challenges that only have two variables first?

              Did you resolve the dependency issues?

              Comment


              • #8
                For the Roo + Groovy in STS. No I am not getting STS to understand the Groovy classes. Even though Groovy is setup in STS, through the STS dashboard. Haven't tried just through a terminal window, but will try that now.

                For Roo 1.2 with SDN, no I didn't try it with just the tutorial app, I am very ambitious. The combining of stuff shouldn't change much underlying stuff, there still needs the same beans, classes and annotations, as I would assume, but of course, assuming can lead to many wonderful things.

                I am still getting the Grails dependency issue. I even tried to use the resource.groovy file to add the Spring Beans for Spring Data.

                I also did decide to use Milestones and RC versions of everything Spring Data 2.0, Roo 1.2, and Grails 2.0 and Groovy 1.8.3

                I take part of that back, the Roo stuff I had to go down to 1.1.5 to get Roo to generate anything.

                I guess you could call me a beta tester.
                Mark
                Last edited by bytor99999; Nov 21st, 2011, 03:27 PM.

                Comment


                • #9
                  So to remove some variables, I decided to just try the Cineasts sample app directly to see if I can run it.

                  I figure if it runs, I could just do everything myself manually, even where I just change the classes to be my classes with the already configured and setup Spring Data Neo4j maven project.

                  However, When I run it in STS 2.8 with tcserver development edition I get a class not found exception.

                  So in the pom file it looks like there is a missing dependency to neo4j.

                  Caused by: java.lang.ClassNotFoundException: org.neo4j.kernel.EmbeddedGraphDatabase
                  at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1645)
                  at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1491)
                  ... 48 more

                  Mark

                  Comment


                  • #10
                    I added the neo4j dependency and I am able to get it to compile, run tests and generate a war, but not deploy on Jetty.

                    I also had to run maven in a terminal because STS doesn't want to run it. But it looks like the kernel jar file is set to scope test.

                    Mark

                    Comment


                    • #11
                      I got Cineasts to run in Jetty, however, no Neo4j database is running, meaning it shows no data at all in the app, and none of the CSS is being applied.

                      Anyway, back to Roo with SDN and Groovy. I got a reply in the STS forum that you can't get Eclipse to understand 3 languages at a time, so no Java/AspectJ/Groovy. Could do Java/Groovy, Java/AspectJ, but not all three combined. So I could create a separate project just for the Groovy code and have it as a dependency to the Roo/SDN project.

                      Thanks

                      Mark

                      Comment


                      • #12
                        Hmm where did you take the cineasts code from?

                        From here: https://github.com/SpringSource/spri...neo4j-examples ?

                        Comment


                        • #13
                          The neo4j dependencies are transitively pulled in via spring-data-neo4j, the test-jar from kernel is just for the cineasts tests.

                          Can you do mvn dependency:tree to see if it is set up correctly ?

                          Thanks a lot

                          Michael

                          Comment


                          • #14
                            Yep, https://github.com/SpringSource/spring-data-neo4j.git for the whole projects.

                            It is now from 3 days ago, so some of the most recent changes aren't pulled. I'll pull the changes and try again.

                            When I look at the dependencies in STS I see neo4j jars.

                            Code:
                            [INFO] +- cglib:cglib-nodep:jar:2.2:compile
                            [INFO] +- org.neo4j:neo4j:jar:1.5:compile
                            [INFO] |  +- org.neo4j:neo4j-lucene-index:jar:1.5:compile
                            [INFO] |  |  \- org.apache.lucene:lucene-core:jar:3.1.0:compile
                            [INFO] |  +- org.neo4j:neo4j-graph-algo:jar:1.5:compile
                            [INFO] |  +- org.neo4j:neo4j-udc:jar:1.5:compile
                            [INFO] |  +- org.neo4j:neo4j-graph-matching:jar:1.5:compile
                            [INFO] |  \- org.neo4j:neo4j-jmx:jar:1.5:compile
                            [INFO] +- org.neo4j:neo4j-kernel:jar:1.5:compile
                            [INFO] |  \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
                            [INFO] +- org.neo4j:neo4j-cypher:jar:1.5:compile
                            [INFO] |  \- org.scala-lang:scala-library:jar:2.9.0-1:compile
                            [INFO] \- junit:junit:jar:4.8.1:test
                            Thanks

                            Mark

                            Comment


                            • #15
                              Updated my local git repo and still got the same error. Sorry that I had to try on JBoss 5.1, but I messed up my tc server dev trying to figure out how to remove insight..

                              Code:
                              08:02:25,642 ERROR [[/movies]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
                              org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/neo4j/kernel/EmbeddedGraphDatabase
                              	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
                              	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
                              	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
                              	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:93)
                              	..
                              	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
                              	at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
                              	at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
                              	at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
                              	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                              	at java.lang.reflect.Method.invoke(Method.java:597)
                              	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                              	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                              	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                              	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                              	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                              	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                              	at $Proxy38.start(Unknown Source)
                              	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                              	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
                              	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                              	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                              	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                              	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                              	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
                              	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                              	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                              	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                              	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                              	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                              	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                              	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
                              	at org.jboss.system.ServiceController.start(ServiceController.java:460)
                              	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
                              	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
                              	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
                              	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                              	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                              	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                              	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                              	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                              	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
                              	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                              	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                              	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                              	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                              	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                              	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                              	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                              	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                              	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                              	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
                              	at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
                              	at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
                              	at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
                              	at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
                              	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                              	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                              	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                              	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                              	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                              	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                              	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                              	at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
                              	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
                              	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
                              	at org.jboss.Main.boot(Main.java:221)
                              	at org.jboss.Main$1.run(Main.java:556)
                              	at java.lang.Thread.run(Thread.java:680)
                              Caused by: java.lang.NoClassDefFoundError: org/neo4j/kernel/EmbeddedGraphDatabase
                              	at org.springframework.data.neo4j.config.DataGraphBeanDefinitionParser.handleStoreDir(DataGraphBeanDefinitionParser.java:109)
                              	at org.springframework.data.neo4j.config.DataGraphBeanDefinitionParser.setupGraphDatabase(DataGraphBeanDefinitionParser.java:88)
                              	at org.springframework.data.neo4j.config.DataGraphBeanDefinitionParser.parseInternal(DataGraphBeanDefinitionParser.java:42)
                              	at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
                              	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
                              	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1338)
                              	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1328)
                              	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
                              	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
                              	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
                              	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
                              	... 82 more
                              Caused by: java.lang.ClassNotFoundException: org.neo4j.kernel.EmbeddedGraphDatabase
                              Mark

                              Comment

                              Working...
                              X