Hi folks,
I am successfully using Neo4j repositories (Spring Data and IoC) running in
JUnit. However, the same JAR wrapped in a plugin ("New Plug-in from
Exisiting JAR archives") and hosted in Eclipse has issues when creating a
repository bean.
To clarify that, I have two Eclipse plugins, one that encapsulates both my
data access code and references to Neo and other JARs. There is a second
plugin that consumes the first by creating the IoC container and calling
getBean, at which point (if it is a repository) I get
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
qualifying bean of type [x.y.z.StupidRepository] is defined. I can however
create a bean that is explicitly defined e.g. I can get an instance of
GraphDatabase by calling getBean.
Having spent some time investigating this, it appears that it could be a
conflict between OSGi and classloaders. This rings true because the repos
are seemingly run-time constructs driven by scanning i.e.
@EnableNeo4jRepositories(basePackages = "x.y.z.repositories"). One thing I
did is make sure that the consuming plugin imported all of my repo packages
in the manifest. Perhaps, there are other Neo related imports required? Or
more likely I am barking up the wrong tree entirely?
There is a post that may be related to this from some time ago
https://groups.google.com/forum/#!searchin/neo4j/osgi/neo4j/GOVQSyJlXAM/W7_zJgSiBr4J
that references an article that is no longer available :-(
http://docs.neo4j.org/chunked/snapshot/tutorials-java-embedded-osgi.html.
This also looks promising but contains a dead link
http://docs.neo4j.org/chunked/snapshot/tutorials-java-embedded-osgi.html#_simple_osgi_activator_scenario
versions;
*neo4j-2.0.1*
*spring-data-neo4j-3.0.0.RELEASE*
*spring-beans-4.0.3.RELEASE*
Any pointers would be greatly appreciated
Thanks,
Dan.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.