I'm to get some Spatial basics under my belt but after fiddling around with spatial all afternoon I'm stuck at what seems like the most trivial of problems. ( I actually ran into this same problem in previous attempts and ended up abandoning my efforts )
I'm using the spatial example in the Good Relationships manual<http://static.springsource.org/spring-data/data-graph/snapshot-site/r...> and Michael's post<https://groups.google.com/d/msg/neo4j/uOOZw70RSig/8QIdupLfYIEJ>as a starting point. I'm using venues from New York City but when I run a unit test, I get an "Index with the same name but different config exists!" exception. I suppose that this has something to do with points needing to be unique and receiving the same wkt value if they're close together. But it seems like that should be something expected from real life, for example, you can have multiple "venues" in an office block.
Is there something obvious I'm missing here???
As always, thank you in advance!
As an FYI, I'm using the following Venue class and I tried defining the wkt as both %.2f and %s, which I've also seen used.
@NodeEntity public class Venue { @GraphId private Long graphId; @Indexed(indexType = IndexType.POINT, indexName = "VenueLocation") private String wkt;
public interface VenueRepository extends GraphRepository<Venue>, SpatialRepository<Venue>{}
And for the unit test I'm just doing this:
@Autowired private VenueRepository venueRep;
@Test public void test2FiveNodes(){ for (int i = 0; i < vArray.length; i++) { Venue venue = new Venue(); venue.setLocation(locArray[i][1], locArray[i][0]); venue = venueRep.save(venue);
> I'm to get some Spatial basics under my belt but after fiddling around with
> spatial all afternoon I'm stuck at what seems like the most trivial of
> problems. ( I actually ran into this same problem in previous attempts and
> ended up abandoning my efforts )
> I'm using the spatial example in the Good Relationships manual and Michael's
> post as a starting point. I'm using venues from New York City but when I run
> a unit test, I get an "Index with the same name but different config
> exists!" exception. I suppose that this has something to do with points
> needing to be unique and receiving the same wkt value if they're close
> together. But it seems like that should be something expected from real
> life, for example, you can have multiple "venues" in an office block.
> Is there something obvious I'm missing here???
> As always, thank you in advance!
> As an FYI, I'm using the following Venue class and I tried defining the wkt
> as both %.2f and %s, which I've also seen used.
> @NodeEntity
> public class Venue {
> @GraphId private Long graphId;
> @Indexed(indexType = IndexType.POINT, indexName = "VenueLocation")
> private String wkt;
> Wanna learn something new? Come to @graphconnect.
> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak > <michael...@gmail.com <javascript:>> wrote: > > Hi All,
> > I'm to get some Spatial basics under my belt but after fiddling around > with > > spatial all afternoon I'm stuck at what seems like the most trivial of > > problems. ( I actually ran into this same problem in previous attempts > and > > ended up abandoning my efforts )
> > I'm using the spatial example in the Good Relationships manual and > Michael's > > post as a starting point. I'm using venues from New York City but when I > run > > a unit test, I get an "Index with the same name but different config > > exists!" exception. I suppose that this has something to do with points > > needing to be unique and receiving the same wkt value if they're close > > together. But it seems like that should be something expected from real > > life, for example, you can have multiple "venues" in an office block.
> > Is there something obvious I'm missing here???
> > As always, thank you in advance!
> > As an FYI, I'm using the following Venue class and I tried defining the > wkt > > as both %.2f and %s, which I've also seen used.
> > @NodeEntity > > public class Venue { > > @GraphId private Long graphId; > > @Indexed(indexType = IndexType.POINT, indexName = "VenueLocation") > > private String wkt;
>> Wanna learn something new? Come to @graphconnect.
>> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak
>> <michael...@gmail.com> wrote:
>> > Hi All,
>> > I'm to get some Spatial basics under my belt but after fiddling around
>> > with
>> > spatial all afternoon I'm stuck at what seems like the most trivial of
>> > problems. ( I actually ran into this same problem in previous attempts
>> > and
>> > ended up abandoning my efforts )
>> > I'm using the spatial example in the Good Relationships manual and
>> > Michael's
>> > post as a starting point. I'm using venues from New York City but when I
>> > run
>> > a unit test, I get an "Index with the same name but different config
>> > exists!" exception. I suppose that this has something to do with points
>> > needing to be unique and receiving the same wkt value if they're close
>> > together. But it seems like that should be something expected from real
>> > life, for example, you can have multiple "venues" in an office block.
>> > Is there something obvious I'm missing here???
>> > As always, thank you in advance!
>> > As an FYI, I'm using the following Venue class and I tried defining the
>> > wkt
>> > as both %.2f and %s, which I've also seen used.
>> > @NodeEntity
>> > public class Venue {
>> > @GraphId private Long graphId;
>> > @Indexed(indexType = IndexType.POINT, indexName = "VenueLocation")
>> > private String wkt;
> Wanna learn something new? Come to @graphconnect.
> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak > <michael...@gmail.com <javascript:>> wrote: > > I should have mentioned, I clean the database before every test like so:
> > @RunWith(SpringJUnit4ClassRunner.class) > > @ContextConfiguration("classpath:testContext.xml") > > @Transactional > > public class SpatialTest {
> >> Wanna learn something new? Come to @graphconnect.
> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak > >> <michael...@gmail.com> wrote: > >> > Hi All,
> >> > I'm to get some Spatial basics under my belt but after fiddling > around > >> > with > >> > spatial all afternoon I'm stuck at what seems like the most trivial > of > >> > problems. ( I actually ran into this same problem in previous > attempts > >> > and > >> > ended up abandoning my efforts )
> >> > I'm using the spatial example in the Good Relationships manual and > >> > Michael's > >> > post as a starting point. I'm using venues from New York City but > when I > >> > run > >> > a unit test, I get an "Index with the same name but different config > >> > exists!" exception. I suppose that this has something to do with > points > >> > needing to be unique and receiving the same wkt value if they're > close > >> > together. But it seems like that should be something expected from > real > >> > life, for example, you can have multiple "venues" in an office block.
> >> > Is there something obvious I'm missing here???
> >> > As always, thank you in advance!
> >> > As an FYI, I'm using the following Venue class and I tried defining > the > >> > wkt > >> > as both %.2f and %s, which I've also seen used.
>> Wanna learn something new? Come to @graphconnect.
>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak
>> <michael...@gmail.com> wrote:
>> > I should have mentioned, I clean the database before every test like
>> so:
>> > @RunWith(**SpringJUnit4ClassRunner.class)
>> > @ContextConfiguration("**classpath:testContext.xml")
>> > @Transactional
>> > public class SpatialTest {
>> >> Wanna learn something new? Come to @graphconnect.
>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak
>> >> <michael...@gmail.com> wrote:
>> >> > Hi All,
>> >> > I'm to get some Spatial basics under my belt but after fiddling
>> around
>> >> > with
>> >> > spatial all afternoon I'm stuck at what seems like the most trivial
>> of
>> >> > problems. ( I actually ran into this same problem in previous
>> attempts
>> >> > and
>> >> > ended up abandoning my efforts )
>> >> > I'm using the spatial example in the Good Relationships manual and
>> >> > Michael's
>> >> > post as a starting point. I'm using venues from New York City but
>> when I
>> >> > run
>> >> > a unit test, I get an "Index with the same name but different config
>> >> > exists!" exception. I suppose that this has something to do with
>> points
>> >> > needing to be unique and receiving the same wkt value if they're
>> close
>> >> > together. But it seems like that should be something expected from
>> real
>> >> > life, for example, you can have multiple "venues" in an office
>> block.
>> >> > Is there something obvious I'm missing here???
>> >> > As always, thank you in advance!
>> >> > As an FYI, I'm using the following Venue class and I tried defining
>> the
>> >> > wkt
>> >> > as both %.2f and %s, which I've also seen used.
Going back to the first email, I noticed that the error message was *"Index
with the same name but different config exists!". *I should mention that
this has nothing to do with features being similar or identical. It is
about the definition of the layer. Since we allow the layers to have custom
code for mapping custom domain models into geometries, this knowledge is
embedded in the layer in a dynamic way. For example, we provide three
built-in types of layers, OSMLayer, SimplePointLayer and EditableLayerImpl
(for WKT). If you try to create two layers with the same name, but
different types, you will get the error you see above.
I must assume that you have code that tries to create the layer a second
time, and the second time it does not specify the layer type and gets the
default choice (probably EditableLayerImpl). But the first time it was
created with some other type, perhaps SimplePointLayer if you are storing
only simple lat/long locations (seems to be the case).
On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen <
>>> Wanna learn something new? Come to @graphconnect.
>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak
>>> <michael...@gmail.com> wrote:
>>> > I should have mentioned, I clean the database before every test like
>>> so:
>>> > @RunWith(**SpringJUnit4ClassRunner.class)
>>> > @ContextConfiguration("**classpath:testContext.xml")
>>> > @Transactional
>>> > public class SpatialTest {
>>> >> Wanna learn something new? Come to @graphconnect.
>>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak
>>> >> <michael...@gmail.com> wrote:
>>> >> > Hi All,
>>> >> > I'm to get some Spatial basics under my belt but after fiddling
>>> around
>>> >> > with
>>> >> > spatial all afternoon I'm stuck at what seems like the most trivial
>>> of
>>> >> > problems. ( I actually ran into this same problem in previous
>>> attempts
>>> >> > and
>>> >> > ended up abandoning my efforts )
>>> >> > I'm using the spatial example in the Good Relationships manual and
>>> >> > Michael's
>>> >> > post as a starting point. I'm using venues from New York City but
>>> when I
>>> >> > run
>>> >> > a unit test, I get an "Index with the same name but different
>>> config
>>> >> > exists!" exception. I suppose that this has something to do with
>>> points
>>> >> > needing to be unique and receiving the same wkt value if they're
>>> close
>>> >> > together. But it seems like that should be something expected from
>>> real
>>> >> > life, for example, you can have multiple "venues" in an office
>>> block.
>>> >> > Is there something obvious I'm missing here???
>>> >> > As always, thank you in advance!
>>> >> > As an FYI, I'm using the following Venue class and I tried defining
>>> the
>>> >> > wkt
>>> >> > as both %.2f and %s, which I've also seen used.
I'm trying to reproduce your results using your exact code including the ImpermanentGraphDatabase, however I get a java.lang.NoClassDefFoundError: org/springframework/core/annotation/AnnotationAttributes
This feels like a pom problem. Are there other dependencies I should be using?
>>> Wanna learn something new? Come to @graphconnect.
>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak >>> <michael...@gmail.com> wrote: >>> > I should have mentioned, I clean the database before every test like >>> so:
>>> > @RunWith(**SpringJUnit4ClassRunner.class) >>> > @ContextConfiguration("**classpath:testContext.xml") >>> > @Transactional >>> > public class SpatialTest {
>>> >> Wanna learn something new? Come to @graphconnect.
>>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak >>> >> <michael...@gmail.com> wrote: >>> >> > Hi All,
>>> >> > I'm to get some Spatial basics under my belt but after fiddling >>> around >>> >> > with >>> >> > spatial all afternoon I'm stuck at what seems like the most trivial >>> of >>> >> > problems. ( I actually ran into this same problem in previous >>> attempts >>> >> > and >>> >> > ended up abandoning my efforts )
>>> >> > I'm using the spatial example in the Good Relationships manual and >>> >> > Michael's >>> >> > post as a starting point. I'm using venues from New York City but >>> when I >>> >> > run >>> >> > a unit test, I get an "Index with the same name but different >>> config >>> >> > exists!" exception. I suppose that this has something to do with >>> points >>> >> > needing to be unique and receiving the same wkt value if they're >>> close >>> >> > together. But it seems like that should be something expected from >>> real >>> >> > life, for example, you can have multiple "venues" in an office >>> block.
>>> >> > Is there something obvious I'm missing here???
>>> >> > As always, thank you in advance!
>>> >> > As an FYI, I'm using the following Venue class and I tried defining >>> the >>> >> > wkt >>> >> > as both %.2f and %s, which I've also seen used.
Hi Chris, sorry but that is way over my head. At the moment I'm literally having a problem with executing the code I pasted earlier http://pastebin.com/DR1B9mu9. I initially thought there was a problem with having multiple nodes of a similar POINT index but you seem to be saying that that is not the case. Are you saying that I'm inadvertently creating two layers of the same name? How could I change the above code to correct that?
Could it be something to do with the fact that I use a REST database for my test context?
On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:
> Going back to the first email, I noticed that the error message was *"Index > with the same name but different config exists!". *I should mention that > this has nothing to do with features being similar or identical. It is > about the definition of the layer. Since we allow the layers to have custom > code for mapping custom domain models into geometries, this knowledge is > embedded in the layer in a dynamic way. For example, we provide three > built-in types of layers, OSMLayer, SimplePointLayer and EditableLayerImpl > (for WKT). If you try to create two layers with the same name, but > different types, you will get the error you see above.
> I must assume that you have code that tries to create the layer a second > time, and the second time it does not specify the layer type and gets the > default choice (probably EditableLayerImpl). But the first time it was > created with some other type, perhaps SimplePointLayer if you are storing > only simple lat/long locations (seems to be the case).
> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen < > lasse.wes...@neopersistence.com <javascript:>> wrote:
>> Michael,
>> The code you shared seems to work, for me at least - I have put it into a >> single file test here, using just an in-memory db:
>>>> Wanna learn something new? Come to @graphconnect.
>>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak >>>> <michael...@gmail.com> wrote: >>>> > I should have mentioned, I clean the database before every test like >>>> so:
>>>> > @RunWith(**SpringJUnit4ClassRunner.class) >>>> > @ContextConfiguration("**classpath:testContext.xml") >>>> > @Transactional >>>> > public class SpatialTest {
>>>> >> Wanna learn something new? Come to @graphconnect.
>>>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak >>>> >> <michael...@gmail.com> wrote: >>>> >> > Hi All,
>>>> >> > I'm to get some Spatial basics under my belt but after fiddling >>>> around >>>> >> > with >>>> >> > spatial all afternoon I'm stuck at what seems like the most >>>> trivial of >>>> >> > problems. ( I actually ran into this same problem in previous >>>> attempts >>>> >> > and >>>> >> > ended up abandoning my efforts )
>>>> >> > I'm using the spatial example in the Good Relationships manual and >>>> >> > Michael's >>>> >> > post as a starting point. I'm using venues from New York City but >>>> when I >>>> >> > run >>>> >> > a unit test, I get an "Index with the same name but different >>>> config >>>> >> > exists!" exception. I suppose that this has something to do with >>>> points >>>> >> > needing to be unique and receiving the same wkt value if they're >>>> close >>>> >> > together. But it seems like that should be something expected from >>>> real >>>> >> > life, for example, you can have multiple "venues" in an office >>>> block.
>>>> >> > Is there something obvious I'm missing here???
>>>> >> > As always, thank you in advance!
>>>> >> > As an FYI, I'm using the following Venue class and I tried >>>> defining the >>>> >> > wkt >>>> >> > as both %.2f and %s, which I've also seen used.
> Hi Chris, sorry but that is way over my head. At the moment I'm literally having a problem with executing the code I pasted earlier http://pastebin.com/DR1B9mu9. I initially thought there was a problem with having multiple nodes of a similar POINT index but you seem to be saying that that is not the case. Are you saying that I'm inadvertently creating two layers of the same name? How could I change the above code to correct that?
> Could it be something to do with the fact that I use a REST database for my test context?
> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:
> Going back to the first email, I noticed that the error message was "Index with the same name but different config exists!". I should mention that this has nothing to do with features being similar or identical. It is about the definition of the layer. Since we allow the layers to have custom code for mapping custom domain models into geometries, this knowledge is embedded in the layer in a dynamic way. For example, we provide three built-in types of layers, OSMLayer, SimplePointLayer and EditableLayerImpl (for WKT). If you try to create two layers with the same name, but different types, you will get the error you see above.
> I must assume that you have code that tries to create the layer a second time, and the second time it does not specify the layer type and gets the default choice (probably EditableLayerImpl). But the first time it was created with some other type, perhaps SimplePointLayer if you are storing only simple lat/long locations (seems to be the case).
> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen <lasse.wes...@neopersistence.com> wrote:
> Michael,
> The code you shared seems to work, for me at least - I have put it into a single file test here, using just an in-memory db:
> Wanna learn something new? Come to @graphconnect.
> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak > <michael...@gmail.com> wrote: > > I should have mentioned, I clean the database before every test like so:
> > @RunWith(SpringJUnit4ClassRunner.class) > > @ContextConfiguration("classpath:testContext.xml") > > @Transactional > > public class SpatialTest {
> >> Wanna learn something new? Come to @graphconnect.
> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak > >> <michael...@gmail.com> wrote: > >> > Hi All,
> >> > I'm to get some Spatial basics under my belt but after fiddling around > >> > with > >> > spatial all afternoon I'm stuck at what seems like the most trivial of > >> > problems. ( I actually ran into this same problem in previous attempts > >> > and > >> > ended up abandoning my efforts )
> >> > I'm using the spatial example in the Good Relationships manual and > >> > Michael's > >> > post as a starting point. I'm using venues from New York City but when I > >> > run > >> > a unit test, I get an "Index with the same name but different config > >> > exists!" exception. I suppose that this has something to do with points > >> > needing to be unique and receiving the same wkt value if they're close > >> > together. But it seems like that should be something expected from real > >> > life, for example, you can have multiple "venues" in an office block.
> >> > Is there something obvious I'm missing here???
> >> > As always, thank you in advance!
> >> > As an FYI, I'm using the following Venue class and I tried defining the > >> > wkt > >> > as both %.2f and %s, which I've also seen used.
As an aside, removing the dependency artifactId: spring-data-neo4j-rest produces one of these: ERROR org.springframework.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionL istener@3db9b677] to prepare test instance [com.spatialtest.app.SpatialTest@6b7a5e49] java.lang.IllegalStateException: Failed to load ApplicationContext
On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger wrote:
> Can you share the full exception stacktrace?
> And could you upgrade to SDN-rest 2.1.0.RC4 ?
> And remove the explicit rest-graphdb dependency ?
> I think there was an issue with index type-checking in the rest-graphdb > but am not sure.
> A sample project would be great though !
> Michael
> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
> Hi Chris, sorry but that is way over my head. At the moment I'm literally > having a problem with executing the code I pasted earlier > http://pastebin.com/DR1B9mu9. I initially thought there was a problem > with having multiple nodes of a similar POINT index but you seem to be > saying that that is not the case. Are you saying that I'm inadvertently > creating two layers of the same name? How could I change the above code to > correct that?
> Could it be something to do with the fact that I use a REST database for > my test context?
> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:
>> Going back to the first email, I noticed that the error message was *"Index >> with the same name but different config exists!". *I should mention that >> this has nothing to do with features being similar or identical. It is >> about the definition of the layer. Since we allow the layers to have custom >> code for mapping custom domain models into geometries, this knowledge is >> embedded in the layer in a dynamic way. For example, we provide three >> built-in types of layers, OSMLayer, SimplePointLayer and EditableLayerImpl >> (for WKT). If you try to create two layers with the same name, but >> different types, you will get the error you see above.
>> I must assume that you have code that tries to create the layer a second >> time, and the second time it does not specify the layer type and gets the >> default choice (probably EditableLayerImpl). But the first time it was >> created with some other type, perhaps SimplePointLayer if you are storing >> only simple lat/long locations (seems to be the case).
>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen < >> lasse.wes...@neopersistence.com> wrote:
>>> Michael,
>>> The code you shared seems to work, for me at least - I have put it into >>> a single file test here, using just an in-memory db:
>>>>> Wanna learn something new? Come to @graphconnect.
>>>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak >>>>> <michael...@gmail.com> wrote: >>>>> > I should have mentioned, I clean the database before every test like >>>>> so:
>>>>> > @RunWith(**SpringJUnit4ClassRunner.class) >>>>> > @ContextConfiguration("**classpath:testContext.xml") >>>>> > @Transactional >>>>> > public class SpatialTest {
>>>>> > Also I just tried deleting the whole database and running just this >>>>> test and >>>>> > I get the error exactly when the second node is saved.
>>>>> > On Friday, September 21, 2012 5:00:34 PM UTC-4, Peter Neubauer >>>>> wrote:
>>>>> >> Michael, >>>>> >> are all the tests failing like this or might there be an issue with >>>>> >> the database not being totally clean before runs?
>>>>> >> Wanna learn something new? Come to @graphconnect.
>>>>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak >>>>> >> <michael...@gmail.com> wrote: >>>>> >> > Hi All,
>>>>> >> > I'm to get some Spatial basics under my belt but after fiddling >>>>> around >>>>> >> > with >>>>> >> > spatial all afternoon I'm stuck at what seems like the most >>>>> trivial of >>>>> >> > problems. ( I actually ran into this same problem in previous >>>>> attempts >>>>> >> > and >>>>> >> > ended up abandoning my efforts )
>>>>> >> > I'm using the spatial example in the Good Relationships manual >>>>> and >>>>> >> > Michael's >>>>> >> > post as a starting point. I'm using venues from New York City but >>>>> when I >>>>> >> > run >>>>> >> > a unit test, I get an "Index with the same name but different >>>>> config >>>>> >> > exists!" exception. I suppose that this has something to do with >>>>> points >>>>> >> > needing to be unique and receiving the same wkt value if they're >>>>> close >>>>> >> > together. But it seems like that should be something expected >>>>> from real >>>>> >> > life, for example, you can have multiple "venues" in an office >>>>> block.
>>>>> >> > Is there something obvious I'm missing here???
>>>>> >> > As always, thank you in advance!
>>>>> >> > As an FYI, I'm using the following Venue class and I tried >>>>> defining the >>>>> >> > wkt >>>>> >> > as both %.2f and %s, which I've also seen used.
> As an aside, removing the dependency artifactId: spring-data-neo4j-rest
> produces one of these: ERROR
> org.springframework.test.context.TestContextManager - Caught exception while
> allowing TestExecutionListener
> [org.springframework.test.context.support.DependencyInjectionTestExecutionL istener@3db9b677]
> to prepare test instance [com.spatialtest.app.SpatialTest@6b7a5e49]
> java.lang.IllegalStateException: Failed to load ApplicationContext
> Michael
> On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger wrote:
>> Can you share the full exception stacktrace?
>> And could you upgrade to SDN-rest 2.1.0.RC4 ?
>> And remove the explicit rest-graphdb dependency ?
>> I think there was an issue with index type-checking in the rest-graphdb
>> but am not sure.
>> A sample project would be great though !
>> Michael
>> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
>> Hi Chris, sorry but that is way over my head. At the moment I'm literally
>> having a problem with executing the code I pasted earlier
>> http://pastebin.com/DR1B9mu9. I initially thought there was a problem with
>> having multiple nodes of a similar POINT index but you seem to be saying
>> that that is not the case. Are you saying that I'm inadvertently creating
>> two layers of the same name? How could I change the above code to correct
>> that?
>> Could it be something to do with the fact that I use a REST database for
>> my test context?
>> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:
>>> Going back to the first email, I noticed that the error message was
>>> "Index with the same name but different config exists!". I should mention
>>> that this has nothing to do with features being similar or identical. It is
>>> about the definition of the layer. Since we allow the layers to have custom
>>> code for mapping custom domain models into geometries, this knowledge is
>>> embedded in the layer in a dynamic way. For example, we provide three
>>> built-in types of layers, OSMLayer, SimplePointLayer and EditableLayerImpl
>>> (for WKT). If you try to create two layers with the same name, but different
>>> types, you will get the error you see above.
>>> I must assume that you have code that tries to create the layer a second
>>> time, and the second time it does not specify the layer type and gets the
>>> default choice (probably EditableLayerImpl). But the first time it was
>>> created with some other type, perhaps SimplePointLayer if you are storing
>>> only simple lat/long locations (seems to be the case).
>>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen
>>> <lasse.wes...@neopersistence.com> wrote:
>>>> Michael,
>>>> The code you shared seems to work, for me at least - I have put it into
>>>> a single file test here, using just an in-memory db:
>>>> Interestingly, when I add the cleanup bit I get a problem with Node[0],
>>>> not sure why - but don't think it has to do with spatial necessarily.
>>>> On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak <michael...@gmail.com>
>>>> wrote:
>>>>> Hi Peter, thank you for these rapid responses!
>>>>> I use the Neo4jHelper to clean the database before each test. I've been
>>>>> using it for all my other tests and it's been working so far.
>>>>>> Wanna learn something new? Come to @graphconnect.
>>>>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak
>>>>>> <michael...@gmail.com> wrote:
>>>>>> > I should have mentioned, I clean the database before every test like
>>>>>> > so:
>>>>>> > @RunWith(SpringJUnit4ClassRunner.class)
>>>>>> > @ContextConfiguration("classpath:testContext.xml")
>>>>>> > @Transactional
>>>>>> > public class SpatialTest {
>>>>>> > Also I just tried deleting the whole database and running just this
>>>>>> > test and
>>>>>> > I get the error exactly when the second node is saved.
>>>>>> > On Friday, September 21, 2012 5:00:34 PM UTC-4, Peter Neubauer
>>>>>> > wrote:
>>>>>> >> Michael,
>>>>>> >> are all the tests failing like this or might there be an issue with
>>>>>> >> the database not being totally clean before runs?
>>>>>> >> Wanna learn something new? Come to @graphconnect.
>>>>>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak
>>>>>> >> <michael...@gmail.com> wrote:
>>>>>> >> > Hi All,
>>>>>> >> > I'm to get some Spatial basics under my belt but after fiddling
>>>>>> >> > around
>>>>>> >> > with
>>>>>> >> > spatial all afternoon I'm stuck at what seems like the most
>>>>>> >> > trivial of
>>>>>> >> > problems. ( I actually ran into this same problem in previous
>>>>>> >> > attempts
>>>>>> >> > and
>>>>>> >> > ended up abandoning my efforts )
>>>>>> >> > I'm using the spatial example in the Good Relationships manual
>>>>>> >> > and
>>>>>> >> > Michael's
>>>>>> >> > post as a starting point. I'm using venues from New York City but
>>>>>> >> > when I
>>>>>> >> > run
>>>>>> >> > a unit test, I get an "Index with the same name but different
>>>>>> >> > config
>>>>>> >> > exists!" exception. I suppose that this has something to do with
>>>>>> >> > points
>>>>>> >> > needing to be unique and receiving the same wkt value if they're
>>>>>> >> > close
>>>>>> >> > together. But it seems like that should be something expected
>>>>>> >> > from real
>>>>>> >> > life, for example, you can have multiple "venues" in an office
>>>>>> >> > block.
>>>>>> >> > Is there something obvious I'm missing here???
>>>>>> >> > As always, thank you in advance!
>>>>>> >> > As an FYI, I'm using the following Venue class and I tried
>>>>>> >> > defining the
>>>>>> >> > wkt
>>>>>> >> > as both %.2f and %s, which I've also seen used.
> > As an aside, removing the dependency artifactId: spring-data-neo4j-rest > > produces one of these: ERROR > > org.springframework.test.context.TestContextManager - Caught exception > while > > allowing TestExecutionListener
> > to prepare test instance [com.spatialtest.app.SpatialTest@6b7a5e49] > > java.lang.IllegalStateException: Failed to load ApplicationContext
> > Michael
> > On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger wrote:
> >> Can you share the full exception stacktrace?
> >> And could you upgrade to SDN-rest 2.1.0.RC4 ?
> >> And remove the explicit rest-graphdb dependency ?
> >> I think there was an issue with index type-checking in the rest-graphdb > >> but am not sure.
> >> A sample project would be great though !
> >> Michael
> >> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
> >> Hi Chris, sorry but that is way over my head. At the moment I'm > literally > >> having a problem with executing the code I pasted earlier > >> http://pastebin.com/DR1B9mu9. I initially thought there was a problem > with > >> having multiple nodes of a similar POINT index but you seem to be > saying > >> that that is not the case. Are you saying that I'm inadvertently > creating > >> two layers of the same name? How could I change the above code to > correct > >> that?
> >> Could it be something to do with the fact that I use a REST database > for > >> my test context?
> >> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:
> >>> Going back to the first email, I noticed that the error message was > >>> "Index with the same name but different config exists!". I should > mention > >>> that this has nothing to do with features being similar or identical. > It is > >>> about the definition of the layer. Since we allow the layers to have > custom > >>> code for mapping custom domain models into geometries, this knowledge > is > >>> embedded in the layer in a dynamic way. For example, we provide three > >>> built-in types of layers, OSMLayer, SimplePointLayer and > EditableLayerImpl > >>> (for WKT). If you try to create two layers with the same name, but > different > >>> types, you will get the error you see above.
> >>> I must assume that you have code that tries to create the layer a > second > >>> time, and the second time it does not specify the layer type and gets > the > >>> default choice (probably EditableLayerImpl). But the first time it was > >>> created with some other type, perhaps SimplePointLayer if you are > storing > >>> only simple lat/long locations (seems to be the case).
> >>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen > >>> <lasse.wes...@neopersistence.com> wrote:
> >>>> Michael,
> >>>> The code you shared seems to work, for me at least - I have put it > into > >>>> a single file test here, using just an in-memory db:
> >>>> Interestingly, when I add the cleanup bit I get a problem with > Node[0], > >>>> not sure why - but don't think it has to do with spatial necessarily.
> >>>> On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak < > michael...@gmail.com> > >>>> wrote:
> >>>>> Hi Peter, thank you for these rapid responses!
> >>>>> I use the Neo4jHelper to clean the database before each test. I've > been > >>>>> using it for all my other tests and it's been working so far.
> >>>>>> Wanna learn something new? Come to @graphconnect.
> >>>>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak > >>>>>> <michael...@gmail.com> wrote: > >>>>>> > I should have mentioned, I clean the database before every test > like > >>>>>> > so:
> >>>>>> > @RunWith(SpringJUnit4ClassRunner.class) > >>>>>> > @ContextConfiguration("classpath:testContext.xml") > >>>>>> > @Transactional > >>>>>> > public class SpatialTest {
> >>>>>> > Also I just tried deleting the whole database and running just > this > >>>>>> > test and > >>>>>> > I get the error exactly when the second node is saved.
> >>>>>> > On Friday, September 21, 2012 5:00:34 PM UTC-4, Peter Neubauer > >>>>>> > wrote:
> >>>>>> >> Michael, > >>>>>> >> are all the tests failing like this or might there be an issue > with > >>>>>> >> the database not being totally clean before runs?
> >>>>>> >> Wanna learn something new? Come to @graphconnect.
> >>>>>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak > >>>>>> >> <michael...@gmail.com> wrote: > >>>>>> >> > Hi All,
> >>>>>> >> > I'm to get some Spatial basics under my belt but after > fiddling > >>>>>> >> > around > >>>>>> >> > with > >>>>>> >> > spatial all afternoon I'm stuck at what seems like the most > >>>>>> >> > trivial of > >>>>>> >> > problems. ( I actually ran into this same problem in previous > >>>>>> >> > attempts > >>>>>> >> > and > >>>>>> >> > ended up abandoning my efforts )
> >>>>>> >> > I'm using the spatial example in the Good Relationships manual > >>>>>> >> > and > >>>>>> >> > Michael's > >>>>>> >> > post as a starting point. I'm using venues from New York City > but > >>>>>> >> > when I > >>>>>> >> > run > >>>>>> >> > a unit test, I get an "Index with the same name but different > >>>>>> >> > config > >>>>>> >> > exists!" exception. I suppose that this has something to do > with > >>>>>> >> > points > >>>>>> >> > needing to be unique and receiving the same wkt value if > they're > >>>>>> >> > close > >>>>>> >> > together. But it seems like that should be something expected > >>>>>> >> > from real > >>>>>> >> > life, for example, you can have multiple "venues" in an office > >>>>>> >> > block.
> >>>>>> >> > Is there something obvious I'm missing here???
> >>>>>> >> > As always, thank you in advance!
> >>>>>> >> > As an FYI, I'm using the following Venue class and I tried > >>>>>> >> > defining the > >>>>>> >> > wkt > >>>>>> >> > as both %.2f and %s, which I've also seen used.
> >>>>>> >> > @NodeEntity > >>>>>> >> > public class Venue {
>> > As an aside, removing the dependency artifactId: spring-data-neo4j-rest
>> > produces one of these: ERROR
>> > org.springframework.test.context.TestContextManager - Caught exception
>> > while
>> > allowing TestExecutionListener
>> > [org.springframework.test.context.support.DependencyInjectionTestExecutionL istener@3db9b677]
>> > to prepare test instance [com.spatialtest.app.SpatialTest@6b7a5e49]
>> > java.lang.IllegalStateException: Failed to load ApplicationContext
>> > Michael
>> > On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger wrote:
>> >> Can you share the full exception stacktrace?
>> >> And could you upgrade to SDN-rest 2.1.0.RC4 ?
>> >> And remove the explicit rest-graphdb dependency ?
>> >> I think there was an issue with index type-checking in the rest-graphdb
>> >> but am not sure.
>> >> A sample project would be great though !
>> >> Michael
>> >> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
>> >> Hi Chris, sorry but that is way over my head. At the moment I'm
>> >> literally
>> >> having a problem with executing the code I pasted earlier
>> >> http://pastebin.com/DR1B9mu9. I initially thought there was a problem
>> >> with
>> >> having multiple nodes of a similar POINT index but you seem to be
>> >> saying
>> >> that that is not the case. Are you saying that I'm inadvertently
>> >> creating
>> >> two layers of the same name? How could I change the above code to
>> >> correct
>> >> that?
>> >> Could it be something to do with the fact that I use a REST database
>> >> for
>> >> my test context?
>> >> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:
>> >>> Going back to the first email, I noticed that the error message was
>> >>> "Index with the same name but different config exists!". I should
>> >>> mention
>> >>> that this has nothing to do with features being similar or identical.
>> >>> It is
>> >>> about the definition of the layer. Since we allow the layers to have
>> >>> custom
>> >>> code for mapping custom domain models into geometries, this knowledge
>> >>> is
>> >>> embedded in the layer in a dynamic way. For example, we provide three
>> >>> built-in types of layers, OSMLayer, SimplePointLayer and
>> >>> EditableLayerImpl
>> >>> (for WKT). If you try to create two layers with the same name, but
>> >>> different
>> >>> types, you will get the error you see above.
>> >>> I must assume that you have code that tries to create the layer a
>> >>> second
>> >>> time, and the second time it does not specify the layer type and gets
>> >>> the
>> >>> default choice (probably EditableLayerImpl). But the first time it was
>> >>> created with some other type, perhaps SimplePointLayer if you are
>> >>> storing
>> >>> only simple lat/long locations (seems to be the case).
>> >>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen
>> >>> <lasse.wes...@neopersistence.com> wrote:
>> >>>> Michael,
>> >>>> The code you shared seems to work, for me at least - I have put it
>> >>>> into
>> >>>> a single file test here, using just an in-memory db:
>> >>>> Interestingly, when I add the cleanup bit I get a problem with
>> >>>> Node[0],
>> >>>> not sure why - but don't think it has to do with spatial necessarily.
>> >>>> On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak
>> >>>> <michael...@gmail.com>
>> >>>> wrote:
>> >>>>> Hi Peter, thank you for these rapid responses!
>> >>>>> I use the Neo4jHelper to clean the database before each test. I've
>> >>>>> been
>> >>>>> using it for all my other tests and it's been working so far.
>> >>>>> On Friday, September 21, 2012 6:14:07 PM UTC-4, Peter Neubauer
>> >>>>> wrote:
>> >>>>>> What is Neo4jHelper.cleanDb(template); doing?
>> >>>>>> Do you have that test isolated standalone somewhere? We might be
>> >>>>>> able
>> >>>>>> to recreate it and add it to the standard SDN tests ...
>> >>>>>> Wanna learn something new? Come to @graphconnect.
>> >>>>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak
>> >>>>>> <michael...@gmail.com> wrote:
>> >>>>>> > I should have mentioned, I clean the database before every test
>> >>>>>> > like
>> >>>>>> > so:
>> >>>>>> > @RunWith(SpringJUnit4ClassRunner.class)
>> >>>>>> > @ContextConfiguration("classpath:testContext.xml")
>> >>>>>> > @Transactional
>> >>>>>> > public class SpatialTest {
>> >>>>>> > Also I just tried deleting the whole database and running just
>> >>>>>> > this
>> >>>>>> > test and
>> >>>>>> > I get the error exactly when the second node is saved.
>> >>>>>> > On Friday, September 21, 2012 5:00:34 PM UTC-4, Peter Neubauer
>> >>>>>> > wrote:
>> >>>>>> >> Michael,
>> >>>>>> >> are all the tests failing like this or might there be an issue
>> >>>>>> >> with
>> >>>>>> >> the database not being totally clean before runs?
>> >>>>>> >> Wanna learn something new? Come to @graphconnect.
>> >>>>>> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak
>> >>>>>> >> <michael...@gmail.com> wrote:
>> >>>>>> >> > Hi All,
>> >>>>>> >> > I'm to get some Spatial basics under my belt but after
>> >>>>>> >> > fiddling
>> >>>>>> >> > around
>> >>>>>> >> > with
>> >>>>>> >> > spatial all afternoon I'm stuck at what seems like the most
>> >>>>>> >> > trivial of
>> >>>>>> >> > problems. ( I actually ran into this same problem in previous
>> >>>>>> >> > attempts
>> >>>>>> >> > and
>> >>>>>> >> > ended up
Thanks Peter, I have this, running on my local Neo4j server and with a few hiccups it seems to be working, for example, I can run search queries like this, which is great:
START venuesSpatial=node:location('withinDistance:[40.7143, -74.0099, 15.0]'), user = node(5) MATCH user-[:LIKES]->venues WHERE ID(venues) = venuesSpatial.id AND venues.name=~".*(?i)hall.*" RETURN venues
My last question is, I have my production app running on Heroku and I'm using a Neo4j hosted database instance. How do I go about adding the spatial plugin onto that? I've had a look at this documentation and it I can't find any guidance https://devcenter.heroku.com/articles/neo4j
> >> > to prepare test instance [com.spatialtest.app.SpatialTest@6b7a5e49] > >> > java.lang.IllegalStateException: Failed to load ApplicationContext
> >> > Michael
> >> > On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger > wrote:
> >> >> Can you share the full exception stacktrace?
> >> >> And could you upgrade to SDN-rest 2.1.0.RC4 ?
> >> >> And remove the explicit rest-graphdb dependency ?
> >> >> I think there was an issue with index type-checking in the > rest-graphdb > >> >> but am not sure.
> >> >> A sample project would be great though !
> >> >> Michael
> >> >> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
> >> >> Hi Chris, sorry but that is way over my head. At the moment I'm > >> >> literally > >> >> having a problem with executing the code I pasted earlier > >> >> http://pastebin.com/DR1B9mu9. I initially thought there was a > problem > >> >> with > >> >> having multiple nodes of a similar POINT index but you seem to be > >> >> saying > >> >> that that is not the case. Are you saying that I'm inadvertently > >> >> creating > >> >> two layers of the same name? How could I change the above code to > >> >> correct > >> >> that?
> >> >> Could it be something to do with the fact that I use a REST database > >> >> for > >> >> my test context?
> >> >> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner > wrote:
> >> >>> Going back to the first email, I noticed that the error message was > >> >>> "Index with the same name but different config exists!". I should > >> >>> mention > >> >>> that this has nothing to do with features being similar or > identical. > >> >>> It is > >> >>> about the definition of the layer. Since we allow the layers to > have > >> >>> custom > >> >>> code for mapping custom domain models into geometries, this > knowledge > >> >>> is > >> >>> embedded in the layer in a dynamic way. For example, we provide > three > >> >>> built-in types of layers, OSMLayer, SimplePointLayer and > >> >>> EditableLayerImpl > >> >>> (for WKT). If you try to create two layers with the same name, but > >> >>> different > >> >>> types, you will get the error you see above.
> >> >>> I must assume that you have code that tries to create the layer a > >> >>> second > >> >>> time, and the second time it does not specify the layer type and > gets > >> >>> the > >> >>> default choice (probably EditableLayerImpl). But the first time it > was > >> >>> created with some other type, perhaps SimplePointLayer if you are > >> >>> storing > >> >>> only simple lat/long locations (seems to be the case).
> >> >>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen > >> >>> <lasse.wes...@neopersistence.com> wrote:
> >> >>>> Michael,
> >> >>>> The code you shared seems to work, for me at least - I have put it > >> >>>> into > >> >>>> a single file test here, using just an in-memory db:
> >> >>>> Interestingly, when I add the cleanup bit I get a problem with > >> >>>> Node[0], > >> >>>> not sure why - but don't think it has to do with spatial > necessarily.
> >> >>>> On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak > >> >>>> <michael...@gmail.com> > >> >>>> wrote:
> >> >>>>> Hi Peter, thank you for these rapid responses!
> >> >>>>> I use the Neo4jHelper to clean the database before each test. > I've > >> >>>>> been > >> >>>>> using it for all my other tests and it's been working so far.
> >> >>>>> On Friday, September 21, 2012 6:14:07 PM UTC-4, Peter Neubauer > >> >>>>> wrote:
> >> >>>>>> What is Neo4jHelper.cleanDb(template); doing?
> >> >>>>>> Do you have that test isolated standalone somewhere? We might be > >> >>>>>> able > >> >>>>>> to recreate it and add it to the standard SDN tests ...
> >> >>>>>> Wanna learn something new? Come to @graphconnect.
> >> >>>>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak > >> >>>>>> <michael...@gmail.com> wrote: > >> >>>>>> > I should have mentioned, I clean the database before every > test > >> >>>>>> > like > >> >>>>>> > so:
> >> >>>>>> > Also I just tried deleting the whole database and running just > >> >>>>>> > this > >> >>>>>> > test and > >> >>>>>> > I get the error exactly when the second node is saved.
Michael,
uhh, first, I am not sure Heroku instances should be run in production
(isn't it in beta)? Secondly, currently the free plan (paid ones to
come) is not letting you install plugins. for that, I would take an
environment where you have more control, like an AWS instance on US
East (near Heroku), and spin up your own Neo4j Server, that you can
connect to from Heroku. Would that work?
On Tue, Oct 2, 2012 at 7:53 PM, Michael Janiak <michael.jan...@gmail.com> wrote:
> Thanks Peter, I have this, running on my local Neo4j server and with a few
> hiccups it seems to be working, for example, I can run search queries like
> this, which is great:
> START venuesSpatial=node:location('withinDistance:[40.7143, -74.0099,
> 15.0]'),
> user = node(5)
> MATCH user-[:LIKES]->venues
> WHERE ID(venues) = venuesSpatial.id AND venues.name=~".*(?i)hall.*"
> RETURN venues
> My last question is, I have my production app running on Heroku and I'm
> using a Neo4j hosted database instance. How do I go about adding the spatial
> plugin onto that? I've had a look at this documentation and it I can't find
> any guidance https://devcenter.heroku.com/articles/neo4j
> Michael
> On Wednesday, September 26, 2012 10:36:03 AM UTC-4, Peter Neubauer wrote:
>> Michael,
>> you have to install the plugin into your server that you are running
>> against over REST in your setup, see
>> >> Wanna learn something new? Come to @graphconnect.
>> >> On Tue, Sep 25, 2012 at 6:41 PM, Michael Janiak
>> >> <michael...@gmail.com> wrote:
>> >> > Hi Michael,
>> >> > I updated the SDN rest dependency and tried removing the rest-grapdb
>> >> > dependency but it still doesn't work.
>> >> > Here's the full stack trace and test project:
>> >> > https://github.com/MichaelJaniak/neo4j-spatial-test/. I've included
>> >> > all
>> >> > the
>> >> > dependencies that I'm using for my main project.
>> >> > As an aside, removing the dependency artifactId:
>> >> > spring-data-neo4j-rest
>> >> > produces one of these: ERROR
>> >> > org.springframework.test.context.TestContextManager - Caught
>> >> > exception
>> >> > while
>> >> > allowing TestExecutionListener
>> >> > [org.springframework.test.context.support.DependencyInjectionTestExecutionL istener@3db9b677]
>> >> > to prepare test instance [com.spatialtest.app.SpatialTest@6b7a5e49]
>> >> > java.lang.IllegalStateException: Failed to load ApplicationContext
>> >> > Michael
>> >> > On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger
>> >> > wrote:
>> >> >> Can you share the full exception stacktrace?
>> >> >> And could you upgrade to SDN-rest 2.1.0.RC4 ?
>> >> >> And remove the explicit rest-graphdb dependency ?
>> >> >> I think there was an issue with index type-checking in the
>> >> >> rest-graphdb
>> >> >> but am not sure.
>> >> >> A sample project would be great though !
>> >> >> Michael
>> >> >> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
>> >> >> Hi Chris, sorry but that is way over my head. At the moment I'm
>> >> >> literally
>> >> >> having a problem with executing the code I pasted earlier
>> >> >> http://pastebin.com/DR1B9mu9. I initially thought there was a
>> >> >> problem
>> >> >> with
>> >> >> having multiple nodes of a similar POINT index but you seem to be
>> >> >> saying
>> >> >> that that is not the case. Are you saying that I'm inadvertently
>> >> >> creating
>> >> >> two layers of the same name? How could I change the above code to
>> >> >> correct
>> >> >> that?
>> >> >> Could it be something to do with the fact that I use a REST database
>> >> >> for
>> >> >> my test context?
>> >> >> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner
>> >> >> wrote:
>> >> >>> Going back to the first email, I noticed that the error message was
>> >> >>> "Index with the same name but different config exists!". I should
>> >> >>> mention
>> >> >>> that this has nothing to do with features being similar or
>> >> >>> identical.
>> >> >>> It is
>> >> >>> about the definition of the layer. Since we allow the layers to
>> >> >>> have
>> >> >>> custom
>> >> >>> code for mapping custom domain models into geometries, this
>> >> >>> knowledge
>> >> >>> is
>> >> >>> embedded in the layer in a dynamic way. For example, we provide
>> >> >>> three
>> >> >>> built-in types of layers, OSMLayer, SimplePointLayer and
>> >> >>> EditableLayerImpl
>> >> >>> (for WKT). If you try to create two layers with the same name, but
>> >> >>> different
>> >> >>> types, you will get the error you see above.
>> >> >>> I must assume that you have code that tries to create the layer a
>> >> >>> second
>> >> >>> time, and the second time it does not specify the layer type and
>> >> >>> gets
>> >> >>> the
>> >> >>> default choice (probably EditableLayerImpl). But the first time it
>> >> >>> was
>> >> >>> created with some other type, perhaps SimplePointLayer if you are
>> >> >>> storing
>> >> >>> only simple lat/long locations (seems to be the case).
>> >> >>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen
>> >> >>> <lasse.wes...@neopersistence.com> wrote:
>> >> >>>> Michael,
>> >> >>>> The code you shared seems to work, for me at least - I have put it
>> >> >>>> into
>> >> >>>> a single file test here, using just an in-memory db:
>> >> >>>> Interestingly, when I add the cleanup bit I get a problem with
>> >> >>>> Node[0],
>> >> >>>> not sure why - but don't think it has to do with spatial
>> >> >>>> necessarily.
>> >> >>>> On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak
>> >> >>>> <michael...@gmail.com>
>> >> >>>> wrote:
>> >> >>>>> Hi Peter, thank you for these rapid responses!
>> >> >>>>> I use the Neo4jHelper to clean the database before each test.
>> >> >>>>> I've
>> >> >>>>> been
>> >> >>>>> using it for all my other tests and it's been working so far.
>> >> >>>>> On Friday, September 21, 2012 6:14:07 PM UTC-4, Peter Neubauer
>> >> >>>>> wrote:
>> >> >>>>>> What is Neo4jHelper.cleanDb(template); doing?
>> >> >>>>>> Do you have that test isolated standalone somewhere? We might be
>> >> >>>>>> able
>> >> >>>>>> to recreate it and add it to the standard SDN tests ...
>> >> >>>>>> Wanna learn something new? Come to @graphconnect.
>> >> >>>>>> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak
>> >> >>>>>> <michael...@gmail.com> wrote:
>> >> >>>>>> > I should have mentioned, I clean the database before every
>> >> >>>>>> > test
>> >> >>>>>> > like
>> >> >>>>>> > so:
I thought it would be something like that. We were trying to push that out into the future but I guess we'll have to fast track. We'll probably just deploy the whole app onto EC2. I saw that someone prepared an AMI Neo4j image so we might use that, or just roll our own if it's too complicated.
On Tuesday, October 2, 2012 3:33:19 PM UTC-4, Peter Neubauer wrote:
> Michael, > uhh, first, I am not sure Heroku instances should be run in production > (isn't it in beta)? Secondly, currently the free plan (paid ones to > come) is not letting you install plugins. for that, I would take an > environment where you have more control, like an AWS instance on US > East (near Heroku), and spin up your own Neo4j Server, that you can > connect to from Heroku. Would that work?
> On Tue, Oct 2, 2012 at 7:53 PM, Michael Janiak <michael...@gmail.com<javascript:>> > wrote: > > Thanks Peter, I have this, running on my local Neo4j server and with a > few > > hiccups it seems to be working, for example, I can run search queries > like > > this, which is great:
> > START venuesSpatial=node:location('withinDistance:[40.7143, -74.0099, > > 15.0]'), > > user = node(5) > > MATCH user-[:LIKES]->venues > > WHERE ID(venues) = venuesSpatial.id AND venues.name=~".*(?i)hall.*" > > RETURN venues
> > My last question is, I have my production app running on Heroku and I'm > > using a Neo4j hosted database instance. How do I go about adding the > spatial > > plugin onto that? I've had a look at this documentation and it I can't > find > > any guidance https://devcenter.heroku.com/articles/neo4j
> > Michael
> > On Wednesday, September 26, 2012 10:36:03 AM UTC-4, Peter Neubauer > wrote:
> >> Michael, > >> you have to install the plugin into your server that you are running > >> against over REST in your setup, see
> >> >> Wanna learn something new? Come to @graphconnect.
> >> >> On Tue, Sep 25, 2012 at 6:41 PM, Michael Janiak > >> >> <michael...@gmail.com> wrote: > >> >> > Hi Michael,
> >> >> > I updated the SDN rest dependency and tried removing the > rest-grapdb > >> >> > dependency but it still doesn't work.
> >> >> > Here's the full stack trace and test project: > >> >> > https://github.com/MichaelJaniak/neo4j-spatial-test/. I've > included > >> >> > all > >> >> > the > >> >> > dependencies that I'm using for my main project.
> >> >> > As an aside, removing the dependency artifactId: > >> >> > spring-data-neo4j-rest > >> >> > produces one of these: ERROR > >> >> > org.springframework.test.context.TestContextManager - Caught > >> >> > exception > >> >> > while > >> >> > allowing TestExecutionListener
> >> >> > to prepare test instance > [com.spatialtest.app.SpatialTest@6b7a5e49] > >> >> > java.lang.IllegalStateException: Failed to load ApplicationContext
> >> >> > Michael
> >> >> > On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger > >> >> > wrote:
> >> >> >> Can you share the full exception stacktrace?
> >> >> >> And could you upgrade to SDN-rest 2.1.0.RC4 ?
> >> >> >> And remove the explicit rest-graphdb dependency ?
> >> >> >> I think there was an issue with index type-checking in the > >> >> >> rest-graphdb > >> >> >> but am not sure.
> >> >> >> A sample project would be great though !
> >> >> >> Michael
> >> >> >> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
> >> >> >> Hi Chris, sorry but that is way over my head. At the moment I'm > >> >> >> literally > >> >> >> having a problem with executing the code I pasted earlier > >> >> >> http://pastebin.com/DR1B9mu9. I initially thought there was a > >> >> >> problem > >> >> >> with > >> >> >> having multiple nodes of a similar POINT index but you seem to be > >> >> >> saying > >> >> >> that that is not the case. Are you saying that I'm inadvertently > >> >> >> creating > >> >> >> two layers of the same name? How could I change the above code to > >> >> >> correct > >> >> >> that?
> >> >> >> Could it be something to do with the fact that I use a REST > database > >> >> >> for > >> >> >> my test context?
> >> >> >> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner > >> >> >> wrote:
> >> >> >>> Going back to the first email, I noticed that the error message > was > >> >> >>> "Index with the same name but different config exists!". I > should > >> >> >>> mention > >> >> >>> that this has nothing to do with features being similar or > >> >> >>> identical. > >> >> >>> It is > >> >> >>> about the definition of the layer. Since we allow the layers to > >> >> >>> have > >> >> >>> custom > >> >> >>> code for mapping custom domain models into geometries, this > >> >> >>> knowledge > >> >> >>> is > >> >> >>> embedded in the layer in a dynamic way. For example, we provide > >> >> >>> three > >> >> >>> built-in types of layers, OSMLayer, SimplePointLayer and > >> >> >>> EditableLayerImpl > >> >> >>> (for WKT). If you try to create two layers with the same name, > but > >> >> >>> different > >> >> >>> types, you will get the error you see above.
> >> >> >>> I must assume that you have code that tries to create the layer > a > >> >> >>> second > >> >> >>> time, and the second time it does not specify the layer type and > >> >> >>> gets > >> >> >>> the > >> >> >>> default choice (probably EditableLayerImpl). But the first time > it > >> >> >>> was > >> >> >>> created with some other type, perhaps SimplePointLayer if you > are > >> >> >>> storing > >> >> >>> only simple lat/long locations (seems to be the case).
> >> >> >>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen > >> >> >>> <lasse.wes...@neopersistence.com> wrote:
> >> >> >>>> Michael,
> >> >> >>>> The code you shared seems to work, for me at least - I have put > it > >> >> >>>> into > >> >> >>>> a single file test here, using just an in-memory db:
> >> >> >>>> Interestingly, when I add the cleanup bit I get a problem with > >> >> >>>> Node[0], > >> >> >>>> not sure why - but don't think it has to do with spatial > >> >> >>>> necessarily.
> >> >> >>>> On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak > >> >> >>>> <michael...@gmail.com> > >> >> >>>> wrote:
> >> >> >>>>> Hi Peter, thank you for these rapid responses!
> >> >> >>>>> I use the Neo4jHelper to clean the database before each test. > >> >> >>>>> I've > >> >> >>>>> been > >> >> >>>>> using it for all my other tests and it's been working so far.
On Wed, Oct 3, 2012 at 4:22 PM, Michael Janiak <michael.jan...@gmail.com> wrote:
> I thought it would be something like that. We were trying to push that out
> into the future but I guess we'll have to fast track. We'll probably just
> deploy the whole app onto EC2. I saw that someone prepared an AMI Neo4j
> image so we might use that, or just roll our own if it's too complicated.
> Michael
> On Tuesday, October 2, 2012 3:33:19 PM UTC-4, Peter Neubauer wrote:
>> Michael,
>> uhh, first, I am not sure Heroku instances should be run in production
>> (isn't it in beta)? Secondly, currently the free plan (paid ones to
>> come) is not letting you install plugins. for that, I would take an
>> environment where you have more control, like an AWS instance on US
>> East (near Heroku), and spin up your own Neo4j Server, that you can
>> connect to from Heroku. Would that work?
>> On Tue, Oct 2, 2012 at 7:53 PM, Michael Janiak <michael...@gmail.com>
>> wrote:
>> > Thanks Peter, I have this, running on my local Neo4j server and with a
>> > few
>> > hiccups it seems to be working, for example, I can run search queries
>> > like
>> > this, which is great:
>> > START venuesSpatial=node:location('withinDistance:[40.7143, -74.0099,
>> > 15.0]'),
>> > user = node(5)
>> > MATCH user-[:LIKES]->venues
>> > WHERE ID(venues) = venuesSpatial.id AND venues.name=~".*(?i)hall.*"
>> > RETURN venues
>> > My last question is, I have my production app running on Heroku and I'm
>> > using a Neo4j hosted database instance. How do I go about adding the
>> > spatial
>> > plugin onto that? I've had a look at this documentation and it I can't
>> > find
>> > any guidance https://devcenter.heroku.com/articles/neo4j
>> > Michael
>> > On Wednesday, September 26, 2012 10:36:03 AM UTC-4, Peter Neubauer
>> > wrote:
>> >> Michael,
>> >> you have to install the plugin into your server that you are running
>> >> against over REST in your setup, see
>> >> > On Wednesday, September 26, 2012 3:14:36 AM UTC-4, Peter Neubauer
>> >> > wrote:
>> >> >> Michael,
>> >> >> are you sure you have installed the spatial plugin into your Neo4j
>> >> >> server? Otherwise the spatial index will not work.
>> >> >> Wanna learn something new? Come to @graphconnect.
>> >> >> On Tue, Sep 25, 2012 at 6:41 PM, Michael Janiak
>> >> >> <michael...@gmail.com> wrote:
>> >> >> > Hi Michael,
>> >> >> > I updated the SDN rest dependency and tried removing the
>> >> >> > rest-grapdb
>> >> >> > dependency but it still doesn't work.
>> >> >> > Here's the full stack trace and test project:
>> >> >> > https://github.com/MichaelJaniak/neo4j-spatial-test/. I've
>> >> >> > included
>> >> >> > all
>> >> >> > the
>> >> >> > dependencies that I'm using for my main project.
>> >> >> > As an aside, removing the dependency artifactId:
>> >> >> > spring-data-neo4j-rest
>> >> >> > produces one of these: ERROR
>> >> >> > org.springframework.test.context.TestContextManager - Caught
>> >> >> > exception
>> >> >> > while
>> >> >> > allowing TestExecutionListener
>> >> >> > [org.springframework.test.context.support.DependencyInjectionTestExecutionL istener@3db9b677]
>> >> >> > to prepare test instance
>> >> >> > [com.spatialtest.app.SpatialTest@6b7a5e49]
>> >> >> > java.lang.IllegalStateException: Failed to load ApplicationContext
>> >> >> > Michael
>> >> >> > On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael Hunger
>> >> >> > wrote:
>> >> >> >> Can you share the full exception stacktrace?
>> >> >> >> And could you upgrade to SDN-rest 2.1.0.RC4 ?
>> >> >> >> And remove the explicit rest-graphdb dependency ?
>> >> >> >> I think there was an issue with index type-checking in the
>> >> >> >> rest-graphdb
>> >> >> >> but am not sure.
>> >> >> >> A sample project would be great though !
>> >> >> >> Michael
>> >> >> >> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
>> >> >> >> Hi Chris, sorry but that is way over my head. At the moment I'm
>> >> >> >> literally
>> >> >> >> having a problem with executing the code I pasted earlier
>> >> >> >> http://pastebin.com/DR1B9mu9. I initially thought there was a
>> >> >> >> problem
>> >> >> >> with
>> >> >> >> having multiple nodes of a similar POINT index but you seem to be
>> >> >> >> saying
>> >> >> >> that that is not the case. Are you saying that I'm inadvertently
>> >> >> >> creating
>> >> >> >> two layers of the same name? How could I change the above code to
>> >> >> >> correct
>> >> >> >> that?
>> >> >> >> Could it be something to do with the fact that I use a REST
>> >> >> >> database
>> >> >> >> for
>> >> >> >> my test context?
>> >> >> >> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner
>> >> >> >> wrote:
>> >> >> >>> Going back to the first email, I noticed that the error message
>> >> >> >>> was
>> >> >> >>> "Index with the same name but different config exists!". I
>> >> >> >>> should
>> >> >> >>> mention
>> >> >> >>> that this has nothing to do with features being similar or
>> >> >> >>> identical.
>> >> >> >>> It is
>> >> >> >>> about the definition of the layer. Since we allow the layers to
>> >> >> >>> have
>> >> >> >>> custom
>> >> >> >>> code for mapping custom domain models into geometries, this
>> >> >> >>> knowledge
>> >> >> >>> is
>> >> >> >>> embedded in the layer in a dynamic way. For example, we provide
>> >> >> >>> three
>> >> >> >>> built-in types of layers, OSMLayer, SimplePointLayer and
>> >> >> >>> EditableLayerImpl
>> >> >> >>> (for WKT). If you try to create two layers with the same name,
>> >> >> >>> but
>> >> >> >>> different
>> >> >> >>> types, you will get the error you see above.
>> >> >> >>> I must assume that you have code that tries to create the layer
>> >> >> >>> a
>> >> >> >>> second
>> >> >> >>> time, and the second time it does not specify the layer type and
>> >> >> >>> gets
>> >> >> >>> the
>> >> >> >>> default choice (probably EditableLayerImpl). But the first time
>> >> >> >>> it
>> >> >> >>> was
>> >> >> >>> created with some other type, perhaps SimplePointLayer if you
>> >> >> >>> are
>> >> >> >>> storing
>> >> >> >>> only simple lat/long locations (seems to be the case).
>> >> >> >>> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen
>> >> >> >>> <lasse.wes...@neopersistence.com> wrote:
>> >> >> >>>> Michael,
>> >> >> >>>> The code you shared seems to work, for me at least - I have put
>> >> >> >>>> it
>> >> >> >>>> into
>> >> >> >>>> a single file test here, using just an in-memory db:
> On Wed, Oct 3, 2012 at 4:22 PM, Michael Janiak <michael...@gmail.com<javascript:>> > wrote: > > I thought it would be something like that. We were trying to push that > out > > into the future but I guess we'll have to fast track. We'll probably > just > > deploy the whole app onto EC2. I saw that someone prepared an AMI Neo4j > > image so we might use that, or just roll our own if it's too > complicated.
> > Michael
> > On Tuesday, October 2, 2012 3:33:19 PM UTC-4, Peter Neubauer wrote:
> >> Michael, > >> uhh, first, I am not sure Heroku instances should be run in production > >> (isn't it in beta)? Secondly, currently the free plan (paid ones to > >> come) is not letting you install plugins. for that, I would take an > >> environment where you have more control, like an AWS instance on US > >> East (near Heroku), and spin up your own Neo4j Server, that you can > >> connect to from Heroku. Would that work?
> >> On Tue, Oct 2, 2012 at 7:53 PM, Michael Janiak <michael...@gmail.com> > >> wrote: > >> > Thanks Peter, I have this, running on my local Neo4j server and with > a > >> > few > >> > hiccups it seems to be working, for example, I can run search queries > >> > like > >> > this, which is great:
> >> > START venuesSpatial=node:location('withinDistance:[40.7143, -74.0099, > >> > 15.0]'), > >> > user = node(5) > >> > MATCH user-[:LIKES]->venues > >> > WHERE ID(venues) = venuesSpatial.id AND venues.name=~".*(?i)hall.*" > >> > RETURN venues
> >> > My last question is, I have my production app running on Heroku and > I'm > >> > using a Neo4j hosted database instance. How do I go about adding the > >> > spatial > >> > plugin onto that? I've had a look at this documentation and it I > can't > >> > find > >> > any guidance https://devcenter.heroku.com/articles/neo4j
> >> > Michael
> >> > On Wednesday, September 26, 2012 10:36:03 AM UTC-4, Peter Neubauer > >> > wrote:
> >> >> Michael, > >> >> you have to install the plugin into your server that you are running > >> >> against over REST in your setup, see
> >> >> > On Wednesday, September 26, 2012 3:14:36 AM UTC-4, Peter Neubauer > >> >> > wrote:
> >> >> >> Michael, > >> >> >> are you sure you have installed the spatial plugin into your > Neo4j > >> >> >> server? Otherwise the spatial index will not work.
> >> >> >> Wanna learn something new? Come to @graphconnect.
> >> >> >> On Tue, Sep 25, 2012 at 6:41 PM, Michael Janiak > >> >> >> <michael...@gmail.com> wrote: > >> >> >> > Hi Michael,
> >> >> >> > I updated the SDN rest dependency and tried removing the > >> >> >> > rest-grapdb > >> >> >> > dependency but it still doesn't work.
> >> >> >> > Here's the full stack trace and test project: > >> >> >> > https://github.com/MichaelJaniak/neo4j-spatial-test/. I've > >> >> >> > included > >> >> >> > all > >> >> >> > the > >> >> >> > dependencies that I'm using for my main project.
> >> >> >> > As an aside, removing the dependency artifactId: > >> >> >> > spring-data-neo4j-rest > >> >> >> > produces one of these: ERROR > >> >> >> > org.springframework.test.context.TestContextManager - Caught > >> >> >> > exception > >> >> >> > while > >> >> >> > allowing TestExecutionListener
> >> >> >> > to prepare test instance > >> >> >> > [com.spatialtest.app.SpatialTest@6b7a5e49] > >> >> >> > java.lang.IllegalStateException: Failed to load > ApplicationContext
> >> >> >> > Michael
> >> >> >> > On Tuesday, September 25, 2012 11:45:57 AM UTC-4, Michael > Hunger > >> >> >> > wrote:
> >> >> >> >> Can you share the full exception stacktrace?
> >> >> >> >> And could you upgrade to SDN-rest 2.1.0.RC4 ?
> >> >> >> >> And remove the explicit rest-graphdb dependency ?
> >> >> >> >> I think there was an issue with index type-checking in the > >> >> >> >> rest-graphdb > >> >> >> >> but am not sure.
> >> >> >> >> A sample project would be great though !
> >> >> >> >> Michael
> >> >> >> >> Am 25.09.2012 um 06:59 schrieb Michael Janiak:
> >> >> >> >> Hi Chris, sorry but that is way over my head. At the moment > I'm > >> >> >> >> literally > >> >> >> >> having a problem with executing the code I pasted earlier > >> >> >> >> http://pastebin.com/DR1B9mu9. I initially thought there was a > >> >> >> >> problem > >> >> >> >> with > >> >> >> >> having multiple nodes of a similar POINT index but you seem to > be > >> >> >> >> saying > >> >> >> >> that that is not the case. Are you saying that I'm > inadvertently > >> >> >> >> creating > >> >> >> >> two layers of the same name? How could I change the above code > to > >> >> >> >> correct > >> >> >> >> that?
> >> >> >> >> Could it be something to do with the fact that I use a REST > >> >> >> >> database > >> >> >> >> for > >> >> >> >> my test context?
> >> >> >> >>> Going back to the first email, I noticed that the error > message > >> >> >> >>> was > >> >> >> >>> "Index with the same name but different config exists!". I > >> >> >> >>> should > >> >> >> >>> mention > >> >> >> >>> that this has nothing to do with features being similar or > >> >> >> >>> identical. > >> >> >> >>> It is > >> >> >> >>> about the definition of the layer. Since we allow the layers > to > >> >> >> >>> have > >> >> >> >>> custom > >> >> >> >>> code for mapping custom domain models into geometries, this > >> >> >> >>> knowledge > >> >> >> >>> is > >> >> >> >>> embedded in the layer in a dynamic way. For example, we > provide > >> >> >> >>> three > >> >> >> >>> built-in types of layers, OSMLayer, SimplePointLayer and > >> >> >> >>> EditableLayerImpl > >> >> >> >>> (for WKT). If you try to create two layers with the same > name, > >> >> >> >>> but > >> >> >> >>> different > >> >> >> >>> types, you will get the error you see above.
> >> >> >> >>> I must assume that you have code that tries to create the > layer > >> >> >> >>> a > >> >> >> >>> second > >> >> >> >>> time, and the second time it does not specify the layer type > and > >> >> >> >>> gets