Announcement Announcement Module
Collapse
No announcement yet.
Roo Neo4j Addon almost works Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo Neo4j Addon almost works

    So, I am getting closer to getting one of my versions of my project working. I decided to go backwards and try to use all the versions of tools/frameworks that supposedly already works.

    I have Roo 1.1.5, I have the Neo4j Roo Addon, I have just Java-no Groovy. I created a roo script to generate everything and it works, the code looks good. When I try to run it on tc server I get a NPE but it looks like it really is pointing to something about transaction manager not configured correctly.

    Now from the script, I have touched nothing, is there a step or two that I am missing?

    Here is the first exception seen

    Code:
    SEVERE: org/springframework/data/neo4j/core/NodeBacked
    java.lang.IllegalStateException: Can't answer binding questions prior to resolving
    	at org.aspectj.weaver.TypeVariable.canBeBoundTo(TypeVariable.java:175)
    	at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:496)
    	at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:399)
    	at org.aspectj.weaver.ResolvedType.checkLegalOverride(ResolvedType.java:1999)
    	at org.aspectj.weaver.ResolvedType.clashesWithExistingMember(ResolvedType.java:1843)
    	at org.aspectj.weaver.ResolvedType.addInterTypeMunger(ResolvedType.java:1699)
    	at org.aspectj.weaver.bcel.BcelWeaver.weaveNormalTypeMungers(BcelWeaver.java:1610)
    	at org.aspectj.weaver.bcel.BcelWeaver.addNormalTypeMungers(BcelWeaver.java:1415)
    	at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1114)
    	at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:467)
    	at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:318)
    	at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:96)
    	at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:54)
    	at com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader$LoggingClassFileTransformer.transform(TomcatWeavingInsightClassLoader.java:88)
    	at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:95)
    	at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:78)
    	at org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader.findResourceInternal(TomcatInstrumentableClassLoader.java:118)
    	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2668)
    	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1124)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
    	at java.lang.Class.getDeclaredMethods0(Native Method)
    	at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    	at java.lang.Class.getDeclaredMethods(Class.java:1791)
    	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:382)
    	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:320)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:206)
    	at org.springframework.data.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$ee9e2b4d.graphEntityInstantiator(<generated>)
    	at org.springframework.data.neo4j.config.Neo4jConfiguration.graphDatabaseContext(Neo4jConfiguration.java:100)
    	at org.springframework.data.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$ee9e2b4d.CGLIB$graphDatabaseContext$1(<generated>)
    	at org.springframework.data.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$ee9e2b4d$$FastClassByCGLIB$$e608eebb.invoke(<generated>)
    	at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
    	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:210)
    	at org.springframework.data.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$ee9e2b4d.graphDatabaseContext(<generated>)
    	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.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:145)
    	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:568)
    	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
    	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1282)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:807)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    	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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    Nov 23, 2011 9:18:15 AM org.aspectj.weaver.tools.Jdk14Trace info
    INFO: Dumping to /Users/bytor99999/springsource/sts-2.8.0.RELEASE/STS.app/Contents/MacOS/./ajcore.20111123.091815.224.txt

  • #2
    Here is the NPE exception

    Code:
    2011-11-23 09:18:15,888 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationCheck': Invocation of init method failed; nested exception is java.lang.AssertionError: transactionManager not correctly configured, please refer to the manual, setup section
    	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:568)
    	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
    	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1282)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:807)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    	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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    Caused by: java.lang.AssertionError: transactionManager not correctly configured, please refer to the manual, setup section
    	at org.springframework.data.neo4j.config.ConfigurationCheck.checkSpringTransactionManager(ConfigurationCheck.java:55)
    	at org.springframework.data.neo4j.config.ConfigurationCheck.checkConfiguration(ConfigurationCheck.java:41)
    	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.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
    	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:293)
    	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
    	... 38 more
    Caused by: java.lang.NullPointerException
    	at com.springsource.insight.plugin.springtx.TransactionOperationCollectionAspect.createOperation(TransactionOperationCollectionAspect.aj:63)
    	at com.springsource.insight.plugin.springtx.TransactionOperationCollectionAspect.ajc$afterReturning$com_springsource_insight_plugin_springtx_TransactionOperationCollectionAspect$1$efd44e15(TransactionOperationCollectionAspect.aj:42)
    	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:387)
    	at org.springframework.data.neo4j.config.ConfigurationCheck.checkSpringTransactionManager(ConfigurationCheck.java:51)
    	... 46 more
    I guess my biggest issue is the "just works" part. And I haven't gotten any of that love in the past month. Gets very frustrating. ;(

    thanks

    Mark

    Comment


    • #3
      Looks like it is an STS bug. I was able to run the app from the command line using Roo's perform command --mavenCommand jetty:run-war.

      Well the app runs basically, it shows up. Still bugs, like when you have a RelatedTo property, the UI doesn't know how to convert a String to a Set of NodeEntities. But I was going to tweak all the UI for those relationships anyway.

      Thanks

      Mark

      Comment


      • #4
        Yes, ROO has got some peculiarities.

        I still have to update the add-on to take care of all the SDN 2.0 stuff but the ROO guys wanted to take over anyway.

        Comment


        • #5
          Yeah, I am going to have to pull out all the active record persistence stuff from all the layers and add the SDN 2.0 GraphRepository stuff.

          If I was able to get Roo 1.2 working I could have had it not generate all that Active Record stuff. I like active record in Grails, but not in my Java apps.

          So I will get to see if it would have just been easier to start coding from scratch rather than use Roo or Grails. I still can't get Grails to work at all. But at least I finally have something somewhere to move on to actually created and writing my app.

          Thanks

          Mark

          Comment

          Working...
          X