Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-26 Thread Peter Neubauer
Mmh,
the question is if at least the exceptions and the TX abstract classes could
be moved into exported packages. Still, instantiating implementation classes
in the templates is probably the root of the problems. But then, as with
pointing out implementations through the Java Service notion, somewhere we
have to point out these things.

We should probably go through these classes and determine the absolute
minimum of public access that we need to expose in order to make this work.
Meanwhile, if you change manifests and export the offending impl* pacakges,
are things working out?

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Mon, May 23, 2011 at 3:51 PM, Michael Hunger 
michael.hun...@neotechnology.com wrote:

 What we are currently using inside of SDG are:

 * TX/XA-Manager Implementations and Providers

org.springframework.data.graph.neo4j.config  (2 usages)
Neo4jConfiguration.java  (2 usages)
(23: 24) import
 org.neo4j.kernel.impl.transaction.SpringTransactionManager;
(24: 24) import
 org.neo4j.kernel.impl.transaction.UserTransactionImpl;
org.springframework.data.graph.neo4j.transaction  (6 usages)
SpringProvider.java  (4 usages)
(20: 24) import
 org.neo4j.kernel.impl.core.KernelPanicEventGenerator;
(21: 24) import
 org.neo4j.kernel.impl.transaction.AbstractTransactionManager;
(22: 24) import
 org.neo4j.kernel.impl.transaction.TransactionManagerProvider;
(23: 24) import
 org.neo4j.kernel.impl.transaction.TxFinishHook;
SpringServiceImpl.java  (2 usages)
(19: 24) import
 org.neo4j.kernel.impl.transaction.AbstractTransactionManager;
(20: 24) import
 org.neo4j.kernel.impl.transaction.XaDataSourceManager;


 * LuceneIndex Implementations (but that is minor and can be removed)

org.springframework.data.graph.neo4j.support  (2 usages)
DelegatingGraphDatabase.java  (1 usage)
(23: 23) import
 org.neo4j.index.impl.lucene.LuceneIndexImplementation;
GraphDatabaseContext.java  (1 usage)
(25: 23) import
 org.neo4j.index.impl.lucene.LuceneIndexImplementation;


 * Exceptions for Exception-Translation

org.springframework.data.graph.neo4j.template  (7 usages)
Neo4jExceptionTranslator.java  (7 usages)
(22: 23) import
 org.neo4j.index.impl.lucene.QueryNotPossibleException;
(24: 24) import
 org.neo4j.kernel.impl.core.ReadOnlyDbException;
(25: 24) import
 org.neo4j.kernel.impl.nioneo.store.StoreFailureException;
(26: 24) import
 org.neo4j.kernel.impl.persistence.IdGenerationFailedException;
(27: 24) import
 org.neo4j.kernel.impl.transaction.IllegalResourceException;
(28: 24) import
 org.neo4j.kernel.impl.transaction.LockException;
(29: 24) import
 org.neo4j.kernel.impl.transaction.xaframework.ReadPastEndException;


 The last could be done by String comparision which I wouldn't like, the
 lucene impl dependency could be removed (is just about using the same config
 as internally) but the TX stuff would have to be moved (imho).

 Cheers

 Michael

 Am 23.05.2011 um 15:44 schrieb Jean-Pierre Bergamin:

  I have not spent much more time trying to get SDG running as a bundle
  any more. I'll give it another shot today or tomorrow and let you know
  how I'm proceeding.
 
  What definitively has to be done is fixing the package imports of SDG
  and the package exports of neo4j (see
  https://jira.springsource.org/browse/DATAGRAPH-88) so that SDG is not
  using *.impl.* package of neo4j anymore. Maybe some of the classes
  that are publicly used in SDG must be moved out of the *.impl.*
  package in neo4j.
 
 
 
  Best regards,
  James
 
 
  2011/5/20 Peter Neubauer peter.neuba...@neotechnology.com:
  Hi there,
  any solution to this or do we need to dig deeper here?
 
  Cheers,
 
  /peter neubauer
 
  GTalk:  neubauer.peter
  Skype   peter.neubauer
  Phone   +46 704 106975
  LinkedIn   http://www.linkedin.com/in/neubauer
  Twitter  http://twitter.com/peterneubauer
 
  http://www.neo4j.org   - Your high performance graph
 database.
  http://startupbootcamp.org/- Öresund - Innovation happens HERE.
  http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
  On Mon, May 16, 2011 at 3:28 PM, Jean-Pierre Bergamin
  

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-24 Thread Jean-Pierre Bergamin
Peter,
The classes that Martin Hunger listed are the offending ones.


Best regards,
Jean-Pierre


2011/5/23 Peter Neubauer peter.neuba...@neotechnology.com:
 Jean-Pierre,
 do you know which classes exactly are the offending ones in neo4j *impl?
 Would like to know in order to either avoid suing them or move them into the
 API.

 Cheers,

 /peter neubauer

 GTalk:      neubauer.peter
 Skype       peter.neubauer
 Phone       +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter      http://twitter.com/peterneubauer

 http://www.neo4j.org               - Your high performance graph database.
 http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


 On Mon, May 23, 2011 at 3:44 PM, Jean-Pierre Bergamin
 jpberga...@gmail.comwrote:

 I have not spent much more time trying to get SDG running as a bundle
 any more. I'll give it another shot today or tomorrow and let you know
 how I'm proceeding.

 What definitively has to be done is fixing the package imports of SDG
 and the package exports of neo4j (see
 https://jira.springsource.org/browse/DATAGRAPH-88) so that SDG is not
 using *.impl.* package of neo4j anymore. Maybe some of the classes
 that are publicly used in SDG must be moved out of the *.impl.*
 package in neo4j.



 Best regards,
 James


 2011/5/20 Peter Neubauer peter.neuba...@neotechnology.com:
  Hi there,
  any solution to this or do we need to dig deeper here?
 
  Cheers,
 
  /peter neubauer
 
  GTalk:      neubauer.peter
  Skype       peter.neubauer
  Phone       +46 704 106975
  LinkedIn   http://www.linkedin.com/in/neubauer
  Twitter      http://twitter.com/peterneubauer
 
  http://www.neo4j.org               - Your high performance graph
 database.
  http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
  http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
  On Mon, May 16, 2011 at 3:28 PM, Jean-Pierre Bergamin
  jpberga...@gmail.comwrote:
 
  This could be the problem, yes. The repository factories that create
  the repositories from the interface definitions would need to import
  the domain specific packages that contain the interfaces to have
  access to them - which requires buddy loading.
 
  It seems as if the CGLIB enhanced class
  org.springframework.data.graph.neo4j.config.Neo4jConfiguration cannot
  be created when the app starts up. This is the relevant part of the
  log file:
 
  [2011-05-16 15:10:49.467] region-dm-3
  o.s.beans.factory.support.DefaultListableBeanFactory
  Creating shared instance of singleton bean
  'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
  [2011-05-16 15:10:49.467] region-dm-3
  o.s.beans.factory.support.DefaultListableBeanFactory
  Creating instance of bean
  'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.factory.annotation.InjectionMetadata
  Found injected element on class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
  AutowiredFieldElement for private javax.validation.Validator
  org.springframework.data.graph.neo4j.config.Neo4jConfiguration.validator
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.factory.annotation.InjectionMetadata
  Found injected element on class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
  AutowiredMethodElement for public void
 
 
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setGraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService)
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.factory.annotation.InjectionMetadata
  Found injected element on class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
  AutowiredMethodElement for public void
 
 
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setEntityManagerFactory(javax.persistence.EntityManagerFactory)
  [2011-05-16 15:10:49.471] region-dm-3
  o.s.beans.factory.support.DefaultListableBeanFactory
  Eagerly caching bean
  'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' to
  allow for resolving potential circular references
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.CachedIntrospectionResults
  Getting BeanInfo for class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]
  [2011-05-16 15:10:49.472] region-dm-3
  org.springframework.osgi.util.DebugUtils
  Could not find class
 
 
 

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-23 Thread Jean-Pierre Bergamin
I have not spent much more time trying to get SDG running as a bundle
any more. I'll give it another shot today or tomorrow and let you know
how I'm proceeding.

What definitively has to be done is fixing the package imports of SDG
and the package exports of neo4j (see
https://jira.springsource.org/browse/DATAGRAPH-88) so that SDG is not
using *.impl.* package of neo4j anymore. Maybe some of the classes
that are publicly used in SDG must be moved out of the *.impl.*
package in neo4j.



Best regards,
James


2011/5/20 Peter Neubauer peter.neuba...@neotechnology.com:
 Hi there,
 any solution to this or do we need to dig deeper here?

 Cheers,

 /peter neubauer

 GTalk:      neubauer.peter
 Skype       peter.neubauer
 Phone       +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter      http://twitter.com/peterneubauer

 http://www.neo4j.org               - Your high performance graph database.
 http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


 On Mon, May 16, 2011 at 3:28 PM, Jean-Pierre Bergamin
 jpberga...@gmail.comwrote:

 This could be the problem, yes. The repository factories that create
 the repositories from the interface definitions would need to import
 the domain specific packages that contain the interfaces to have
 access to them - which requires buddy loading.

 It seems as if the CGLIB enhanced class
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration cannot
 be created when the app starts up. This is the relevant part of the
 log file:

 [2011-05-16 15:10:49.467] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Creating shared instance of singleton bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
 [2011-05-16 15:10:49.467] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Creating instance of bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.factory.annotation.InjectionMetadata
 Found injected element on class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
 AutowiredFieldElement for private javax.validation.Validator
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.validator
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.factory.annotation.InjectionMetadata
 Found injected element on class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
 AutowiredMethodElement for public void

 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setGraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService)
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.factory.annotation.InjectionMetadata
 Found injected element on class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
 AutowiredMethodElement for public void

 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setEntityManagerFactory(javax.persistence.EntityManagerFactory)
 [2011-05-16 15:10:49.471] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Eagerly caching bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' to
 allow for resolving potential circular references
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.CachedIntrospectionResults
 Getting BeanInfo for class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]
 [2011-05-16 15:10:49.472] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Could not find class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70aBeanInfo]
 required by [neo4j.domain(com.example.neo4j.domain)] scanning
 available bundles
 [2011-05-16 15:10:49.472] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Class is correctly imported as version [1.0.0], checking providing
 bundles
 [2011-05-16 15:10:49.476] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports
 [org.springframework.data.graph.neo4j.config] as version
 [1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required
 [2011-05-16 15:10:49.477] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Could not find class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330BeanInfo]
 required by [neo4j.domain(com.example.neo4j.domain)] scanning
 available bundles
 [2011-05-16 15:10:49.477] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Class is 

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-23 Thread Michael Hunger
What we are currently using inside of SDG are:

* TX/XA-Manager Implementations and Providers

org.springframework.data.graph.neo4j.config  (2 usages)
Neo4jConfiguration.java  (2 usages)
(23: 24) import 
org.neo4j.kernel.impl.transaction.SpringTransactionManager;
(24: 24) import 
org.neo4j.kernel.impl.transaction.UserTransactionImpl;
org.springframework.data.graph.neo4j.transaction  (6 usages)
SpringProvider.java  (4 usages)
(20: 24) import 
org.neo4j.kernel.impl.core.KernelPanicEventGenerator;
(21: 24) import 
org.neo4j.kernel.impl.transaction.AbstractTransactionManager;
(22: 24) import 
org.neo4j.kernel.impl.transaction.TransactionManagerProvider;
(23: 24) import 
org.neo4j.kernel.impl.transaction.TxFinishHook;
SpringServiceImpl.java  (2 usages)
(19: 24) import 
org.neo4j.kernel.impl.transaction.AbstractTransactionManager;
(20: 24) import 
org.neo4j.kernel.impl.transaction.XaDataSourceManager;


* LuceneIndex Implementations (but that is minor and can be removed)

org.springframework.data.graph.neo4j.support  (2 usages)
DelegatingGraphDatabase.java  (1 usage)
(23: 23) import 
org.neo4j.index.impl.lucene.LuceneIndexImplementation;
GraphDatabaseContext.java  (1 usage)
(25: 23) import 
org.neo4j.index.impl.lucene.LuceneIndexImplementation;


* Exceptions for Exception-Translation

org.springframework.data.graph.neo4j.template  (7 usages)
Neo4jExceptionTranslator.java  (7 usages)
(22: 23) import 
org.neo4j.index.impl.lucene.QueryNotPossibleException;
(24: 24) import 
org.neo4j.kernel.impl.core.ReadOnlyDbException;
(25: 24) import 
org.neo4j.kernel.impl.nioneo.store.StoreFailureException;
(26: 24) import 
org.neo4j.kernel.impl.persistence.IdGenerationFailedException;
(27: 24) import 
org.neo4j.kernel.impl.transaction.IllegalResourceException;
(28: 24) import 
org.neo4j.kernel.impl.transaction.LockException;
(29: 24) import 
org.neo4j.kernel.impl.transaction.xaframework.ReadPastEndException;


The last could be done by String comparision which I wouldn't like, the lucene 
impl dependency could be removed (is just about using the same config as 
internally) but the TX stuff would have to be moved (imho).

Cheers

Michael

Am 23.05.2011 um 15:44 schrieb Jean-Pierre Bergamin:

 I have not spent much more time trying to get SDG running as a bundle
 any more. I'll give it another shot today or tomorrow and let you know
 how I'm proceeding.
 
 What definitively has to be done is fixing the package imports of SDG
 and the package exports of neo4j (see
 https://jira.springsource.org/browse/DATAGRAPH-88) so that SDG is not
 using *.impl.* package of neo4j anymore. Maybe some of the classes
 that are publicly used in SDG must be moved out of the *.impl.*
 package in neo4j.
 
 
 
 Best regards,
 James
 
 
 2011/5/20 Peter Neubauer peter.neuba...@neotechnology.com:
 Hi there,
 any solution to this or do we need to dig deeper here?
 
 Cheers,
 
 /peter neubauer
 
 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer
 
 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
 On Mon, May 16, 2011 at 3:28 PM, Jean-Pierre Bergamin
 jpberga...@gmail.comwrote:
 
 This could be the problem, yes. The repository factories that create
 the repositories from the interface definitions would need to import
 the domain specific packages that contain the interfaces to have
 access to them - which requires buddy loading.
 
 It seems as if the CGLIB enhanced class
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration cannot
 be created when the app starts up. This is the relevant part of the
 log file:
 
 [2011-05-16 15:10:49.467] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Creating shared instance of singleton bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
 [2011-05-16 15:10:49.467] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Creating instance of bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.factory.annotation.InjectionMetadata
 Found injected element on class
 
 

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-23 Thread Peter Neubauer
Jean-Pierre,
do you know which classes exactly are the offending ones in neo4j *impl?
Would like to know in order to either avoid suing them or move them into the
API.

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Mon, May 23, 2011 at 3:44 PM, Jean-Pierre Bergamin
jpberga...@gmail.comwrote:

 I have not spent much more time trying to get SDG running as a bundle
 any more. I'll give it another shot today or tomorrow and let you know
 how I'm proceeding.

 What definitively has to be done is fixing the package imports of SDG
 and the package exports of neo4j (see
 https://jira.springsource.org/browse/DATAGRAPH-88) so that SDG is not
 using *.impl.* package of neo4j anymore. Maybe some of the classes
 that are publicly used in SDG must be moved out of the *.impl.*
 package in neo4j.



 Best regards,
 James


 2011/5/20 Peter Neubauer peter.neuba...@neotechnology.com:
  Hi there,
  any solution to this or do we need to dig deeper here?
 
  Cheers,
 
  /peter neubauer
 
  GTalk:  neubauer.peter
  Skype   peter.neubauer
  Phone   +46 704 106975
  LinkedIn   http://www.linkedin.com/in/neubauer
  Twitter  http://twitter.com/peterneubauer
 
  http://www.neo4j.org   - Your high performance graph
 database.
  http://startupbootcamp.org/- Öresund - Innovation happens HERE.
  http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
  On Mon, May 16, 2011 at 3:28 PM, Jean-Pierre Bergamin
  jpberga...@gmail.comwrote:
 
  This could be the problem, yes. The repository factories that create
  the repositories from the interface definitions would need to import
  the domain specific packages that contain the interfaces to have
  access to them - which requires buddy loading.
 
  It seems as if the CGLIB enhanced class
  org.springframework.data.graph.neo4j.config.Neo4jConfiguration cannot
  be created when the app starts up. This is the relevant part of the
  log file:
 
  [2011-05-16 15:10:49.467] region-dm-3
  o.s.beans.factory.support.DefaultListableBeanFactory
  Creating shared instance of singleton bean
  'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
  [2011-05-16 15:10:49.467] region-dm-3
  o.s.beans.factory.support.DefaultListableBeanFactory
  Creating instance of bean
  'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.factory.annotation.InjectionMetadata
  Found injected element on class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
  AutowiredFieldElement for private javax.validation.Validator
  org.springframework.data.graph.neo4j.config.Neo4jConfiguration.validator
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.factory.annotation.InjectionMetadata
  Found injected element on class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
  AutowiredMethodElement for public void
 
 
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setGraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService)
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.factory.annotation.InjectionMetadata
  Found injected element on class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
  AutowiredMethodElement for public void
 
 
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setEntityManagerFactory(javax.persistence.EntityManagerFactory)
  [2011-05-16 15:10:49.471] region-dm-3
  o.s.beans.factory.support.DefaultListableBeanFactory
  Eagerly caching bean
  'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' to
  allow for resolving potential circular references
  [2011-05-16 15:10:49.471] region-dm-3
  org.springframework.beans.CachedIntrospectionResults
  Getting BeanInfo for class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]
  [2011-05-16 15:10:49.472] region-dm-3
  org.springframework.osgi.util.DebugUtils
  Could not find class
 
 
 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70aBeanInfo]
  required by [neo4j.domain(com.example.neo4j.domain)] scanning
  available bundles
  [2011-05-16 15:10:49.472] region-dm-3
  

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-20 Thread Peter Neubauer
Hi there,
any solution to this or do we need to dig deeper here?

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Mon, May 16, 2011 at 3:28 PM, Jean-Pierre Bergamin
jpberga...@gmail.comwrote:

 This could be the problem, yes. The repository factories that create
 the repositories from the interface definitions would need to import
 the domain specific packages that contain the interfaces to have
 access to them - which requires buddy loading.

 It seems as if the CGLIB enhanced class
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration cannot
 be created when the app starts up. This is the relevant part of the
 log file:

 [2011-05-16 15:10:49.467] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Creating shared instance of singleton bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
 [2011-05-16 15:10:49.467] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Creating instance of bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.factory.annotation.InjectionMetadata
 Found injected element on class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
 AutowiredFieldElement for private javax.validation.Validator
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.validator
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.factory.annotation.InjectionMetadata
 Found injected element on class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
 AutowiredMethodElement for public void

 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setGraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService)
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.factory.annotation.InjectionMetadata
 Found injected element on class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
 AutowiredMethodElement for public void

 org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setEntityManagerFactory(javax.persistence.EntityManagerFactory)
 [2011-05-16 15:10:49.471] region-dm-3
 o.s.beans.factory.support.DefaultListableBeanFactory
 Eagerly caching bean
 'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' to
 allow for resolving potential circular references
 [2011-05-16 15:10:49.471] region-dm-3
 org.springframework.beans.CachedIntrospectionResults
 Getting BeanInfo for class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]
 [2011-05-16 15:10:49.472] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Could not find class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70aBeanInfo]
 required by [neo4j.domain(com.example.neo4j.domain)] scanning
 available bundles
 [2011-05-16 15:10:49.472] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Class is correctly imported as version [1.0.0], checking providing
 bundles
 [2011-05-16 15:10:49.476] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports
 [org.springframework.data.graph.neo4j.config] as version
 [1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required
 [2011-05-16 15:10:49.477] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Could not find class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330BeanInfo]
 required by [neo4j.domain(com.example.neo4j.domain)] scanning
 available bundles
 [2011-05-16 15:10:49.477] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Class is correctly imported as version [1.0.0], checking providing
 bundles
 [2011-05-16 15:10:49.481] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports
 [org.springframework.data.graph.neo4j.config] as version
 [1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required
 [2011-05-16 15:10:49.482] region-dm-3
 org.springframework.osgi.util.DebugUtils
 Could not find class

 [org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448BeanInfo]
 required by 

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-16 Thread Jean-Pierre Bergamin
This could be the problem, yes. The repository factories that create
the repositories from the interface definitions would need to import
the domain specific packages that contain the interfaces to have
access to them - which requires buddy loading.

It seems as if the CGLIB enhanced class
org.springframework.data.graph.neo4j.config.Neo4jConfiguration cannot
be created when the app starts up. This is the relevant part of the
log file:

[2011-05-16 15:10:49.467] region-dm-3
o.s.beans.factory.support.DefaultListableBeanFactory
Creating shared instance of singleton bean
'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
[2011-05-16 15:10:49.467] region-dm-3
o.s.beans.factory.support.DefaultListableBeanFactory
Creating instance of bean
'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0'
[2011-05-16 15:10:49.471] region-dm-3
org.springframework.beans.factory.annotation.InjectionMetadata
Found injected element on class
[org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
AutowiredFieldElement for private javax.validation.Validator
org.springframework.data.graph.neo4j.config.Neo4jConfiguration.validator
[2011-05-16 15:10:49.471] region-dm-3
org.springframework.beans.factory.annotation.InjectionMetadata
Found injected element on class
[org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
AutowiredMethodElement for public void
org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setGraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService)
[2011-05-16 15:10:49.471] region-dm-3
org.springframework.beans.factory.annotation.InjectionMetadata
Found injected element on class
[org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]:
AutowiredMethodElement for public void
org.springframework.data.graph.neo4j.config.Neo4jConfiguration.setEntityManagerFactory(javax.persistence.EntityManagerFactory)
[2011-05-16 15:10:49.471] region-dm-3
o.s.beans.factory.support.DefaultListableBeanFactory
Eagerly caching bean
'org.springframework.data.graph.neo4j.config.Neo4jConfiguration#0' to
allow for resolving potential circular references
[2011-05-16 15:10:49.471] region-dm-3
org.springframework.beans.CachedIntrospectionResults
Getting BeanInfo for class
[org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70a]
[2011-05-16 15:10:49.472] region-dm-3
org.springframework.osgi.util.DebugUtils
Could not find class
[org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330$$EnhancerByCGLIB$$4422c70aBeanInfo]
required by [neo4j.domain(com.example.neo4j.domain)] scanning
available bundles
[2011-05-16 15:10:49.472] region-dm-3
org.springframework.osgi.util.DebugUtils
Class is correctly imported as version [1.0.0], checking providing
bundles
[2011-05-16 15:10:49.476] region-dm-3
org.springframework.osgi.util.DebugUtils
Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports
[org.springframework.data.graph.neo4j.config] as version
[1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required
[2011-05-16 15:10:49.477] region-dm-3
org.springframework.osgi.util.DebugUtils
Could not find class
[org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448$$EnhancerByCGLIB$$e7c2c330BeanInfo]
required by [neo4j.domain(com.example.neo4j.domain)] scanning
available bundles
[2011-05-16 15:10:49.477] region-dm-3
org.springframework.osgi.util.DebugUtils
Class is correctly imported as version [1.0.0], checking providing
bundles
[2011-05-16 15:10:49.481] region-dm-3
org.springframework.osgi.util.DebugUtils
Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports
[org.springframework.data.graph.neo4j.config] as version
[1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required
[2011-05-16 15:10:49.482] region-dm-3
org.springframework.osgi.util.DebugUtils
Could not find class
[org.springframework.data.graph.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$775b2448BeanInfo]
required by [neo4j.domain(com.example.neo4j.domain)] scanning
available bundles
[2011-05-16 15:10:49.482] region-dm-3
org.springframework.osgi.util.DebugUtils
Class is correctly imported as version [1.0.0], checking providing
bundles
[2011-05-16 15:10:49.486] region-dm-3
org.springframework.osgi.util.DebugUtils
Bundle [Spring Data Neo4J (org.springframework.data.neo4j)] exports
[org.springframework.data.graph.neo4j.config] as version
[1.1.0.BUILD-SNAPSHOT] but version [1.0.0] was required
[2011-05-16 15:10:49.487] region-dm-3
org.springframework.osgi.util.DebugUtils
Could not find class
[org.springframework.data.graph.neo4j.config.Neo4jConfigurationBeanInfo]
required by 

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-15 Thread Neale Upstone
  In OSGi, missing classes can be down to which bundles are visible to 
the bundle doing the scanning.  In this case, whatever is doing the 
classpath scanning cannot see the bundle exporting your domain package.

 From a number of years back, I remember having to use 
eclipse-registerbuddy to solve a classloader visibility issue.  I'm not 
sure what the standard approach to this became.  A quick search doesn't 
deliver anything definitive for bundle-buddypolicy, which I suspect is 
the standardised mechanism.



On 13/05/2011 15:10, Jean-Pierre Bergamin wrote:
 I just could resove some more issues.
 First of all I had to excplicitely add an Import-Package directive in
 the template.mf of our project for packages that are not recognized by
 bundlor (as the one for the missing Neo4jConfiguration):

 Import-Package:
   org.springframework.data.graph.neo4j.config;version=[1.1.0, 1.2.0),
   org.springframework.data.repository.support;version=[1.0.0, 1.2.0),
   org.springframework.transaction.aspectj;version=[3.0, 3.1)

 I also had to put Import-Pacakge statements for cglib packages to the
 spring data neo4j bundle.

 The next problem I'm facing is that graph repositories cannot be
 injected, because they seem not to be created by SDG:

 [2011-05-13 16:06:29.786] region-dm-0AGE
 Application context creation failure for bundle
 'com.example.neo4j.domain' version '0.0.1.BUILD-SNAPSHOT'.
 org.springframework.beans.factory.BeanCreationException: Error
 creating bean with name 'serviceRepositoryImpl': Injection of
 autowired dependencies failed; nested exception is
 org.springframework.beans.factory.BeanCreationException: Could not
 autowire field: private com.example.neo4j.ServiceRepository
 com.example.neo4j.ServiceRepositoryImpl.serviceRepository; nested
 exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
 No matching bean of type [com.example.neo4j.ServiceRepository] found
 for dependency: expected at least 1 bean which qualifies as autowire
 candidate for this dependency. Dependency annotations:
 {@org.springframework.beans.factory.annotation.Autowired(required=true)}
   at 
 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285)
   at 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
   at 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   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.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
   at 
 org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
   at 
 org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
   at 
 org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 Caused by: org.springframework.beans.factory.BeanCreationException:
 Could not autowire field: private com.example.neo4j.ServiceRepository
 com.example.neo4j.ServiceRepositoryImpl.serviceRepository; nested
 exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
 No matching bean of type 

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-13 Thread Nicolas Jouanin
Hi,

I've written an article [1] showing how to run neo4j embedded database
inside an OSGi container. Starting from that I think you can create a bundle
which uses this database to create the appropriate Spring data
configuration. I suppose that spring-data-graph is packaged as a OSGi
compatible jar, so using spring-dm too should do it.


[1] http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation

2011/5/13 Michael Hunger michael.hun...@neotechnology.com

 I'm no expert in OSGi so I did just the minimal thing, adding bundlor
 information to the maven build. This is obviously not successful enough.

 So I would be very happy I someone would pull spring data graph put in the
 correct OSGi information and send me a pull request.

 Cheers

 Michael

 Am 13.05.2011 um 11:26 schrieb Jean-Pierre Bergamin:

  Dear neo4j community
 
  I'm so free to cross post a question to this list that I already posted
 in
  the spring forum (
 
 http://forum.springsource.org/showthread.php?109267-Spring-Data-Graph-in-OSGi-environment
 ),
  since most of the SDG experts probably are subscribed to this list. ;-)
  Could anyone get spring data graph successfully up and running in an OSGi
  container?
 
 
  Best regards,
  James
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-13 Thread Nicolas Jouanin
Well, at the minimum, it's only a question of adding some extra headers
(Bundle-Symbolic, Export-Package; ...) in the package MANIFEST and this can
be done automatically using the maven-bundle-plugin.
You can have a look at Neo4j pom file or this second article :
http://wiki.escapek.org/display/DEV/Create+OSGi+bundle+from+regular+jar+archive



2011/5/13 Michael Hunger michael.hun...@neotechnology.com

 The issue is about Spring Data Graph not being correctly packaged as OSGi
 bundle / compatible jar.

 And I have neither the knowledge nor the resources at the moment to fix
 that.

 So if any one of you can help out with that, this would be most welcome.

 Thanks

 Michael

 Am 13.05.2011 um 11:42 schrieb Nicolas Jouanin:

  Hi,
 
  I've written an article [1] showing how to run neo4j embedded database
  inside an OSGi container. Starting from that I think you can create a
 bundle
  which uses this database to create the appropriate Spring data
  configuration. I suppose that spring-data-graph is packaged as a OSGi
  compatible jar, so using spring-dm too should do it.
 
 
  [1]
 http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation
 
  2011/5/13 Michael Hunger michael.hun...@neotechnology.com
 
  I'm no expert in OSGi so I did just the minimal thing, adding bundlor
  information to the maven build. This is obviously not successful enough.
 
  So I would be very happy I someone would pull spring data graph put in
 the
  correct OSGi information and send me a pull request.
 
  Cheers
 
  Michael
 
  Am 13.05.2011 um 11:26 schrieb Jean-Pierre Bergamin:
 
  Dear neo4j community
 
  I'm so free to cross post a question to this list that I already posted
  in
  the spring forum (
 
 
 http://forum.springsource.org/showthread.php?109267-Spring-Data-Graph-in-OSGi-environment
  ),
  since most of the SDG experts probably are subscribed to this list. ;-)
  Could anyone get spring data graph successfully up and running in an
 OSGi
  container?
 
 
  Best regards,
  James
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-13 Thread Jean-Pierre Bergamin
SDG is using bundlor to generate the MANIFEST.MF file.I already fixed
the MANIFEST and the spring data neo4j bundle can now be resolved.

But when the spring application context is loaded, the class
org.springframework.data.graph.neo4j.config.Neo4jConfiguration
cannot be found during bean postprocessing and aspectj magic (see
stacktrace below).
The class is available and exported. I checked that with clhas and
clexport on the Virgo console. Does maybe the kernel space of Virgo
has to to know the spring data neo4j bundle, because this aspectj
enhancements are performed there?


Best regards
James

[2011-05-12 16:44:23.865] region-dm-14 AGE
Application context creation failure for bundle
'com.example.neo4j.domain' version '0.0.1.BUILD-SNAPSHOT'.
java.lang.IllegalStateException: Cannot load configuration class:
org.springframework.data.graph.neo4j.config.Neo4jConfiguration
at 
org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:246)
at 
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:160)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:479)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:467)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:395)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:281)
at 
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
at 
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)
at 
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)
at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
at 
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
at 
org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)



2011/5/13 Nicolas Jouanin nicolas.joua...@gmail.com

 Well, at the minimum, it's only a question of adding some extra headers
 (Bundle-Symbolic, Export-Package; ...) in the package MANIFEST and this can
 be done automatically using the maven-bundle-plugin.
 You can have a look at Neo4j pom file or this second article :
 http://wiki.escapek.org/display/DEV/Create+OSGi+bundle+from+regular+jar+archive



 2011/5/13 Michael Hunger michael.hun...@neotechnology.com

  The issue is about Spring Data Graph not being correctly packaged as OSGi
  bundle / compatible jar.
 
  And I have neither the knowledge nor the resources at the moment to fix
  that.
 
  So if any one of you can help out with that, this would be most welcome.
 
  Thanks
 
  Michael
 
  Am 13.05.2011 um 11:42 schrieb Nicolas Jouanin:
 
   Hi,
  
   I've written an article [1] showing how to run neo4j embedded database
   inside an OSGi container. Starting from that I think you can create a
  bundle
   which uses this database to create the appropriate Spring data
   configuration. I suppose that spring-data-graph is packaged as a OSGi
   compatible jar, so using spring-dm too should do it.
  
  
   [1]
  http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation
  
   2011/5/13 Michael Hunger michael.hun...@neotechnology.com
  
   I'm no expert in OSGi so I did just the minimal thing, adding bundlor
   information to the maven build. This is obviously not successful enough.
  
   So I would be very happy I someone would pull spring data graph put in
  the
   correct OSGi information and send me a pull request.
  
   Cheers
  
   Michael
  
   Am 13.05.2011 um 11:26 schrieb Jean-Pierre Bergamin:
  
   Dear neo4j community
  
   I'm so free to cross post a question to this list that I already posted
   in
   the spring forum (
  
  
  

Re: [Neo4j] Spring Data Graph in an OSGi environment

2011-05-13 Thread Michael Hunger
Forwarded it to the AJ project lead Andy Clement, he knows this OSGi + AJ stuff 
certainly better than me :)

Cheers

Michael

Am 13.05.2011 um 14:03 schrieb Jean-Pierre Bergamin:

 SDG is using bundlor to generate the MANIFEST.MF file.I already fixed
 the MANIFEST and the spring data neo4j bundle can now be resolved.
 
 But when the spring application context is loaded, the class
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration
 cannot be found during bean postprocessing and aspectj magic (see
 stacktrace below).
 The class is available and exported. I checked that with clhas and
 clexport on the Virgo console. Does maybe the kernel space of Virgo
 has to to know the spring data neo4j bundle, because this aspectj
 enhancements are performed there?
 
 
 Best regards
 James
 
 [2011-05-12 16:44:23.865] region-dm-14 AGE
 Application context creation failure for bundle
 'com.example.neo4j.domain' version '0.0.1.BUILD-SNAPSHOT'.
 java.lang.IllegalStateException: Cannot load configuration class:
 org.springframework.data.graph.neo4j.config.Neo4jConfiguration
   at 
 org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:246)
   at 
 org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:160)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:479)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:467)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:395)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:281)
   at 
 org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
   at 
 org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)
   at 
 org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)
   at 
 org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
   at 
 org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
   at 
 org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 
 
 
 2011/5/13 Nicolas Jouanin nicolas.joua...@gmail.com
 
 Well, at the minimum, it's only a question of adding some extra headers
 (Bundle-Symbolic, Export-Package; ...) in the package MANIFEST and this can
 be done automatically using the maven-bundle-plugin.
 You can have a look at Neo4j pom file or this second article :
 http://wiki.escapek.org/display/DEV/Create+OSGi+bundle+from+regular+jar+archive
 
 
 
 2011/5/13 Michael Hunger michael.hun...@neotechnology.com
 
 The issue is about Spring Data Graph not being correctly packaged as OSGi
 bundle / compatible jar.
 
 And I have neither the knowledge nor the resources at the moment to fix
 that.
 
 So if any one of you can help out with that, this would be most welcome.
 
 Thanks
 
 Michael
 
 Am 13.05.2011 um 11:42 schrieb Nicolas Jouanin:
 
 Hi,
 
 I've written an article [1] showing how to run neo4j embedded database
 inside an OSGi container. Starting from that I think you can create a
 bundle
 which uses this database to create the appropriate Spring data
 configuration. I suppose that spring-data-graph is packaged as a OSGi
 compatible jar, so using spring-dm too should do it.
 
 
 [1]
 http://wiki.escapek.org/display/DEV/Neo4j+community+edition+installation
 
 2011/5/13 Michael Hunger michael.hun...@neotechnology.com
 
 I'm no expert in OSGi so I did just the minimal thing, adding bundlor
 information to the maven build. This is obviously not successful enough.
 
 So I would be very happy I someone would pull spring data graph put in
 the
 correct OSGi information and send me a pull request.
 
 Cheers
 
 Michael
 
 Am 13.05.2011 um 11:26 schrieb