Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-09-06 Thread Nuo Yan
Hey Adriano and everyone,

I finally got a chance to monitor/profile the neo4j process with VisualVM when 
I run my set of tests.

It seems that after running the set of tests once, ~ 50M of PermGen was used. 
However, subsequent test runs simply multiples that, which worries me a little. 
After the fourth run of the tests, ~ 200M of PermGen space was used.

My app accesses to neo4j completely using the REST interface. During the test 
run, new nodes and relationships are  being frequently created. There are batch 
requests that performs multiple actions at once (number of actions is 
reasonable, really small in this case, usually a few, or tenth). There are also 
gremlin script executions through REST (send the gremlin query over to the 
server through REST API). Most of the gremlin queries are traversals and 
returns the vertices or edges match the constraints.

Total number of nodes created during a test run is only hundreds. There are 
more relationships, but at most thousands.

That's basically all of the things that are done against neo4j server during a 
test run. Given this, do you think the PermGen usage is reasonable? Or do you 
think something is very wrong? I worried that setting a larger PermGen would 
only postpone but not resolve the OutOfMemory problem. 

Let me know if any other info is needed.

Thanks much,
Nuo




On Aug 29, 2011, at 6:09 AM, Adriano Henrique de Almeida wrote:

> Hi Nuo, any results here?
> 
> Cheers
> 
> 2011/8/26 Nuo Yan 
> 
>> Hey Adriano,
>> 
>> Thanks very much for your reply. I will try with MaxPermSize.
>> 
>> It's on my local machine, we are evaluating Neo4j and do not have it on
>> production yet. I'm accessing the server through the REST APIs, the app is
>> separate from Neo. I will see if I can do some profiling on Neo when I run
>> my tests.
>> 
>> Thanks,
>> Nuo
>> 
>> 
>> 
>> On Fri, Aug 26, 2011 at 3:53 PM, Adriano Henrique de Almeida <
>> adrianoalmei...@gmail.com> wrote:
>> 
>>> Hey Nuo,
>>> 
>>> wrapper.java.maxmemory and Xmx won't help, since it is a PermGenSpace
>>> problem, and they only deal with HeapSpace. Did you try with:
>>> -XX:*MaxPermSize
>>> **?*
>>> 
>>> Anyway, something very wrong is happening, since you have few nodes.
>>> 
>>> It is happening only on production, or development also? If it is
>> happening
>>> on development, try to isolate the situation where you're stucking the
>>> permgen. Run you app with VisualVM, for instance, or any other profiler.
>>> Aren't you dealing with classloaders on your app?
>>> 
>>> Cheers
>>> 
>>> Adriano Almeida
>>> 
>>> 
>>> 
>>> 2011/8/26 Jim Webber 
>>> 
 Hi Nuo,
 
 if you're using Neo4j server then you can edit the value in
 conf/neo-wrapper.conf
 
 wrapper.java.maxmemory=1024
 
 Jim
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
>>> 
>>> 
>>> 
>>> --
>>> Adriano Almeida
>>> Caelum | Ensino e Inovação
>>> www.caelum.com.br
>>> ___
>>> 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
>> 
> 
> 
> 
> -- 
> Adriano Almeida
> Caelum | Ensino e Inovação
> www.caelum.com.br
> ___
> 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] Index entry removal after relationship deletion

2011-09-06 Thread Nuo Yan
Thanks. That was what I imagined too. However, I have a test that does:

1. create two nodes (e.g. node 2 and node 3)
2. create a relationship between the two nodes (e.g. rel id 23, type :foo)
3. add the relationship to the foo_rels index, with 2 as the key, 3 as the 
value (the node ids) on rel id 23.
(In REST it's a POST to /index/relationship/foo_rels/2/3 with the URI of the 
relationship 23 as the body)
4. look up the relationship from the index, returned expected result (GET to 
/index/relationship/foo_rels/2/3).
5. delete the relationship (id 23) (a DELETE to /relationship/23)
6. look up the relationship from the index again (GET to 
/index/relationship/foo_rels/2/3), returned empty results ([]).

The result of the test confused me. It appears that the relationship was also 
removed from the index (as step 6 returned empty array) when it was deleted.

Any insights?




On Sep 6, 2011, at 7:05 PM, Linan Wang wrote:

> as far as i know, no. you need to do it yourself.
> hint: http://docs.neo4j.org/chunked/1.4.1/indexing-update.html
> 
> On Wed, Sep 7, 2011 at 1:25 AM, Nuo Yan  wrote:
>> Hey guys,
>> 
>> When a relationship gets deleted, will it be removed from the index
>> automatically? My test shows yes, but I want to be absolutely certain.
>> 
>> For example, a relationship :foo exists between node A and B and it's
>> indexed on the foo_rels index with key node_a's id and value node_b's id.
>> When I delete this relationship, do I also have to manually remove it from
>> the index (i.e. a DELETE to /index/relationship/foo_rels/15/23/100 where 15
>> is the key, 23 is the value, 100 is the relationship id)?
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> 
> 
> 
> 
> -- 
> Best regards
> 
> Linan Wang
> ___
> 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] multiple lucene index in a transaction doesn't work?!

2011-09-06 Thread nhatvo
I've searched around the forum, and aware of people who are using different
indexes for optimization.  I am trying modify the
EmbeddedNeo4jWithIndexing.java from the samples directory so support
multiple indexes and I kept on getting exception whenever I try to commit
the transaction.  My use case seems so obvious so there must be a solution
for this.  If I only have one of the indexes, then it's fine, but whenever I
have 2 indexes then it barf'ed! 

The scenario I have is one node with a name and a description.  I want the
description to have full text search, but not the name.  So here is the
standard setup code (simplified for illustration).

g = new EmbeddedGraphDatabase(storeDir);
nIndex = g.index().forNodes ("node_name");
dIndex = g.index().forNodes ("node_desc",
MapUtil.stringMap(IndexManager.PROVIDER, "lucene", "type", "fulltext"));

try{
tx = graphDatabaseService.beginTx();

node = g.createNode();
node.setProperty("name","hello");
node.setProperty("description","this is the description");

nIndex.add(node, "name","hello");
dIndex.add(node, "description","this is the description");

tx.success();
}finally{
tx.finish();
}



Here is the exception I got:

Sep 6, 2011 8:53:32 PM org.neo4j.kernel.impl.transaction.TxManager commit
SEVERE: Commit failed
java.nio.channels.OverlappingFileLockException
at
sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166)
at
sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068)
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868)
at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
at
org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:216)
at org.apache.lucene.store.Lock.obtain(Lock.java:72)
at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1097)
at
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:588)
at
org.neo4j.index.impl.lucene.CommitContext.ensureWriterInstantiated(CommitContext.java:59)
at
org.neo4j.index.impl.lucene.LuceneCommand$AddCommand.perform(LuceneCommand.java:188)
at
org.neo4j.index.impl.lucene.LuceneTransaction.doCommit(LuceneTransaction.java:259)
at
org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:319)
at
org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.commit(XaResourceManager.java:456)
at
org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.commit(XaResourceHelpImpl.java:64)
at
org.neo4j.kernel.impl.transaction.TransactionImpl.doCommit(TransactionImpl.java:516)
at 
org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:659)
at 
org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:622)
at
org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:107)
at 
org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:85)
EmbeddedNeo4jWithIndexing.main(EmbeddedNeo4jWithIndexing.java:85)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Sep 6, 2011 8:53:32 PM org.neo4j.kernel.impl.transaction.TxManager commit
SEVERE: Unable to rollback transaction. Some resources may be commited
others not. Neo4j kernel should be SHUTDOWN for resource maintance and
transaction recovery >
javax.transaction.xa.XAException: Unknown
xid[GlobalId[NEOKERNL|-1963523328321029165|2], BranchId[ 52 49 52 49 52 49
]]
at
org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.rollback(XaResourceManager.java:481)
at
org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.rollback(XaResourceHelpImpl.java:111)
at
org.neo4j.kernel.impl.transaction.TransactionImpl.doRollback(TransactionImpl.java:533)
at 
org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:685)
at 
org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:622)
at
org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:107)
at 
org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:85)
EmbeddedNeo4jWithIndexing.main(EmbeddedNeo4jWithIndexing.java:85)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Excep

Re: [Neo4j] Index entry removal after relationship deletion

2011-09-06 Thread Linan Wang
as far as i know, no. you need to do it yourself.
hint: http://docs.neo4j.org/chunked/1.4.1/indexing-update.html

On Wed, Sep 7, 2011 at 1:25 AM, Nuo Yan  wrote:
> Hey guys,
>
> When a relationship gets deleted, will it be removed from the index
> automatically? My test shows yes, but I want to be absolutely certain.
>
> For example, a relationship :foo exists between node A and B and it's
> indexed on the foo_rels index with key node_a's id and value node_b's id.
> When I delete this relationship, do I also have to manually remove it from
> the index (i.e. a DELETE to /index/relationship/foo_rels/15/23/100 where 15
> is the key, 23 is the value, 100 is the relationship id)?
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Best regards

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


Re: [Neo4j] how Neo4j work for sorting chinese character?

2011-09-06 Thread iamyuanlong
A ha ! I changed the cypher Scala source code by myself .  Thank you for your
help.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-how-Neo4j-work-for-sorting-chinese-character-tp3309754p3315369.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Index entry removal after relationship deletion

2011-09-06 Thread Nuo Yan
Hey guys,

When a relationship gets deleted, will it be removed from the index
automatically? My test shows yes, but I want to be absolutely certain.

For example, a relationship :foo exists between node A and B and it's
indexed on the foo_rels index with key node_a's id and value node_b's id.
When I delete this relationship, do I also have to manually remove it from
the index (i.e. a DELETE to /index/relationship/foo_rels/15/23/100 where 15
is the key, 23 is the value, 100 is the relationship id)?
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [Spring Data Graph] Some questions/suggestions about cross-store persistence

2011-09-06 Thread Michael Hunger
Hi Michel,

sorry just returned from vacation.

the problem with 1) is still - you have to start to define fetch-groups for 
subgraphs etc and you also have to define cascading rules for updates of 
relationships.

Right now I don't have the resources to add all these things (especially as the 
devil lies in the details).

As I already said it is preferable anyway to use attached entities within 
transactional contexts. The detached state was mainly added as convenience for 
web-ui handling.

I see the one issue that you pointed out regarding updates to "detached" 
entities by other users of the graphdb which then show up due to read-through.

Regarding your notion of domain objects - that always depends on your 
architecture.

I'll incorporate your suggestions in our planning but can't promise anything 
about schedules.

2) why is persist confusing?
3) you mean when you persist() a entity to the JPA store then the graph store 
should be persisted as well? It the entity was retrieved in a tx, all its 
changes should be written to the graph store anyway without an explicit 
persist. 
4) We'll put some effort in the cross-store part of Spring Data Graph, but that 
will be probably rather to the end of the year.

Cheers

Michael


Am 06.09.2011 um 23:11 schrieb Michel Domenjoud:

> Hello!
> Is  there anybody to answer to my previous email?
> 
> Thanks!
> Michel
> 
> 2011/9/2 Michel Domenjoud 
> 
>> Hi,
>> I'm currently testing Spring Data Graph, with a focus on polyglot
>> persistence use cases, in order to give a short presentation at Spring User
>> Group in Paris on September.
>> This email follows my previous discussion with Michael Hunger (pasted
>> below), and I have some questions/suggestions:
>> 
>> 1- Add a real detached state for entities:
>> In my previous discussion, I was a bit worrying about the behaviour of Node
>> Entities which make all getters calls doing a read through in the graph
>> database, even if we are not in a transaction.
>> If I understood it correctly, there is indeed no real detached state for
>> node entities.
>> I think this is really an issue because it doesn't correspond to the domain
>> centric purpose of Spring Data. IMHO, this is a semantic problem: if my
>> NodeEntities are domain objects, I expect that a getter call is immutable,
>> and so that it is not a read from database operation (at least once I'm out
>> of a transaction).
>> 
>> => Imagine I have a big process, for example a computation engine using
>> nodes entities retrieved from the graph, with long computation, and output
>> to a file, or another storage engine:
>> -With the current behaviour, the only way to be sure that all properties of
>> a Node Entity are immutable when doing some processes is either to keep a
>> transaction opened during the whole process, either using clones for all
>> nodes.
>> - Keeping a very long transaction, knowing I may use many nodes is IMHO
>> definitly a bad idea.
>> - I can clone my entities, but I think this is not a good idea too, as I
>> will use exactly the same class without any backing Node.
>> => This matter can be really more confusing when using cross-store
>> persistence, as JPA entities have real detached state.
>> To answer to Michael, I don't think this must always goes with complicated
>> Fetch strategies : you could implement a Lazy loading, which would only
>> retrieve node properties by default, then the developper would need to
>> retrieve relationships and related Nodes using an explicit call.
>> 
>> 2. persist() operation is a bit confusing and could lead to mistakes: I'd
>> suggest to separate it in two methods, save and merge.
>> 
>> 3. Cross-store persistence: Allow explicit re-attaching JPA side operation.
>> 
>> Currently, when retrieving a partial NodeEntity from graph database, its
>> JPA is automatically retrieved. On the other side, when retrieving an entity
>> from relationnal database, I have to make an explicit call to persist() to
>> merge the graph side.
>> => I think this can lead to errors, and performances leaks, by example:
>> I use a Traversal to retrieve some partial entities in order to update
>> them, but only for graph side properties. This will work, but for each
>> retrieved entity a implicit JPA merge call will be done...
>> 
>> 4- Last question: what are the forecasts about Cross-store persistence API
>> in Spring Data Graph? Are you planning to make some enhancements on it, or
>> is it just some sugar over Spring Data Graph API?
>> 
>> Thanks by advance for your answers!
>> Michel
>> 
>> Hi Michael,
>>> Ok, I get your point now. In fact, the thing I didn't understand yet was
>>> that each get call on an entity can be compared as a SELECT on relational
>>> db, even no explicit call to the graph repository is done.
>>> 
>>> So, if I understand well, I'd improve the documentation by adding somthing
>>> like that after the paragraph
>>> Existing > All entities returned by library functions are initially in an
>>> attached state. Jus

Re: [Neo4j] [Spring Data Graph] Some questions/suggestions about cross-store persistence

2011-09-06 Thread Michel Domenjoud
Hello!
Is  there anybody to answer to my previous email?

Thanks!
Michel

2011/9/2 Michel Domenjoud 

> Hi,
> I'm currently testing Spring Data Graph, with a focus on polyglot
> persistence use cases, in order to give a short presentation at Spring User
> Group in Paris on September.
>  This email follows my previous discussion with Michael Hunger (pasted
> below), and I have some questions/suggestions:
>
> 1- Add a real detached state for entities:
> In my previous discussion, I was a bit worrying about the behaviour of Node
> Entities which make all getters calls doing a read through in the graph
> database, even if we are not in a transaction.
> If I understood it correctly, there is indeed no real detached state for
> node entities.
> I think this is really an issue because it doesn't correspond to the domain
> centric purpose of Spring Data. IMHO, this is a semantic problem: if my
> NodeEntities are domain objects, I expect that a getter call is immutable,
> and so that it is not a read from database operation (at least once I'm out
> of a transaction).
>
> => Imagine I have a big process, for example a computation engine using
> nodes entities retrieved from the graph, with long computation, and output
> to a file, or another storage engine:
> -With the current behaviour, the only way to be sure that all properties of
> a Node Entity are immutable when doing some processes is either to keep a
> transaction opened during the whole process, either using clones for all
> nodes.
> - Keeping a very long transaction, knowing I may use many nodes is IMHO
> definitly a bad idea.
> - I can clone my entities, but I think this is not a good idea too, as I
> will use exactly the same class without any backing Node.
> => This matter can be really more confusing when using cross-store
> persistence, as JPA entities have real detached state.
> To answer to Michael, I don't think this must always goes with complicated
> Fetch strategies : you could implement a Lazy loading, which would only
> retrieve node properties by default, then the developper would need to
> retrieve relationships and related Nodes using an explicit call.
>
> 2. persist() operation is a bit confusing and could lead to mistakes: I'd
> suggest to separate it in two methods, save and merge.
>
> 3. Cross-store persistence: Allow explicit re-attaching JPA side operation.
>
> Currently, when retrieving a partial NodeEntity from graph database, its
> JPA is automatically retrieved. On the other side, when retrieving an entity
> from relationnal database, I have to make an explicit call to persist() to
> merge the graph side.
> => I think this can lead to errors, and performances leaks, by example:
> I use a Traversal to retrieve some partial entities in order to update
> them, but only for graph side properties. This will work, but for each
> retrieved entity a implicit JPA merge call will be done...
>
> 4- Last question: what are the forecasts about Cross-store persistence API
> in Spring Data Graph? Are you planning to make some enhancements on it, or
> is it just some sugar over Spring Data Graph API?
>
> Thanks by advance for your answers!
> Michel
>
> Hi Michael,
>> Ok, I get your point now. In fact, the thing I didn't understand yet was
>> that each get call on an entity can be compared as a SELECT on relational
>> db, even no explicit call to the graph repository is done.
>>
>> So, if I understand well, I'd improve the documentation by adding somthing
>> like that after the paragraph
>> Existing > All entities returned by library functions are initially in an
>> attached state. Just as with any other entity, changing them outside of a
>> transaction detaches them, and they must be reattached with persist() for
>> the data to be saved.
>> Add this after > However, all entities are still attached when reading
>> fields, as all gettters will read through the last data in the graph. For
>> people used to develop with relationnal databases, this must be  undestood
>> as each getter call can be assimiled to a SELECT operation.
>>
>> Finally, I understand your point about read-through vs. fetch strategies
>> issues, but this only means that developpers will have to code this glu by
>> themselves on each application. I think that if SDG is intended to become a
>> reference for using graph database, this kind of API will have to come with
>> it one day (but maybe am I misleading because I'm too used to relationnal
>> DB).
>>
>> Moreover, I see one point that could be really confusing with this
>> approach in SDG : cross-store persistence. With this API, you provided the
>> capability to manage JPA entities, which can use various fetch strategies,
>> and Graph entities which use read through, in the same entity class.
>> This point is not mentionned is the documentation, I think you should add
>> a big warning about this. Something like:
>> > As mentionned on Chapter 18.8 Detached node entities, node entities are
>> using read-through. On the other side

[Neo4j] Neo4j Events this Week 09/06/2011

2011-09-06 Thread Allison Sparrow
***
Hi Everyone,

Here are the events organized for this week. If you have any questions
regarding participation, feel free to email me at alli...@neotechnology.com
*
*
*LONDON Keynote: Ian Robinson presents @Progressive .NET Tutorials*
Wednesday, 7 September @ 09:30 - 13:20 GMT

This hands-on tutorial will introduce you to building RESTful web services
using the new Microsoft Web APIs (http://wcf.codeplex.com). Over the course
of several exercises, we'll develop a simple Fighting Fantasy service for
machines to play when they're not busy running your business applications.
The tutorial's mixture of theory and practice will cover:
- Resource design and development
- Test-driven server- and client-side development
- The Atom Syndication Format
- Caching
- Hypermedia

http://skillsmatter.com/podcast/open-source-dot-net/restful-web-service-development-in-dot-net

*BAY AREA Meetup: Spring Data & Neo4j*
Wednesday, 7 September @ 19:00 PDT

Join us for an introduction to Spring Data, with a special emphasis on
Spring Data Neo4j. We'll get you started with this exciting new technology,
then take a deeper dive into how you can make the magic happen with Neo4j.

www.meetup.com/graphdb/events/30126321/

*WEBINAR: Getting Started with Spring Data Graph*
Thursday, 8 September @ 10:00-11:00 PDT

The Spring Data project makes it easier to build Spring-powered applications
that use new data access technologies such as non-relational NOSQL
databases, cloud based data services, and graph databases.

This webinar is designed for enterprise developers who are working with
Spring and need to understand if they can benefit from a graph database. The
session will introduce the different types of data management offered in
Spring Data, including graph databases, and will show how easy it is to get
started with the Spring Data Graph project.

https://www1.gotomeeting.com/register/622766136

*São Paulo Workshop: A Programmatic Introduction to Neo4j *@ QCon 2011
Saturday, 10 September @ 9:00 - 17:00 BRT

This tutorial covers the core functionality from the Neo4j graph database,
providing a mixture of theory and accompanying practical sessions to
demonstrate the capabilities of graph data and the Neo4j database.

http://qconsp.com/workshop

*São Paulo Presentation: by Adriano Almeida @ QCon 2011 *
Saturday, 10 September @ 13:00 BRT

http://www.qconsp.com/palestrante/adriano-almeida

*Allison Sparrow* *
**Marketing Manager | Neo Technology*
+19499036091 | @ayeeson 

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


Re: [Neo4j] Community - count me in!

2011-09-06 Thread Rick Bullotta
Congratulations, Peter!  There couldn't be a better champion for Neo4J and the 
community.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Tuesday, September 06, 2011 10:33 AM
To: Neo4j user discussions; gremlin-users; neo4jrb
Subject: [Neo4j] Community - count me in!

Hi all,
Over the last year, the graph community has seen a fantastic surge of
interest and activity. We feel that we can and must support all of you more
seriously, so I am stepping up as the first of the Neo Technology community
team, dedicating more of my time to explicit community support.

http://blog.neo4j.org/2011/09/neo4j-community-team-announcement.html

Good days to come everyone, it's an honor to work with you!

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.
___
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] Community - count me in!

2011-09-06 Thread Peter Neubauer
Hi all,
Over the last year, the graph community has seen a fantastic surge of
interest and activity. We feel that we can and must support all of you more
seriously, so I am stepping up as the first of the Neo Technology community
team, dedicating more of my time to explicit community support.

http://blog.neo4j.org/2011/09/neo4j-community-team-announcement.html

Good days to come everyone, it's an honor to work with you!

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.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j Spatial - GeoProcessing in the making

2011-09-06 Thread Peter Neubauer
Hi all,
while trying to come up with a good approach to GeoProcessing in Neo4j
Spatial as we wrap up Andreas Wilhelms work from the GSoC, we are
experimenting with a dataflow-based lazy approach (using the generic parts
of Tinkerpop pipes). This is broken up into filtering operations (that
filter out and search geometries) and processing operations (that
manipulate, change and create new geometries).

The first result after a day labbing looks like
https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesTest.java,
so basically we have something like

 @Test
public void count_all_geometries_in_a_layer()
{
assertEquals( 2, layer.filter().all().count() );
}
@Test
public void count_number_of_points_in_all_geometries_in_a_layer()
{
assertEquals( 24, layer.filter().all().process().countPoints() );
}


What do you think of this approach to provide a simple way to achieve more
complex operations? With the spatial index soon implementing lazy BBox
searches, we should be able to make this work in the filtering part. Maybe
there should be one more part, search() or index(), dropping back to the
starting points that already exist and that not really are taking any input
beside the search parameters?

In the geoprocessing part, we are currently looking into overriding pipe
implementations so that a simple default toPoints() will convert geometries
to Points using JTS, while a more specialized domain-level toPoints() (will
do that in the OSM model) can actually walk the graph to find out the points
that make up a geometry.

WDYT?

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.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Unable to being transaction

2011-09-06 Thread Adriano Henrique de Almeida
Hi Dima,

and regarding your second message, the NotFoundException for the phone
property, what happens is that, on the beginning you had some nodes without
the phone property, and some time after, nodes were created with this phone
property, and that's a good thing, each node can have it's own properties,
so you can evolve your domain easily.

However, in order to grab the property you want, which may not exist on
every node, just use the overloaded getProperty(String key, Object
defaultValue) on the Node.

Like:

String phone = node.getProperty("phone", "");

Regards,

Adriano Almeida

2011/9/6 Jacob Hansson 

> Like Bryce mentions, this is due to a problem the transaction manager has
> encountered, there should be an exception from it sometime before these
> stack traces show up.
>
> If you are able to, look further back in your logs for output from
> org.neo4j.kernel.impl.transaction.TxManager, there should be a stack trace
> with more in-depth information there.
>
> Also, you may want to try upgrading to 1.4.1, which is essentially the same
> version as 1.4, but with several important fixes, as well as improved
> logging from the transaction manager in case of problems like this.
>
> /Jake
>
> On Tue, Sep 6, 2011 at 7:20 AM, Bryce  wrote:
>
> > Hi Dima,
> >
> > I have actually had what I think is the same issue a few times.  I
> haven't
> > figured out exactly what the issue is yet but this is where I got to.
> >
> > Basically I somehow got:
> > "Unable to rollback transaction. Some resources may be commited others
> not.
> > Neo4j kernel should be SHUTDOWN for resource maintance and transaction
> > recovery >"
> >
> > Then:
> > org.neo4j.graphdb.TransactionFailureException: Unable to commit
> transaction
> > Caused by: javax.transaction.HeuristicMixedException: Unable to rollback
> > ---> error code in commit: -1 ---> error code for rollback: 0
> >
> > At which point the TxManager is set to not ok and will not hand out
> another
> > transaction.  Since I haven't figured out whats causing this I proxy all
> > calls for beginTx through some of my own code that watches for this and
> > shuts down and starts the database.  This is obviously not ideal,
> > especially
> > since it causes a database consistency check to occur and stops all
> > database
> > related work for the time that takes.
> >
> > When I was getting this I was running on 1.2 though and decided to
> upgrade
> > (1.4.1) and see if I still get the issue before raising it.  Haven't seen
> > it
> > since, but have only been running a few days.
> >
> > Cheers
> > Bryce
> >
> > On Fri, Sep 2, 2011 at 8:17 PM, Dima Gutzeit <
> dima.gutz...@mailvision.com
> > >wrote:
> >
> > > Any thoughts on the matter ?
> > >
> > > It scares me that the database can stop processing requests like that,
> > > unless I am doing something very illegal and wrong.
> > >
> > > Thanks in advance.
> > >
> > > Regards,
> > > Dima Gutzeit.
> > >
> > >
> > >
> > >
> > > On Thu, Sep 1, 2011 at 9:09 PM, Dima Gutzeit <
> > dima.gutz...@mailvision.com
> > > >wrote:
> > >
> > > > Here is the story. I had some problem with my index, some
> > inconsistency,
> > > > which cause lots of those:
> > > >
> > > > org.neo4j.graphdb.NotFoundException: phone property not found for
> > > > NodeImpl#115.
> > > > at
> > > >
> > >
> >
> org.neo4j.kernel.impl.core.Primitive.newPropertyNotFoundException(Primitive.java:172)
> > > > ~[neo4j-kernel-1.4.jar:1.4]
> > > > at
> > > > org.neo4j.kernel.impl.core.Primitive.getProperty(Primitive.java:167)
> > > > ~[neo4j-kernel-1.4.jar:1.4]
> > > > at
> > > > org.neo4j.kernel.impl.core.NodeProxy.getProperty(NodeProxy.java:145)
> > > > ~[neo4j-kernel-1.4.jar:1.4]
> > > > at
> > > >
> > >
> >
> com.foo.module.graph.actors.BaseGraphServiceActor.nodeTo(BaseGraphServiceActor.java:89)
> > > > ~[module-neo4j-1.0-SNAPSHOT.jar:na]
> > > > at
> > > >
> > >
> >
> com.foo.module.graph.actors.NodeManagerActor.updates(NodeManagerActor.java:118)
> > > > ~[module-neo4j-1.0-SNAPSHOT.jar:na]
> > > > at
> > > com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$
> > > > 1315857921056.aw
> > >
> >
> $original$_AW_$updates$_AW_$com_foo_module_graph_actors_NodeManager$$ProxiedByAWDelegation$$1315857921056(Unknown
> > > > Source) [aspectwerkz-2.2.3.jar:na]
> > > > at
> > > >
> > >
> >
> com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$1315857921056_1_
> > > > 2012754604_1561793389___AW_JoinPoint.proceed(Unknown Source)
> > > > [aspectwerkz-2.2.3.jar:na]
> > > > at
> > > >
> > >
> >
> akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1$$anonfun$apply$2.apply(TypedActor.scala:227)
> > > > [akka-typed-actor-1.2-RC5.jar:na]
> > > > at
> > scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
> > > > [scala-library-2.9.0-1.jar:na]
> > > > at
> > > >
> > >
> >
> akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1.apply(TypedActor.scala:216)
> > > > [akka

Re: [Neo4j] Unable to being transaction

2011-09-06 Thread Jacob Hansson
Like Bryce mentions, this is due to a problem the transaction manager has
encountered, there should be an exception from it sometime before these
stack traces show up.

If you are able to, look further back in your logs for output from
org.neo4j.kernel.impl.transaction.TxManager, there should be a stack trace
with more in-depth information there.

Also, you may want to try upgrading to 1.4.1, which is essentially the same
version as 1.4, but with several important fixes, as well as improved
logging from the transaction manager in case of problems like this.

/Jake

On Tue, Sep 6, 2011 at 7:20 AM, Bryce  wrote:

> Hi Dima,
>
> I have actually had what I think is the same issue a few times.  I haven't
> figured out exactly what the issue is yet but this is where I got to.
>
> Basically I somehow got:
> "Unable to rollback transaction. Some resources may be commited others not.
> Neo4j kernel should be SHUTDOWN for resource maintance and transaction
> recovery >"
>
> Then:
> org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction
> Caused by: javax.transaction.HeuristicMixedException: Unable to rollback
> ---> error code in commit: -1 ---> error code for rollback: 0
>
> At which point the TxManager is set to not ok and will not hand out another
> transaction.  Since I haven't figured out whats causing this I proxy all
> calls for beginTx through some of my own code that watches for this and
> shuts down and starts the database.  This is obviously not ideal,
> especially
> since it causes a database consistency check to occur and stops all
> database
> related work for the time that takes.
>
> When I was getting this I was running on 1.2 though and decided to upgrade
> (1.4.1) and see if I still get the issue before raising it.  Haven't seen
> it
> since, but have only been running a few days.
>
> Cheers
> Bryce
>
> On Fri, Sep 2, 2011 at 8:17 PM, Dima Gutzeit  >wrote:
>
> > Any thoughts on the matter ?
> >
> > It scares me that the database can stop processing requests like that,
> > unless I am doing something very illegal and wrong.
> >
> > Thanks in advance.
> >
> > Regards,
> > Dima Gutzeit.
> >
> >
> >
> >
> > On Thu, Sep 1, 2011 at 9:09 PM, Dima Gutzeit <
> dima.gutz...@mailvision.com
> > >wrote:
> >
> > > Here is the story. I had some problem with my index, some
> inconsistency,
> > > which cause lots of those:
> > >
> > > org.neo4j.graphdb.NotFoundException: phone property not found for
> > > NodeImpl#115.
> > > at
> > >
> >
> org.neo4j.kernel.impl.core.Primitive.newPropertyNotFoundException(Primitive.java:172)
> > > ~[neo4j-kernel-1.4.jar:1.4]
> > > at
> > > org.neo4j.kernel.impl.core.Primitive.getProperty(Primitive.java:167)
> > > ~[neo4j-kernel-1.4.jar:1.4]
> > > at
> > > org.neo4j.kernel.impl.core.NodeProxy.getProperty(NodeProxy.java:145)
> > > ~[neo4j-kernel-1.4.jar:1.4]
> > > at
> > >
> >
> com.foo.module.graph.actors.BaseGraphServiceActor.nodeTo(BaseGraphServiceActor.java:89)
> > > ~[module-neo4j-1.0-SNAPSHOT.jar:na]
> > > at
> > >
> >
> com.foo.module.graph.actors.NodeManagerActor.updates(NodeManagerActor.java:118)
> > > ~[module-neo4j-1.0-SNAPSHOT.jar:na]
> > > at
> > com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$
> > > 1315857921056.aw
> >
> $original$_AW_$updates$_AW_$com_foo_module_graph_actors_NodeManager$$ProxiedByAWDelegation$$1315857921056(Unknown
> > > Source) [aspectwerkz-2.2.3.jar:na]
> > > at
> > >
> >
> com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$1315857921056_1_
> > > 2012754604_1561793389___AW_JoinPoint.proceed(Unknown Source)
> > > [aspectwerkz-2.2.3.jar:na]
> > > at
> > >
> >
> akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1$$anonfun$apply$2.apply(TypedActor.scala:227)
> > > [akka-typed-actor-1.2-RC5.jar:na]
> > > at
> scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
> > > [scala-library-2.9.0-1.jar:na]
> > > at
> > >
> >
> akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1.apply(TypedActor.scala:216)
> > > [akka-typed-actor-1.2-RC5.jar:na]
> > > at
> scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
> > > [scala-library-2.9.0-1.jar:na]
> > > at
> > > akka.actor.TypedActor$$anonfun$receive$1.apply(TypedActor.scala:215)
> > > [akka-typed-actor-1.2-RC5.jar:na]
> > > at
> > > akka.actor.TypedActor$$anonfun$receive$1.apply(TypedActor.scala:213)
> > > [akka-typed-actor-1.2-RC5.jar:na]
> > > at akka.actor.Actor$class.apply(Actor.scala:551)
> > > [akka-actor-1.2-RC5.jar:na]
> > > at akka.actor.TypedActor.apply(TypedActor.scala:114)
> > > [akka-typed-actor-1.2-RC5.jar:na]
> > > at akka.actor.LocalActorRef.invoke(ActorRef.scala:905)
> > > [akka-actor-1.2-RC5.jar:na]
> > > at
> > akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25)
> > > [akka-actor-1.2-RC5.jar:na]
> > > at
> > >
> >
> akka.dispatch.ExecutableMailbox$class.proces

Re: [Neo4j] Relationship[3] exist but relationship type[2] not found.

2011-09-06 Thread Jacob Hansson
On Tue, Sep 6, 2011 at 11:55 AM, skarab77  wrote:

> Hi All,
>
> I have get the following exception:
>
> Exception in thread "AWT-EventQueue-0" org.neo4j.graphdb.NotFoundException:
> Relationship[1451488] exist but relationship type[2] not found.
>at
> org.neo4j.kernel.impl.core.NodeManager.getRelForProxy(NodeManager.java:566)
>at
> org.neo4j.kernel.impl.core.RelationshipProxy.getType(RelationshipProxy.java:75)
>
> From this post (
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo-NotFoundException-Question-td717235.html)
> I have learned that it can indicate that my neo4j instance is in the
> inconsistency state. Is it possible to fix this issue, is it possible to add
> somehow the missing relationship type?
>
> Best Regards,
> Wojtek
>

What version of neo4j are you using?

/jake


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



-- 
Jacob Hansson
Phone: +46 (0) 763503395
Twitter: @jakewins
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Relationship[3] exist but relationship type[2] not found.

2011-09-06 Thread skarab77
Hi All,

I have get the following exception: 

Exception in thread "AWT-EventQueue-0" org.neo4j.graphdb.NotFoundException: 
Relationship[1451488] exist but relationship type[2] not found.
at 
org.neo4j.kernel.impl.core.NodeManager.getRelForProxy(NodeManager.java:566)
at 
org.neo4j.kernel.impl.core.RelationshipProxy.getType(RelationshipProxy.java:75)

>From this post 
>(http://neo4j-community-discussions.438527.n3.nabble.com/Neo-NotFoundException-Question-td717235.html)
> I have learned that it can indicate that my neo4j instance is in the 
>inconsistency state. Is it possible to fix this issue, is it possible to add 
>somehow the missing relationship type?

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


Re: [Neo4j] Webadmin with embedded neo4j on tomcat 6

2011-09-06 Thread Jacob Hansson
There is no specific workaround for launching the server from within another
web container. It looks like there is a ServletContextListener hooked up for
java server faces, that triggers when neo4j servers' Jetty instance starts a
webapp context, and subsequently fails.

I'm assuming the JSF listener somehow leaks from the Tomcat environment, or
that the context code in Jetty somehow inteferes with the current Tomcat
servlet context.. It does seem like a complex problem to solve.


What you can do is use neo4j-HA. You would have one HA-enabled neo4j server
instance running on its own, and a HighlyAvailableGraphDatabase running
inside your web app, both configured to be part of the same cluster.

/Jake

On Mon, Sep 5, 2011 at 6:05 PM, mpula  wrote:

> In standalone Java application everything is OK. So, is there a method to
> run
> webadmin for Java web application which uses embedded neo4j?
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Webadmin-with-embedded-neo4j-on-tomcat-6-tp3310583p3311270.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Jacob Hansson
Phone: +46 (0) 763503395
Twitter: @jakewins
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user