exception after mvn build...

123 views
Skip to first unread message

kiteflo

unread,
May 2, 2012, 1:20:25 PM5/2/12
to Neo4j
Hi...

wer are running neo4j 1.7 and currently connected the spring data
services snapshot repository (2.1.0.Build-Snapshot).

After our last update wer are facing the following exception:

Caused by:
org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public
org.springframework.data.neo4j.support.typerepresentation.TypeRepresentationStrategyFactory
org.springframework.data.neo4j.config.Neo4jConfiguration.typeRepresentationStrategyFactory()
throws java.lang.Exception] threw exception; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named 'graphDatabaseService' is defined
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:
169)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:
570)
... 81 more
Caused by:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named 'graphDatabaseService' is defined
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:
529)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:
1095)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
277)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
193)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
284)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
193)
at org.springframework.context.annotation.ConfigurationClassEnhancer
$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:292)
at org.springframework.data.neo4j.config.Neo4jConfiguration$
$EnhancerByCGLIB$$fb07a920.graphDatabase(<generated>)
at
org.springframework.data.neo4j.config.Neo4jConfiguration.typeRepresentationStrategyFactory(Neo4jConfiguration.java:
145)
at org.springframework.data.neo4j.config.Neo4jConfiguration$
$EnhancerByCGLIB$$fb07a920.CGLIB$typeRepresentationStrategyFactory
$13(<generated>)
at org.springframework.data.neo4j.config.Neo4jConfiguration$
$EnhancerByCGLIB$$fb07a920$$FastClassByCGLIB$
$9d685628.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at org.springframework.context.annotation.ConfigurationClassEnhancer
$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:280)
at org.springframework.data.neo4j.config.Neo4jConfiguration$
$EnhancerByCGLIB$
$fb07a920.typeRepresentationStrategyFactory(<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:
149)
... 82 more

Any clue on this one? Is there already a stable data graph version
2.1?

Cheers, Florian...

Michael Hunger

unread,
May 2, 2012, 1:21:57 PM5/2/12
to ne...@googlegroups.com
What Spring version are you using?

Michael

kiteflo

unread,
May 2, 2012, 1:29:17 PM5/2/12
to Neo4j
<spring.version>3.1.0.RELEASE</spring.version>
<spring.sec.version>3.1.0.RELEASE</spring.sec.version>
<spring-social.version>1.0.2.RELEASE</spring-social.version>
<spring-social-facebook.version>1.0.1.RELEASE</spring-social-
facebook.version>
<spring-social-twitter.version>1.0.1.RELEASE</spring-social-
twitter.version>

On 2 Mai, 19:21, Michael Hunger <michael.hun...@neotechnology.com>
wrote:

Michael Hunger

unread,
May 2, 2012, 1:30:24 PM5/2/12
to ne...@googlegroups.com
Looks good.

the RC1 is planned for this week, GA for next week.

Michael

Michael Hunger

unread,
May 2, 2012, 1:30:47 PM5/2/12
to ne...@googlegroups.com
Can you share your project with me personally Florian?

Thanks
Michael

kiteflo

unread,
May 2, 2012, 5:13:58 PM5/2/12
to Neo4j
ok...thanx to Michael we solved the issue: some jersey 1.9
dependencies are part of neo4j so you need to have the 1.9 jersey
repos within your pom...which we did not have :-(

add these and everything should worl as expected...

<repositories>
       <repository>
           <id>java.net</id>
           <url>http://download.java.net/maven/2/</url>
       </repository>
       <repository>
           <id>selenium-repository</id>
           <url>http://selenium.googlecode.com/svn/repository</url>
       </repository>
       <repository>
           <id>neo4j-release-repository</id>
           <name>Neo4j Maven 2 release repository</name>
           <url>http://m2.neo4j.org/content/repositories/releases</
url>
           <releases>
               <enabled>true</enabled>
           </releases>
           <snapshots>
               <enabled>false</enabled>
           </snapshots>
       </repository>
       <repository>
           <id>neo4j-snapshot-repository</id>
           <name>Neo4j Maven 2 snapshot repository</name>
           <url>http://m2.neo4j.org/content/repositories/snapshots</
url>
           <snapshots>
               <enabled>true</enabled>
           </snapshots>
           <releases>
               <enabled>false</enabled>
           </releases>
       </repository>
       <repository>
           <id>cukes</id>
           <url>http://cukes.info/maven</url>
       </repository>
   </repositories>

thanx Michael - you saved our day/week!


On 2 Mai, 19:30, Michael Hunger <michael.hun...@neotechnology.com>
wrote:

Peter Neubauer

unread,
May 2, 2012, 5:14:31 PM5/2/12
to ne...@googlegroups.com
That guys always does.

Michael, you are incredible.

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j

kiteflo

unread,
May 3, 2012, 2:17:25 AM5/3/12
to Neo4j
Hi...unfortunately we lost scope of our initial error we've been
posting and after seeking, trying and experimenting we finally figured
out:

for some reason (we are using annotation based spring configuration)
usage of "gds" shortterm does not work anymore with our current Spring
GDS (2.1.0 Build Snpashot) Neo (1.7) configuration, previously this
one used to work (part of our applicationContext.xml):

<!-- Spring data neo4j configuration -->
<bean id="gds" class="org.neo4j.kernel.EmbeddedGraphDatabase"
destroy-method="shutdown">
<constructor-arg value="${neo.location}"/>
</bean>

<neo4j:config graphDatabaseService="gds"/>

<!-- Cypher query server... -->
<bean id="serverWrapper"
class="org.neo4j.server.WrappingNeoServerBootstrapper" init-
method="start" destroy-method="stop">
<constructor-arg ref="gds"/>
</bean>

Now usage of gds fails for some reason, instead of this u have to use
"graphDatabaseService" this will enable you to get rid of this startup
exception...:

<!-- Spring data neo4j configuration -->
<bean id="graphDatabaseService"
class="org.neo4j.kernel.EmbeddedGraphDatabase" destroy-
method="shutdown">
<constructor-arg value="${neo.location}"/>
</bean>

<neo4j:config graphDatabaseService="graphDatabaseService"/>

<!-- Cypher query server... -->
<bean id="serverWrapper"
class="org.neo4j.server.WrappingNeoServerBootstrapper" init-
method="start" destroy-method="stop">
<constructor-arg ref="graphDatabaseService"/>
</bean>

Cheers, Florian!

On 2 Mai, 23:14, Peter Neubauer <peter.neuba...@neotechnology.com>
wrote:

Peter Neubauer

unread,
May 7, 2012, 3:57:54 AM5/7/12
to ne...@googlegroups.com
Florian,
is this still unsolved?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j


Peter Neubauer

unread,
Apr 19, 2013, 6:11:44 AM4/19/13
to Neo4j User
Ahh,
good to know! Hope this will get unnecessary in future versions. Is there an issue in SDN for it?

/peter


Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

The authoritative book on graph databases - http://graphdatabases.com
Neo4j questions? Please use SO - http://stackoverflow.com/search?q=neo4j


On Thu, Apr 18, 2013 at 5:21 PM, Matthew Ouyang <matthew...@gmail.com> wrote:
Peter, 

I can confirm the issue as Florian describes - that the bean must be named 'graphDatabaseService' - still exists.  I was using the Spring Data Neo4j 2.2.0-RELEASE and added the Jersey 1.9.1 dependency as described (although I suspect it is unrelated to the original problem).  When I make the change in my project that Florian suggested, I no longer received the startup error.

Matt

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages