Re: [Neo4j] OSGi and Neo4j - superbundle approach

2011-07-20 Thread Toni Menzel
btw, sorry about the Tinybundles disruption. The group id "org.ops4j.pax"
was actually wrong since ripping out tinybundles from pax swissbox.
Actually there will be just one tinybundles artifact and it will carry 1.0
really soon.

Until then you may grab latest artifacts from
https://oss.sonatype.org/content/groups/ops4j/ .


On Thu, Jul 21, 2011 at 12:00 AM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> And, there was a bug in Pax Exam not shutting down the bundles
> properly. Fixed by Toni Menzel in 5 minutes. Thanks!
>
> I added some build instructions to https://github.com/neo4j/neo4j-osgi
> to get things working. Give it a try!
>
> 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 Wed, Jul 20, 2011 at 11:12 PM, Peter Neubauer
>  wrote:
> > Ahh,
> > sorry, seems Tinybundles changes groupId and API since my last pull.
> > Pushed the updates. Please try again :)
> >
> > 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 Wed, Jul 20, 2011 at 9:39 PM, Jean-Pierre Bergamin
> >  wrote:
> >> Hi Peter
> >>
> >> When I ran mvn install, I got:
> >> ...
> >> [WARNING] Warning building bundle
> >> org.ops4j.pax.tinybundles:tinybundles:bundle:1.0.0-SNAPSHOT
> >> ...
> >> [INFO] Installing
> >>
> org/ops4j/pax/tinybundles/tinybundles/1.0.0-SNAPSHOT/tinybundles-1.0.0-SNAPSHOT.jar
> >>
> >> I think there is a "tinybundles" to much in between. :-)
> >>
> >> I moved the 1.0.0-SNAPSHOT folder one level up in the .m2/repository
> >> folder structue and at least the tinybundles jar can now be found in
> >> the neo4j-osgi projects.
> >>
> >> I now have compilation errors in the examples project:
> >> [ERROR] Failed to execute goal
> >> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
> >> (default-testCompile) on project neo4j-osgi-examples: Compilatio
> >> n failure: Compilation failure:
> >> [ERROR]
> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46]
> >> package org.ops4j.pax.tinybundles.core.builders does not exist
> >> [ERROR]
> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46]
> >> package org.ops4j.pax.tinybundles.core.builders does not exist
> >> [ERROR]
> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[35,46]
> >> package org.ops4j.pax.tinybundles.core.builders does not exist
> >> [ERROR]
> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[36,46]
> >> package org.ops4j.pax.tinybundles.core.builders does not exist
> >> [ERROR]
> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,39]
> >> cannot find symbol
> >> [ERROR] symbol  : class BndBuilder
> >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest
> >> [ERROR]
> \Users\james\Documents\Development\neo4j-osgi\examples\src\test\java\org\neo4j\examples\osgi\OSGiTest.java:[57,55]
> >> cannot find symbol
> >> [ERROR] symbol  : class SynchronousRawBuilder
> >> [ERROR] location: class org.neo4j.examples.osgi.OSGiTest
> >>
> >> And indeed, the org.ops4j.pax.tinybundles.core.builders package is not
> >> in the tinybundles jar I just built and installed, but only
> >> ..tinybundles.core and ..tinybundles.core.intern. Any ideas?
> >>
> >>
> >> Best regards,
> >> James
> >>
> >> 2011/7/20 Peter Neubauer :
> >>> Hi Jean-Pierre,
> 

Re: [Neo4j] Neo4j is moving to git

2011-01-27 Thread Toni Menzel
On Thu, Jan 27, 2011 at 3:46 PM, Rick Bullotta <
rick.bullo...@burningskysoftware.com> wrote:

> Yep - I know there are settings.  We all just gotta use 'em consistently.
> ;-)
>
> I'm also aware of the Git benefits, which are awesome. Just raising the
> alert that if the repository grows to 40GB with a million forks and a
> zillion copies of dependent jars, well, you get the idea...!
>
Hopefully not a single jar ! And 40GB Git repo without binaries.. you
exaggerate ;)

>
> And believe me, the moment Atlassian offers comprehensive Git support,
> we'll
> be making the switch completely!
>
> It's all good, just suggesting we be cognizant of the things that are
> different in Git.
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On
> Behalf Of Toni Menzel
> Sent: Thursday, January 27, 2011 9:39 AM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Neo4j is moving to git
>
> On Thu, Jan 27, 2011 at 3:33 PM, Rick Bullotta <
> rick.bullo...@burningskysoftware.com> wrote:
>
> > a couple other things to be thinking about:
> >
> > - since we'll all be collaborating in a "mixed environment" of Windows
> and
> > Linux and other, we need to be sensitive to Git settings for CR/LF
> handling
> > when determining what files have changed
> >
> There are settings for that ( don't have the exact page on Github Help here
> right now)
>
> >
> > - since Git generally pulls down the whole repository, it would probably
> > not
> > be a great thing to have a single, ever-growing repository of all neo
> > versions and branches and experiments.  that could be a real disk space
> > hog.
> > we should come up with some reasonable convention for when to split
> > repositories (major versions?  X.Y versions?)
> >
>
> But you do know about Git in general ? No offense here but its a bit
> misplaced. ;) Git is about raw efficiency when it comes to more branches
> you
> can think of, more merges than you have ever wanted in SVN. Think of the
> Linux Kernel ..
>
>
> > All in all, I think it's a good idea, we just need to be aware of all the
> > implications.
> >
> > -Original Message-
> > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> > On
> > Behalf Of Rick Bullotta
> > Sent: Thursday, January 27, 2011 9:25 AM
> > To: 'Neo4j user discussions'
> > Subject: Re: [Neo4j] Neo4j is moving to git
> >
> > I definitely understand the reason for wanting to use Git, with the more
> > frequent forks and branches of late, but I do think it would be helpful
> to
> > make snapshot builds *with source* available for download as ZIPs or TARs
> > as
> > well.  For those of us on Windows, there are practical limitations to how
> > many shell add-ins we can install (right now, I have to use CVS with
> > Mozilla
> > stuff, SVN with our hosted Atlassian JIRA system, and now it looks like
> > I'll
> > also need to use Git for Neo).
> >
> > -Original Message-
> > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> > On
> > Behalf Of Tobias Ivarsson
> > Sent: Thursday, January 27, 2011 9:10 AM
> > To: Neo user discussions
> > Subject: [Neo4j] Neo4j is moving to git
> >
> > Tomorrow, Friday January 28, we will freeze the Neo4j subversion
> repository
> > (https://svn.neo4j.org/).
> > From tomorrow and forward Neo4j subversion will be a read only
> repository.
> > The continued evolution of the code will move to a new location and a new
> > version control system: git at github.com
> > After the freeze of the subversion repository we will start moving the
> > source code to its new location at https://github.com/neo4j
> >
> > Our hope is that with Github being the largest, fastest growing platform
> > for
> > social coding, it will lower the barrier for anyone wanting to contribute
> > to
> > Neo4j. Just fork us!
> >
> > The repositories should be fully available on Github at some point during
> > the day tomorrow.
> > Those of you who have signed our contributed license agreement will get a
> > separate e-mail, where I'll ask you for your github username to add you
> to
> > the list of contributors.
> >
> > Happy hacking,
> > --
> > Tobias Ivarsson 
> > Hacker, Neo Technology
> > www.neotechnology.com
> > Cellphone: +46 706 534857
> > ___
> > Neo4j mailing list

Re: [Neo4j] Neo4j is moving to git

2011-01-27 Thread Toni Menzel
On Thu, Jan 27, 2011 at 3:33 PM, Rick Bullotta <
rick.bullo...@burningskysoftware.com> wrote:

> a couple other things to be thinking about:
>
> - since we'll all be collaborating in a "mixed environment" of Windows and
> Linux and other, we need to be sensitive to Git settings for CR/LF handling
> when determining what files have changed
>
There are settings for that ( don't have the exact page on Github Help here
right now)

>
> - since Git generally pulls down the whole repository, it would probably
> not
> be a great thing to have a single, ever-growing repository of all neo
> versions and branches and experiments.  that could be a real disk space
> hog.
> we should come up with some reasonable convention for when to split
> repositories (major versions?  X.Y versions?)
>

But you do know about Git in general ? No offense here but its a bit
misplaced. ;) Git is about raw efficiency when it comes to more branches you
can think of, more merges than you have ever wanted in SVN. Think of the
Linux Kernel ..


> All in all, I think it's a good idea, we just need to be aware of all the
> implications.
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On
> Behalf Of Rick Bullotta
> Sent: Thursday, January 27, 2011 9:25 AM
> To: 'Neo4j user discussions'
> Subject: Re: [Neo4j] Neo4j is moving to git
>
> I definitely understand the reason for wanting to use Git, with the more
> frequent forks and branches of late, but I do think it would be helpful to
> make snapshot builds *with source* available for download as ZIPs or TARs
> as
> well.  For those of us on Windows, there are practical limitations to how
> many shell add-ins we can install (right now, I have to use CVS with
> Mozilla
> stuff, SVN with our hosted Atlassian JIRA system, and now it looks like
> I'll
> also need to use Git for Neo).
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On
> Behalf Of Tobias Ivarsson
> Sent: Thursday, January 27, 2011 9:10 AM
> To: Neo user discussions
> Subject: [Neo4j] Neo4j is moving to git
>
> Tomorrow, Friday January 28, we will freeze the Neo4j subversion repository
> (https://svn.neo4j.org/).
> From tomorrow and forward Neo4j subversion will be a read only repository.
> The continued evolution of the code will move to a new location and a new
> version control system: git at github.com
> After the freeze of the subversion repository we will start moving the
> source code to its new location at https://github.com/neo4j
>
> Our hope is that with Github being the largest, fastest growing platform
> for
> social coding, it will lower the barrier for anyone wanting to contribute
> to
> Neo4j. Just fork us!
>
> The repositories should be fully available on Github at some point during
> the day tomorrow.
> Those of you who have signed our contributed license agreement will get a
> separate e-mail, where I'll ask you for your github username to add you to
> the list of contributors.
>
> Happy hacking,
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> ___
> 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
>



-- 
*Toni Menzel - http://www.okidokiteam.com*
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j is moving to git

2011-01-27 Thread Toni Menzel
Congrats to this move, guys.
Will make participation easier and more enjoyable .. in general.
Toni

On Thu, Jan 27, 2011 at 3:10 PM, Tobias Ivarsson <
tobias.ivars...@neotechnology.com> wrote:

> Tomorrow, Friday January 28, we will freeze the Neo4j subversion repository
> (https://svn.neo4j.org/).
> From tomorrow and forward Neo4j subversion will be a read only repository.
> The continued evolution of the code will move to a new location and a new
> version control system: git at github.com
> After the freeze of the subversion repository we will start moving the
> source code to its new location at https://github.com/neo4j
>
> Our hope is that with Github being the largest, fastest growing platform
> for
> social coding, it will lower the barrier for anyone wanting to contribute
> to
> Neo4j. Just fork us!
>
> The repositories should be fully available on Github at some point during
> the day tomorrow.
> Those of you who have signed our contributed license agreement will get a
> separate e-mail, where I'll ask you for your github username to add you to
> the list of contributors.
>
> Happy hacking,
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
*Toni Menzel - http://www.okidokiteam.com*
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Versioning :)

2010-10-06 Thread Toni Menzel
Well, you could let the component versions diverge if you put some
soft rules behind it like:
Format A.B.C (major, minor, micro). You could then "baseline" them on
minor version level.
Micro releases are independent. -> to make it convenient for the
module maintainer. He can release that on his own.
Everything above are streamlined releases that also have (lets say) a
packaged assembly with all of them together. -> to make it simple for
the enduser.

Just an idea.
About (2): definitely let maven versions be in-sync. (why make a
difference? Aren't they just maven built assemblies too?)

Toni

On Wed, Oct 6, 2010 at 3:45 PM, Mattias Persson
 wrote:
> (2) I'd definately go with synced version for maven/non-maven stuff.
> (1) is a bit harder since component doesn't mature in the same rate as
> others, but maybe that doesn't matter... having synced versions for the
> components is rather good.
>
> 2010/10/6 Andreas Kollegger 
>
>> Hello fellow graphytes,
>>
>> Today I offer for your consideration one of the classic unsolved problems
>> of computer science: proper versioning.
>>
>> Neo4j is a available as individual library components and also pre-packaged
>> collections of components. The obvious challenge is to maintain a coherent
>> set of tested, known-good and compatible components. As we move towards
>> regular milestone releases, what's the best way to control and inform about
>> the various versions that are included?
>>
>> Use cases include:
>>
>> 1. I'm a maven developer, and want coherent dependencies
>> 2. I develop offline, and want to know what combination of libs to download
>> 3. I deploy neo4j as a server, and want to upgrade a component without
>> breaking things
>>
>> Assuming that zip files (or similar) will always use the corresponding
>> release version, the versioning of the included components could vary. For a
>> milestone release with an overall group version of 1.2-M1, permutations of
>> an individual component (the fictional neo4j-foo) version could be:
>>
>> Opt. | mvn version   | download version
>> ---
>> 1    | foo-0.7        | foo-0.7
>> 2    | foo-0.7        | foo-1.2-M1
>> 3    | foo-1.2-M1     | foo-1.2-M1
>> 4    | foo-0.7-1.2-M1 | foo-0.7-1.2-M1
>> 5    | foo-0.7        | foo-0.7-1.2-M1
>>
>> Questions include:
>> 1. Should individual components keep their own versions, or defer to the
>> grouped release version?
>> 2. Should the maven version keep in sync with the non-maven version?
>>
>> Opinions?
>>
>> Cheers,
>> Andreas
>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Toni Menzel || http://okidokiteam.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] OSGi Dependency Injection

2010-09-09 Thread Toni Menzel
Sounds like a plan (" I intend to touch as little as possible") !
Let me know when you publish something to watch to the public repo or some
visible area so we can talk about that. - if you want.

Cheers.


On Wed, Sep 8, 2010 at 1:36 PM, Andreas Kollegger <
andreas.kolleg...@neotechnology.com> wrote:

> Hey Toni!
>
> Thanks, I'm excited to be working with the team here. They're a great bunch
> of guys, and of course I love the graph stuff.
>
> Though we haven't met in person, your name is very familiar to me wherever
> OSGi conversations come up. It's great to know you follow the neo4j
> threads.
>
> While I'm just lifting the hood to have a look around the engine, your
> assumptions seem correct. The neo4j kernel has a notion of "extensions"
> which it currently attempts to load through java ServiceLoaders, or a
> custom
> loader implementation. So it has a dual nature of being the persistence
> service and the "runtime platform" upon which everything is built. It's a
> common situation where, as you suggest, OSGi is a perfect fit for the
> general solution.
>
> For now, though, I intend to touch as little as possible. I'll have to make
> some subtle changes to the kernel startup to enable it to be OSGi aware,
> but
> the changes should be invisible in non-OSGi environments.
>
> Cheers,
> Andreas
>
> On Wed, Sep 8, 2010 at 12:42 PM, Toni Menzel  wrote:
>
> > Hi Andreas,
> > glad to see you in Neo Technology and directly grabbing the OSGi topic.
> > Even
> > if you don't know me, but have heard from Peter about you working on that
> > part soon'ish.
> >
> > I am also pretty much into OSGi and try to spread the love wherever i
> can.
> >
> > So i try to rephrase the assumptions that arise from your writup because
> i
> > don't know all parts of neo4j yet myself.
> > I know that there are things like the different indexers (lucene), RDF
> > representations, some graph algo stuff and so on.
> > Is this what you mean by "Extensions" in the Neo context ?
> >
> > "OSGi-friendly kernel extension loader" means having whiteboard pattern
> api
> > that does not depend on OSGi right? So, in an osgi runtime you would
> > register all the extensions (either they do themselves with activator
> code,
> > or you get rid of this too cause they are boilerplate). Then there is a
> > "kernel" OSGi service which is basically the only OSGi aware Neo4J
> > component. I stacks the neo runtime together and takes care of the
> dynamic
> > nature. Outside of OSGi you have a much simpler, static runtime (maybe
> the
> > one that is already in place).
> >
> > So, i don't know how it really looks like now, even don't know what roles
> > extensions can play for the neo4j runtime.
> >
> > Another thing arise, may a future thought, once the dynamic runtime gets
> > stable, to make the default. See, you probably know, OSGi is not the fat
> > container that you need to mock out if you want it small. Just boot an
> > embedded felix or use concierge which is really small.
> > It in the end really gets about what role the extensions will/can play.
> If
> > they are really a vital part, if neo is a composition of services, then
> > going full osgi can be a natural destination.
> >
> > Anyway, i put in some thoughts and assumptions, hope its not totally off
> > the
> > point.
> >
> > cheers,
> > Toni
> >
> > --
> > *Toni Menzel || **http://okidokiteam.com*
> >
> >
> > On Wed, Sep 8, 2010 at 11:36 AM, Andreas Kollegger <
> > andreas.kolleg...@neotechnology.com> wrote:
> >
> > > Hi all,
> > >
> > > I have a proposal to make regarding the use of Neo4j under OSGi. All
> the
> > > components currently build as proper, deployable OSGi bundles, which is
> > > great. I'd like to introduce an OSGi-friendly kernel extension loader,
> > > establishing a general patten for including extensions to any component
> > > that
> > > is not very intrusive. There should never be any dependencies from a
> > > component outwards to OSGi, the dependencies should point from OSGi
> > > inwards.
> > >
> > > So, I'd like to add OSGi bundle activators which would only get
> > referenced
> > > when starting the bundle in an OSGi environment. For the kernel, the
> > > activator would inject a kernel extension loader into the kernel. The
> > > exte

Re: [Neo4j] OSGi Dependency Injection

2010-09-08 Thread Toni Menzel
Hi Andreas,
glad to see you in Neo Technology and directly grabbing the OSGi topic. Even
if you don't know me, but have heard from Peter about you working on that
part soon'ish.

I am also pretty much into OSGi and try to spread the love wherever i can.

So i try to rephrase the assumptions that arise from your writup because i
don't know all parts of neo4j yet myself.
I know that there are things like the different indexers (lucene), RDF
representations, some graph algo stuff and so on.
Is this what you mean by "Extensions" in the Neo context ?

"OSGi-friendly kernel extension loader" means having whiteboard pattern api
that does not depend on OSGi right? So, in an osgi runtime you would
register all the extensions (either they do themselves with activator code,
or you get rid of this too cause they are boilerplate). Then there is a
"kernel" OSGi service which is basically the only OSGi aware Neo4J
component. I stacks the neo runtime together and takes care of the dynamic
nature. Outside of OSGi you have a much simpler, static runtime (maybe the
one that is already in place).

So, i don't know how it really looks like now, even don't know what roles
extensions can play for the neo4j runtime.

Another thing arise, may a future thought, once the dynamic runtime gets
stable, to make the default. See, you probably know, OSGi is not the fat
container that you need to mock out if you want it small. Just boot an
embedded felix or use concierge which is really small.
It in the end really gets about what role the extensions will/can play. If
they are really a vital part, if neo is a composition of services, then
going full osgi can be a natural destination.

Anyway, i put in some thoughts and assumptions, hope its not totally off the
point.

cheers,
Toni

-- 
*Toni Menzel || **http://okidokiteam.com*


On Wed, Sep 8, 2010 at 11:36 AM, Andreas Kollegger <
andreas.kolleg...@neotechnology.com> wrote:

> Hi all,
>
> I have a proposal to make regarding the use of Neo4j under OSGi. All the
> components currently build as proper, deployable OSGi bundles, which is
> great. I'd like to introduce an OSGi-friendly kernel extension loader,
> establishing a general patten for including extensions to any component
> that
> is not very intrusive. There should never be any dependencies from a
> component outwards to OSGi, the dependencies should point from OSGi
> inwards.
>
> So, I'd like to add OSGi bundle activators which would only get referenced
> when starting the bundle in an OSGi environment. For the kernel, the
> activator would inject a kernel extension loader into the kernel. The
> extension loader would listen for advertised kernel extension services,
> which would consequently get loaded when a new graph db is created.
>
> Generally, something like the attached UML.
>
> While I think this is a reasonable first step, the dynamic nature of the
> OSGi runtime means that there could be problems within the kernel if it
> uses
> stale references to extensions. Those will have to be addressed as they
> come
> up.
>
> Thoughts?
>
> -Andreas
>
> ___
> 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] Building apoc-bundle/org.apache.lucene.core raises PatternSyntaxException

2010-08-16 Thread Toni Menzel
okay, i will "clean-room" and try to build later.
Thanks, Peter!


On Mon, Aug 16, 2010 at 4:54 PM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> Exactly my version,
> and I can compile that Lucene wrapper :(
>
> Cheers,
>
> /peter neubauer
>
> COO and Sales, Neo Technology
>
> 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Mon, Aug 16, 2010 at 4:50 PM, Toni Menzel  wrote:
> > zazu:org.apache.lucene.core tonit$ java -version
> > java version "1.6.0_20"
> > Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
> > Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
> > zazu:org.apache.lucene.core tonit$
> >
> >
> > On Mon, Aug 16, 2010 at 4:45 PM, Peter Neubauer <
> > peter.neuba...@neotechnology.com> wrote:
> >
> >> Toni,
> >> what JDK are you running? Could it even be a bug or strange behavior
> >> in the java.util.regexp package of your JDK?
> >>
> >> Cheers,
> >>
> >> /peter neubauer
> >>
> >> COO and Sales, Neo Technology
> >>
> >> 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> >>
> >>
> >>
> >> On Mon, Aug 16, 2010 at 4:42 PM, Toni Menzel 
> wrote:
> >> > When trying to build the aforementioned component with Maven 3 Beta2 i
> >> get
> >> > the following problem:
> >> > # cd  laboratory/components/apoc-bundle/org.apache.lucene.core
> >> > # mvn clean install
> >> > [..]
> >> > java.util.regex.PatternSyntaxException: Illegal repetition near index
> 0
> >> > ${bundle\.namespace}\.impl\..*|${bundle\.namespace}\.impl
> >> > [..]
> >> >
> >> > Why i am asking here is the fact that it all builds nicely on the CI
> >> Build:
> >> > http://buildbox.neo4j.org/hudson/job/apoc-bundle/
> >> > I have currently bet on either Maven3 or a platform specific (here:
> >> MacOSX)
> >> > bug in maven-bundle-plugin 1.4.3 .
> >> > Yes, upgrading reveals other issues, just would like to hear if
> anybody
> >> out
> >> > there experienced this before. - because it works on CI.
> >> >
> >> > See full stacktrace:
> >> >
> >> > --- snip --
> >> > [INFO] --- maven-bundle-plugin:1.4.3:bundle (default-bundle) @
> >> > org.apache.lucene.core ---
> >> > [ERROR] An internal error occurred
> >> > java.util.regex.PatternSyntaxException: Illegal repetition near index
> 0
> >> > ${bundle\.namespace}\.impl\..*|${bundle\.namespace}\.impl
> >> > ^
> >> > at java.util.regex.Pattern.error(Pattern.java:1713)
> >> > at java.util.regex.Pattern.closure(Pattern.java:2775)
> >> > at java.util.regex.Pattern.sequence(Pattern.java:1889)
> >> > at java.util.regex.Pattern.expr(Pattern.java:1752)
> >> > at java.util.regex.Pattern.compile(Pattern.java:1460)
> >> > at java.util.regex.Pattern.(Pattern.java:1133)
> >> > at java.util.regex.Pattern.compile(Pattern.java:823)
> >> > at aQute.lib.osgi.Instruction.matches(Instruction.java:36)
> >> > at aQute.lib.osgi.Builder.matches(Builder.java:360)
> >> > at aQute.lib.osgi.Builder.doExpand(Builder.java:277)
> >> > at aQute.lib.osgi.Builder.doExpand(Builder.java:240)
> >> > at aQute.lib.osgi.Builder.doExpand(Builder.java:232)
> >> > at aQute.lib.osgi.Builder.build(Builder.java:40)
> >> > at
> >> >
> >>
> org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:391)
> >> > at
> >>
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:273)
> >> > at
> >>
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:227)
> >> > at
> >>
> org.apache.felix.bundleplugin

Re: [Neo4j] Building apoc-bundle/org.apache.lucene.core raises PatternSyntaxException

2010-08-16 Thread Toni Menzel
zazu:org.apache.lucene.core tonit$ java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
zazu:org.apache.lucene.core tonit$


On Mon, Aug 16, 2010 at 4:45 PM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> Toni,
> what JDK are you running? Could it even be a bug or strange behavior
> in the java.util.regexp package of your JDK?
>
> Cheers,
>
> /peter neubauer
>
> COO and Sales, Neo Technology
>
> 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Mon, Aug 16, 2010 at 4:42 PM, Toni Menzel  wrote:
> > When trying to build the aforementioned component with Maven 3 Beta2 i
> get
> > the following problem:
> > # cd  laboratory/components/apoc-bundle/org.apache.lucene.core
> > # mvn clean install
> > [..]
> > java.util.regex.PatternSyntaxException: Illegal repetition near index 0
> > ${bundle\.namespace}\.impl\..*|${bundle\.namespace}\.impl
> > [..]
> >
> > Why i am asking here is the fact that it all builds nicely on the CI
> Build:
> > http://buildbox.neo4j.org/hudson/job/apoc-bundle/
> > I have currently bet on either Maven3 or a platform specific (here:
> MacOSX)
> > bug in maven-bundle-plugin 1.4.3 .
> > Yes, upgrading reveals other issues, just would like to hear if anybody
> out
> > there experienced this before. - because it works on CI.
> >
> > See full stacktrace:
> >
> > --- snip --
> > [INFO] --- maven-bundle-plugin:1.4.3:bundle (default-bundle) @
> > org.apache.lucene.core ---
> > [ERROR] An internal error occurred
> > java.util.regex.PatternSyntaxException: Illegal repetition near index 0
> > ${bundle\.namespace}\.impl\..*|${bundle\.namespace}\.impl
> > ^
> > at java.util.regex.Pattern.error(Pattern.java:1713)
> > at java.util.regex.Pattern.closure(Pattern.java:2775)
> > at java.util.regex.Pattern.sequence(Pattern.java:1889)
> > at java.util.regex.Pattern.expr(Pattern.java:1752)
> > at java.util.regex.Pattern.compile(Pattern.java:1460)
> > at java.util.regex.Pattern.(Pattern.java:1133)
> > at java.util.regex.Pattern.compile(Pattern.java:823)
> > at aQute.lib.osgi.Instruction.matches(Instruction.java:36)
> > at aQute.lib.osgi.Builder.matches(Builder.java:360)
> > at aQute.lib.osgi.Builder.doExpand(Builder.java:277)
> > at aQute.lib.osgi.Builder.doExpand(Builder.java:240)
> > at aQute.lib.osgi.Builder.doExpand(Builder.java:232)
> > at aQute.lib.osgi.Builder.build(Builder.java:40)
> > at
> >
> org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:391)
> > at
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:273)
> > at
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:227)
> > at
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:218)
> > at
> >
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
> > at
> >
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144)
> > at
> >
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87)
> > at
> >
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79)
> > at
> >
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86)
> > at
> >
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58)
> > at
> >
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> > at
> >
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252)
> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100)
> > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443)
> > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166)
> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:130)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j

[Neo4j] Building apoc-bundle/org.apache.lucene.core raises PatternSyntaxException

2010-08-16 Thread Toni Menzel
When trying to build the aforementioned component with Maven 3 Beta2 i get
the following problem:
# cd  laboratory/components/apoc-bundle/org.apache.lucene.core
# mvn clean install
[..]
java.util.regex.PatternSyntaxException: Illegal repetition near index 0
${bundle\.namespace}\.impl\..*|${bundle\.namespace}\.impl
[..]

Why i am asking here is the fact that it all builds nicely on the CI Build:
http://buildbox.neo4j.org/hudson/job/apoc-bundle/
I have currently bet on either Maven3 or a platform specific (here: MacOSX)
bug in maven-bundle-plugin 1.4.3 .
Yes, upgrading reveals other issues, just would like to hear if anybody out
there experienced this before. - because it works on CI.

See full stacktrace:

--- snip --
[INFO] --- maven-bundle-plugin:1.4.3:bundle (default-bundle) @
org.apache.lucene.core ---
[ERROR] An internal error occurred
java.util.regex.PatternSyntaxException: Illegal repetition near index 0
${bundle\.namespace}\.impl\..*|${bundle\.namespace}\.impl
^
at java.util.regex.Pattern.error(Pattern.java:1713)
at java.util.regex.Pattern.closure(Pattern.java:2775)
at java.util.regex.Pattern.sequence(Pattern.java:1889)
at java.util.regex.Pattern.expr(Pattern.java:1752)
at java.util.regex.Pattern.compile(Pattern.java:1460)
at java.util.regex.Pattern.(Pattern.java:1133)
at java.util.regex.Pattern.compile(Pattern.java:823)
at aQute.lib.osgi.Instruction.matches(Instruction.java:36)
at aQute.lib.osgi.Builder.matches(Builder.java:360)
at aQute.lib.osgi.Builder.doExpand(Builder.java:277)
at aQute.lib.osgi.Builder.doExpand(Builder.java:240)
at aQute.lib.osgi.Builder.doExpand(Builder.java:232)
at aQute.lib.osgi.Builder.build(Builder.java:40)
at
org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:391)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:273)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:227)
at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:218)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:130)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 1.744s
[INFO] Finished at: Mon Aug 16 10:44:11 CEST 2010
[INFO] Final Memory: 9M/505M
[INFO]

[ERROR] Failed to execute goal
org.apache.felix:maven-bundle-plugin:1.4.3:bundle (default-bundle) on
project org.apache.lucene.core: Internal error in maven-bundle-plugin:
Illegal repetition near index 0
${bundle\.namespace}\.impl\..*|${bundle\.namespace}\.impl
^
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
zazu:org.apache.lucene.core tonit$

-- snap --



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
U

Re: [Neo4j] Query for combination of properties

2010-07-07 Thread Toni Menzel
On Wed, Jul 7, 2010 at 3:12 PM, Balazs E. Pataki  wrote:
> Toni,
>
> thanks for the hints!
>
> Here's my actual use case:
>
> I have Nodes storing texts of various languages. The Nodes have 2
> properties:
>
>       content: the actual text
>
>       language: ISO language code of the text ("eng", "ger", "hun", etc)
>
> I would like to search for Nodes containing a specific text in "content"
> having a specific "language" code. With plain Lucene it would be
> something like:
>
>    content:"hello" AND language:"eng"
>
> to look for the word "hello" in an English language Node (actually a
> "Document" in Lucene).
>
> I think this is different from ranges, where you want to match a single
> key matching a given range. Or am I mistaken?

No, your are right. This does not fit to your problem.

> ---
> balazs
>
> On 7/7/10 2:59 PM, Toni Menzel wrote:
>> Balazs,
>> Check out LuceneFulltextQueryIndexService [1] and read at "Range
>> Queries" at [2].
>> This should give you what you are looking for if i understand that correctly.
>>
>> Toni
>>
>> [1] 
>> http://components.neo4j.org/neo4j-index/apidocs/org/neo4j/index/lucene/LuceneFulltextQueryIndexService.html
>> [2] 
>> http://wiki.neo4j.org/content/Indexing_with_IndexService#A_great_subclass_to_LuceneFulltextIndexServic
>>
>> On Wed, Jul 7, 2010 at 2:39 PM, Balazs E. Pataki  
>> wrote:
>>> Hi,
>>>
>>> I'm new to neo4j and have read quite a lot of documentation and source
>>> code and it seems that one can only do queries on a single Node property
>>> (a single indexed value mapped to a key) using :
>>>
>>>      IndexHits  getNodes( String key, Object value )
>>>
>>> This seems to be true for LuceneFulltextIndexService as well: one can
>>> only query for a single field.
>>>
>>> However, Lucene allows queries on multiple fields as well. As in the
>>> Lucene examples
>>> (http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Fields):
>>>
>>>      title:"The Right Way" AND text:go
>>>
>>> This would find documents with a title field matching "The Right Way"
>>> and a text field matching "go".
>>>
>>> Is it possible to do this in neo4j and the LuceneFulltextIndexService?
>>>
>>> As far as I can seee, the answer is no. If it is the case, how difficult
>>> would it be to add such multi field query to the LuceneFulltextIndexService?
>>>
>>> Thanks for any help, or at least a confirmation that such multi field
>>> Lucene query is possible or not witn neo4j 1.0.
>>>
>>> Regards,
>>> ---
>>> balazs
>>> ___
>>> 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
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Query for combination of properties

2010-07-07 Thread Toni Menzel
Balazs,
Check out LuceneFulltextQueryIndexService [1] and read at "Range
Queries" at [2].
This should give you what you are looking for if i understand that correctly.

Toni

[1] 
http://components.neo4j.org/neo4j-index/apidocs/org/neo4j/index/lucene/LuceneFulltextQueryIndexService.html
[2] 
http://wiki.neo4j.org/content/Indexing_with_IndexService#A_great_subclass_to_LuceneFulltextIndexServic

On Wed, Jul 7, 2010 at 2:39 PM, Balazs E. Pataki  wrote:
> Hi,
>
> I'm new to neo4j and have read quite a lot of documentation and source
> code and it seems that one can only do queries on a single Node property
> (a single indexed value mapped to a key) using :
>
>     IndexHits getNodes( String key, Object value )
>
> This seems to be true for LuceneFulltextIndexService as well: one can
> only query for a single field.
>
> However, Lucene allows queries on multiple fields as well. As in the
> Lucene examples
> (http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Fields):
>
>     title:"The Right Way" AND text:go
>
> This would find documents with a title field matching "The Right Way"
> and a text field matching "go".
>
> Is it possible to do this in neo4j and the LuceneFulltextIndexService?
>
> As far as I can seee, the answer is no. If it is the case, how difficult
> would it be to add such multi field query to the LuceneFulltextIndexService?
>
> Thanks for any help, or at least a confirmation that such multi field
> Lucene query is possible or not witn neo4j 1.0.
>
> Regards,
> ---
> balazs
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] org.neo4j.commons

2010-07-07 Thread Toni Menzel
Here are some (unconstrained) thoughts & questions:

How public is this commons api btw ? Changing the package breaks
existing api. Even worse doing that in a 1.x release.

I also wonder why kernel is not split into some "api" thingy and an
implementation (say kernel itself). Just to try stabilizing the api
for future releases.
Growing the kernel, now mixing in probably changing api, leads users
in a somewhat uncertain state: what could change when upgrading within
1.x release train ?
Why not now make the cut to distinguish  (stable) api ?
(Apologize if this has been discussed previously in depth on this ML)

Also, understand neo-commons component has been dropped altogether,
then it could probably is stated in the (future) release notes of 1.1
that having neo 1.0 components in classpath may lead to severe issues.
To me its the same "care what you have in classpath" as not having two
neo-kernel versions loaded (which is also plain wrong, not working).
So maybe more care about not breaking api (see above).

Assuming that:
- commons is not that public or you do not care about breaking api yet
(okay'ish in order to drive api evolution)
- commons already contains radical (!) api changes, so package change
is just another way to make this explicit.
- api separation is a non issue & has already been discussed earlier

Then, some renaming thoughts:
- org.neo4j.common (subtle change to keep the previously chosen name.
But also may confuse ppl using commons api already. - then its too
subtle)
- does it all have to go under one hood ? common sometimes can also be
another name for "i don't know what's in here" . -> just want to point
at that option. ;)
- org.neo4j.misc sounds the most useful to me. Though also sounds like
a trashcan..
- org.neo4j. undistinguished --> ;

just my 2cts.

Toni

On Wed, Jul 7, 2010 at 12:25 PM, Mattias Persson
 wrote:
> 2010/7/7 Mattias Persson 
>
>> Somewhere in 1.1-SNAPSHOT the neo4j-commons component have been merged into
>> kernel (org.neo4j.commons package). Since then numerous people have had
>> problems with NoSuchMethodErrors and the reason for that is that they have
>> had the latest neo4j-kernel and the latest neo4j-commons on the classpath.
>> The problem is here that some classes from the commons package was competing
>> to be loaded first by the classloader and the commons classes have evolved
>> since they moved into kernel, thus causing problems if the wrong class was
>> loaded.
>>
>> Anyways, to avoid this it'd be nice to rename the org.neo4j.commons package
>> to something else, and maybe there's a better name for it altogether.
>> Suggestions?
>>
>> layout:
>>
>>   org.neo4j.commons.iterator.{FilteringIterator, IteratorWrapper...}
>> (maybe these classes will move into .collection instead, since it already
>> contains more than iterator stuff, f.ex. Iterable stuff)
>>   org.neo4j.commons.collection.{MapUtil}
>>   org.neo4j.commons.{Pair, Predicate, Service}
>>
>> Here are some elaborate examples :)
>>
>>  * org.neo4j.useful
>>  * org.neo4j.misc
>>  * org.neo4j.generic
>>  * org.neo4j.shared
>>
>
> Asking http://tyda.se some synonyms (common) are:
>
> general
> average
> common
> regular
> usual
> frequent
> ordinary
> conventional
> plain
> routine
> customary
> prevailing
> vulgar
> habitual
> undistinguished
>
>
>>
>>
>> It'd be great to hear your oppinion on this.
>>
>> --
>> Mattias Persson, [matt...@neotechnology.com]
>> Hacker, Neo Technology
>> www.neotechnology.com
>>
>
>
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] TransactionFailureException

2010-07-06 Thread Toni Menzel
Thats a quite generic exception that could have all kinds of reasons.
At best you share the whole Stacktrace and the context ?
Just look at [1]. The exception you mention is the high level
exception that could be for example be raised from a previous
RollbackException or any other exception.

Toni

[1] 
https://svn.neo4j.org/components/kernel/trunk/src/main/java/org/neo4j/kernel/EmbeddedGraphDbImpl.java

On Tue, Jul 6, 2010 at 12:46 PM, Alexander Viefhues
 wrote:
> Hallo,
>
> can somebody explain when a "TransactionFailureException: Unable to
> commit transaction" is thrown.
> I don't found anything about that an the homepage, wiki etc.
>
> Thank you for helping.
>
> Alex
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Querying Neo4j

2010-07-05 Thread Toni Menzel
Hi Boban,

aside from using an indexing service to grab certain information from
neo4j (as Paddy mentioned correctly) you certainly should get yourself
learning about traversal concepts.Traversing does not mean just
iterating over "elements over a single node" but traversing the whole
graph (if you want to) : hence the naming "traverse".
So, from the way you ask about stuff in you mail, i think its worth
understand that unique concept of graph database. Directly falling
back to the index service does not really embrace why you are a graph
db at all.
As a starter, looking at the javadoc of Node.traverse or its neo4j
1.1.0-SNAPSHOT successor TraversalDescription and friends helps a lot
already.

If you cannot succeed that way, read for common misconceptions like that one [1]
Also try to adopt some design best practices when creating the graph [2]

cheers,
Toni
[1] http://wiki.neo4j.org/content/Neo_Mistakes#Unbalanced_graph
[2] http://wiki.neo4j.org/content/Design_Guide


On Mon, Jul 5, 2010 at 4:19 PM, Boban Erakovic  wrote:
> Greetings, I have some misunderstanding about neo4j.
> Once, when I store some nodes and relations into database, how can I query
> it?
> So I store information 5 days ago, and now I want to query? As much as I
> saw, I am using :
>
> Traverser traverser = node.traverse();
>
> So I need a node to in order to iterate over database.
> In every example, iteration over data is perform in the same code within
> where we had create already some nodes and relation, and then just reuse
> created node to communicate to database.
> But how to perform querying if have NO any node. I just want to get some
> data from database???
> I tried getReferenceNode() method, of EmbeddedGraphDatabase class, but it is
> not correct.
> So, how can I just get data from database?
> Thanks in advance!
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] architecture question

2010-06-29 Thread Toni Menzel
http://wiki.neo4j.org/content/Design_Guide#How_to_wrap_nodes_in_POJOs
was the link that [1] should have pointed to in a previous mail.
Worth reading, indeed.

On Wed, Jun 30, 2010 at 8:45 AM, Anders Nawroth
 wrote:
> Hi!
>
> In most cases it should be a better choice to directly store the
> attribute values in the underlying node like outlined here:
> http://wiki.neo4j.org/content/Design_Guide#How_to_wrap_nodes_in_POJOs
> Then there is no need for an update() method, and less memory will be
> consumed as well.
>
> If you have questions regarding this approach, please post them!
>
> /anders
>
> On 06/30/2010 01:27 AM, Дмитрий Медведев wrote:
>> Hi.
>>
>> I have two classes: UserFactory and User. The UserFactory.create() returns
>> an instance of the User class, which internally has code that updates
>> properties of the corresponding Node object whenever an User.update()
>> function is called.
>>
>> *The question is*: should I move the internals of the User.update() function
>> to the UserFactory class, since, I suspect that each and every instance of
>> the User class has its separate copy of the update code, thus spoiling
>> memory a lot. What would you suggest?
>>
>> Best Regards,
>> Dmitry N. Medvedev,
>>
>> Tel.:
>> +7 (903) 506 0376
>>
>> E-mail:
>> dmitry.medve...@gmail.com
>> ___
>> 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
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] architecture question

2010-06-29 Thread Toni Menzel
2010/6/30 Дмитрий Медведев :
> Thanks for the reply, Toni.
>
> Anyway, let me clarify it a little bit.
> The Use Case: I have two instances of the User class loaded in memory (User1
> and User2). Each instance has the update() function whose purpose is to call
> the setProperty() function on their underlying node instances as well as
> the removeIndex()/index() routines of the LuceneFulltextQueryIndexService
> instance.
>
> So, the question is: does the User1.update() and User2.update() functions
> consume two independent blocks of memory or whether they are pointing to
> just the same block? I'm not sure about this.

If they are using the same ClassLoader (usually they do, if you are
unsure about this), the "code" is being loaded once. (so use the same
code in memory if you want to say it that way).

> If each instance (User1 and User2) has allocated separate memory for the
> update() functions, then, I obviously need to move the update() routine to
> the UserFactory class and use custom event to notify the UserFactory
> whenever I need to update properties of the underlying Nodes of the User1
> and User2 objects. If both of the User1 and User2 objects' update()
> functions reside in the same memory block, then it is OK to leave the
> update() routine in the User class.

no. (see above)

>
> Is it more clear now? Let me know, please, if it's not — I will paraphrase
> it.
>
> Best Regards,
> Dmitry N. Medvedev,
>
> Tel.:
> +7 (903) 506 0376
>
> E-mail:
> dmitry.medve...@gmail.com
>
>
>
> On Wed, Jun 30, 2010 at 03:38, Toni Menzel  wrote:
>
>> HI Dmitry,
>>
>> 2010/6/30 Дмитрий Медведев :
>> > Hi.
>> >
>> > I have two classes: UserFactory and User. The UserFactory.create()
>> returns
>> > an instance of the User class, which internally has code that updates
>> > properties of the corresponding Node object whenever an User.update()
>> > function is called.
>> >
>> > *The question is*: should I move the internals of the User.update()
>> function
>> > to the UserFactory class, since, I suspect that each and every instance
>> of
>> > the User class has its separate copy of the update code, thus spoiling
>> > memory a lot. What would you suggest?
>>
>> Not sure what you mean with "separate copy of the update code" because
>> the Class "User" or "UserFactory" is just loaded once anyway.
>> So in the end its a matter of taste and what your User object actually
>> is.. except being a model wrapper for a Node.
>> For example [1] talks about tight implementations directly bound to
>> the node instance where you don't have an update() call at all.
>> But as just said, memory should not be your concern when it comes to
>> class related logic. - its the data you store in the instances that
>> makes a difference imho.
>>
>> Toni
>>
>>
>> >
>> > Best Regards,
>> > Dmitry N. Medvedev,
>> >
>> > Tel.:
>> > +7 (903) 506 0376
>> >
>> > E-mail:
>> > dmitry.medve...@gmail.com
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> >
>>
>>
>>
>> --
>> Toni Menzel
>> Independent Software Developer
>> Professional Profile: http://okidokiteam.com
>> t...@okidokiteam.com
>> http://www.ops4j.org     - New Energy for OSS Communities - Open
>> Participation Software.
>> ___
>> 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
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] About Transactions & Traversers

2010-06-29 Thread Toni Menzel
Thanks Matthias,
Just saw the "new" Traversal API.
Makes things way cleaner already.

Toni

On Tue, Jun 29, 2010 at 10:37 PM, Mattias Persson
 wrote:
> Yep the way I used to do those things were to wrap the resulting
> iterator in a TxIterator which just managed its own transactions in
> all the Iterator's methods.
>
> But that's all in the past. You no longer need to be in a transaction
> to read stuff from neo4j (kernel version 1.1-SNAPSHOT)
>
> 2010/6/29, Toni Menzel :
>> Guys,
>>
>> i am a bit puzzled with using traversers in a library fashion ( api
>> user does not know about Neo4J ).
>> To make it short, this is the "service level" method that has a neo4j
>> implementation:
>> -- snip
>> public Iterable getBlogs();
>> -- snap
>>
>> (this is just an example from the blue sky..)
>>
>> So, that uses a flat traverser of nodes with model wrapping (from
>> Iterator to Iterator)
>> All fine, but now that has to run in a transaction.
>> Because i am a library (sort of), the transaction wrapping should be
>> implicit.
>> But of cause, due to the nature of iterators, its all fetched lazily
>> and users may even never reach the end or perhaps never fetch anything
>> (thus the transaction never ends).
>>
>> The clean solution that i am thinking of is some sort of a staged
>> iterator that is backed up by cached (pre-fetched) number of items.
>> This way, the library can maintain transactions under the hood.
>> Two issues with that:
>> - this looks like a common problem that should have a solution in neo
>> already ?
>> - Its not really deterministic because it will involve distinct
>> transactions every time the cache is fully traversed and we go to the
>> next "pre-load" stage.
>>
>> Hope this is not totally confusing, its just something i found quite
>> "un-"handy to implement but common.
>>
>> cheers,
>> Toni
>>
>> --
>> Toni Menzel
>> Independent Software Developer
>> Professional Profile: http://okidokiteam.com
>> t...@okidokiteam.com
>> http://www.ops4j.org     - New Energy for OSS Communities - Open
>> Participation Software.
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] architecture question

2010-06-29 Thread Toni Menzel
HI Dmitry,

2010/6/30 Дмитрий Медведев :
> Hi.
>
> I have two classes: UserFactory and User. The UserFactory.create() returns
> an instance of the User class, which internally has code that updates
> properties of the corresponding Node object whenever an User.update()
> function is called.
>
> *The question is*: should I move the internals of the User.update() function
> to the UserFactory class, since, I suspect that each and every instance of
> the User class has its separate copy of the update code, thus spoiling
> memory a lot. What would you suggest?

Not sure what you mean with "separate copy of the update code" because
the Class "User" or "UserFactory" is just loaded once anyway.
So in the end its a matter of taste and what your User object actually
is.. except being a model wrapper for a Node.
For example [1] talks about tight implementations directly bound to
the node instance where you don't have an update() call at all.
But as just said, memory should not be your concern when it comes to
class related logic. - its the data you store in the instances that
makes a difference imho.

Toni


>
> Best Regards,
> Dmitry N. Medvedev,
>
> Tel.:
> +7 (903) 506 0376
>
> E-mail:
> dmitry.medve...@gmail.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] About Transactions & Traversers

2010-06-29 Thread Toni Menzel
Guys,

i am a bit puzzled with using traversers in a library fashion ( api
user does not know about Neo4J ).
To make it short, this is the "service level" method that has a neo4j
implementation:
-- snip
public Iterable getBlogs();
-- snap

(this is just an example from the blue sky..)

So, that uses a flat traverser of nodes with model wrapping (from
Iterator to Iterator)
All fine, but now that has to run in a transaction.
Because i am a library (sort of), the transaction wrapping should be implicit.
But of cause, due to the nature of iterators, its all fetched lazily
and users may even never reach the end or perhaps never fetch anything
(thus the transaction never ends).

The clean solution that i am thinking of is some sort of a staged
iterator that is backed up by cached (pre-fetched) number of items.
This way, the library can maintain transactions under the hood.
Two issues with that:
- this looks like a common problem that should have a solution in neo already ?
- Its not really deterministic because it will involve distinct
transactions every time the cache is fully traversed and we go to the
next "pre-load" stage.

Hope this is not totally confusing, its just something i found quite
"un-"handy to implement but common.

cheers,
Toni

-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user