Re: StackOverflowError


hadoopmarc@...
 

Your code does work in the Gremlin console::

gremlin> graph = JanusGraphFactory.open('conf/janusgraph-inmemory.properties')
==>standardjanusgraph[inmemory:[127.0.0.1]]
gremlin> g = graph.traversal()
==>graphtraversalsource[standardjanusgraph[inmemory:[127.0.0.1]], standard]
gremlin> shape = Geoshape.geoshape(Geoshape.getShapeFactory().polygon().pointXY(42.5636137, 1.4294247).pointXY(42.5634345, 1.4286752).pointXY(42.5631842,
......1> 1.4276233).pointXY(42.5631815, 1.4276138).pointXY(42.5630055, 1.4269872).pointXY(42.562931, 1.4265631).pointXY(42.5629338, 1.4261425).pointXY(42.5630545, 1.4257756).pointXY(42.5631548,
......
.....50> 1.4276864).pointXY(42.5666263, 1.4292844).pointXY(42.5649079, 1.4304155).pointXY(42.5636137, 1.4294247).build())
==>POLYGON ((42.5636137 1.4294247, 42.5634345 1.4286752, 42.5631842 1.4276233, 42.5631815 1.4276138, 42.5630055 1.4269872, 42.562931 1.4265631, 42.5629338 1.4261425, 42.5630545 1.4257756, 42.5631548 1.4255639, 42.5632525 1.4253578,
.....
42.5673518 1.4176981, 42.5674387 1.4181612, 42.5674788 1.4188149, 42.5674253 1.4202223, 42.5671779 1.4215116, 42.5675657 1.4222743, 42.567198 1.4234637, 42.5668502 1.4248438, 42.5668034 1.4254431, 42.5665996 1.4256616, 42.5663789 1.4256616, 42.5662986 1.4257615, 42.5662385 1.4260521, 42.5662585 1.4270327, 42.5663254 1.4276864, 42.5666263 1.4292844, 42.5649079 1.4304155, 42.5636137 1.4294247))
gremlin> g.addV("place").property("location", shape).iterate()
gremlin> g.V().elementMap()
07:56:52 WARN  org.janusgraph.graphdb.transaction.StandardJanusGraphTx  - Query requires iterating over all vertices [()]. For better performance, use indexes
==>[id:4328,label:place,location:POLYGON ((42.5636137 1.4294247, 42.5634345 1.4286752, 42.5631842 1.4276233, 42.5631815 1.4276138, 42.5630055 1.4269872, 42.562931 1.4265631, 42.5629338 1.4261425, 42.5630545 1.4257756, 42.5631548 1.4255639, 42.5632525 1.4253578, 42.563296 1.4248826, 42.5630498 1.4240456, 42.5628593 1.423398, 42.5627804 1.4225141, 42.5627651 1.422342, 42.5627468 1.4221271, 42.5627348 1.4220021, 42.5627269 1.4219191, 42.5626322 1.4218081, 42.5624978 1.4216512, 42.5624912 1.4216487, 42.5623503 1.4215959, 42.5622872 1.4216057, 42.5620393 1.421644, 42.5616944 1.4217948, 42.5616748 1.4218225, 42.5615849 1.4219518, 42.5610175 1.4219395, 42.5608287 1.4219355, 42.5605198 1.4218759, 42.56015 1.4216089, 42.5600707 1.4215516, 42.5595404 1.4213315, 42.5595036 1.4217903, 42.5594983 1.4218581, 42.5594144 1.4220812, 42.5593411 1.4222761, 42.5593356 1.4222833, 42.5590636 1.4226381, 42.5581458 1.4230955, 42.5573099 1.4241419, 42.5565414 1.4237411, 42.5561665 1.4233305, 42.5558815 1.4230183, 42.5555117 1.4227861, 42.5549333 1.422423, 42.5545621 1.4221852, 42.5541997 1.4219529, 42.5531128 1.4219655, 42.5495304 1.4192789, 42.5494115 1.419276, 42.549377 1.4191139, 42.5493127 1.4190084, 42.5491505 1.4187422, 42.5484352 1.4185147, 42.5476679 1.4185552, 42.5475474 1.4185816, 42.5468891 1.418726, 42.5468618 1.4187247, 42.5463429 1.4187008, 42.5457596 1.4187728, 42.5455126 1.4188341, 42.545198 1.4189122, 42.544961 1.4181254, 42.5443294 1.4160291, 42.5441822 1.4151251, 42.5441717 1.4150285, 42.5441259 1.4145832, 42.5440407 1.4137546, 42.5440415 1.4136785, 42.5440431 1.4135428, 42.5441206 1.4133355, 42.5442098 1.4132219, 42.5442454 1.4131765, 42.5445522 1.4129728, 42.544663 1.4128166, 42.5447116 1.4123952, 42.5446778 1.4122101, 42.5445325 1.412081, 42.544408 1.4119703, 42.5441059 1.4120171, 42.5439514 1.412013, 42.5438015 1.4120091, 42.5436499 1.4119557, 42.543493 1.4119005, 42.5431958 1.411631, 42.5430088 1.4113242, 42.542935 1.411203, 42.542845 1.4110043, 42.5427423 1.4107774, 42.5426489 1.4106755, 42.5424474 1.4104555, 42.5421433 1.4102912, 42.5420712 1.4102776, 42.5418392 1.4102341, 42.5415805 1.4100172, 42.5411338 1.4093772, 42.5408394 1.4085282, 42.5408591 1.4084357, 42.5408993 1.4082469, 42.5410063 1.4081209, 42.5410476 1.4080722, 42.5414254 1.4074508, 42.5419141 1.4071379, 42.5419758 1.4070984, 42.5422187 1.4066858, 42.5423996 1.4063784, 42.5424267 1.4062649, 42.5427505 1.404909, 42.5430595 1.4040922, 42.543159 1.4040768, 42.543366 1.4040448, 42.5434896 1.4040913, 42.5436656 1.4041575, 42.5438109 1.4043174, 42.5438284 1.4043483, 42.543963 1.4045864, 42.5439849 1.4047364, 42.5440229 1.4049975, 42.5440328 1.4050604, 42.5439918 1.4053237, 42.5436868 1.4060542, 42.5434139 1.4064705, 42.5433703 1.4068905, 42.5434406 1.4071038, 42.5434664 1.4071313, 42.5435902 1.4072631, 42.54374 1.407318, 42.5438793 1.4073218, 42.5440422 1.4073263, 42.5443466 1.4072271, 42.5444876 1.4072526, 42.5446574 1.4072832, 42.5449592 1.4075, 42.5453102 1.4076301, 42.5455654 1.4077248, 42.546085 1.407698, 42.5463215 1.4076858, 42.5463387 1.4076741, 42.5465987 1.4075018, 42.5472314 1.4076705, 42.5472432 1.4076749, 42.5473607 1.4077884, 42.547384 1.4078108, 42.5476778 1.4079256, 42.5479562 1.4080344, 42.5481736 1.408115, 42.5482534 1.4081446, 42.5485985 1.408257, 42.5494236 1.4083368, 42.549759 1.4085211, 42.5502429 1.4089597, 42.5511059 1.4093251, 42.5519058 1.4096821, 42.552065 1.4097531, 42.5530648 1.4097279, 42.5539202 1.4095802, 42.554823 1.4094244, 42.5553739 1.4092329, 42.5558203 1.4090778, 42.5563204 1.4089464, 42.5569113 1.4087911, 42.5570485 1.4090052, 42.5574001 1.4095539, 42.5572458 1.4100053, 42.5570862 1.4108466, 42.5570599 1.41084, 42.5568545 1.4107882, 42.5564343 1.4109379, 42.5562704 1.4111169, 42.5562435 1.4111463, 42.5561845 1.4112263, 42.5557191 1.4118566, 42.5554189 1.4122431, 42.5552124 1.4125091, 42.5549176 1.4129215, 42.5548923 1.4129568, 42.5545913 1.4134311, 42.5544426 1.4136654, 42.5544369 1.4136787, 42.5543763 1.4138191, 42.5542763 1.4142646, 42.5542086 1.4145665, 42.5542289 1.415204, 42.554231 1.4154188, 42.554234 1.4157181, 42.5544691 1.4162031, 42.5546629 1.416603, 42.5549928 1.4168831, 42.5552785 1.417316, 42.55536 1.4173463, 42.5557422 1.4174857, 42.5559016 1.4173712, 42.5563083 1.417079, 42.5568766 1.4165371, 42.5572984 1.4157864, 42.5575401 1.4153563, 42.5577207 1.4151742, 42.557824 1.4150701, 42.5583262 1.4145597, 42.558747 1.4144615, 42.5590315 1.4145178, 42.5590508 1.4145216, 42.5595484 1.4146888, 42.5596981 1.4147959, 42.5600884 1.4152725, 42.5602343 1.4154507, 42.560833 1.415453, 42.561041 1.4154074, 42.5612869 1.4153536, 42.5614416 1.4151994, 42.5615441 1.4150017, 42.5616305 1.414835, 42.561522 1.4143014, 42.563243 1.415448, 42.5625715 1.4166422, 42.5626093 1.4167321, 42.5627796 1.4166165, 42.5633659 1.4157819, 42.5635409 1.4155957, 42.5636969 1.4155379, 42.5640421 1.4155572, 42.5641225 1.4155186, 42.5641935 1.4154673, 42.5643826 1.4151463, 42.5645387 1.4150564, 42.5647845 1.4149729, 42.5650257 1.4150435, 42.5650872 1.4153517, 42.5651061 1.4158461, 42.564969 1.4159745, 42.5648129 1.4159616, 42.5646758 1.416212, 42.5645907 1.4162698, 42.5643448 1.416334, 42.5641604 1.4160836, 42.5639759 1.4159937, 42.5638625 1.4161671, 42.5637821 1.4165266, 42.5637868 1.4168862, 42.5639807 1.4180996, 42.5638861 1.4184078, 42.5637442 1.4185233, 42.5636591 1.4185297, 42.5635598 1.4185041, 42.5632383 1.4182729, 42.5630728 1.4182537, 42.5629214 1.4183885, 42.5627796 1.4186325, 42.5627276 1.4193194, 42.5624249 1.4201027, 42.5623303 1.42052, 42.562302 1.4210016, 42.5623918 1.4211877, 42.5626566 1.4214767, 42.5627276 1.4215152, 42.5630964 1.4214767, 42.5633423 1.421207, 42.5635645 1.4207704, 42.5641036 1.4190691, 42.56434 1.4189342, 42.5645859 1.4186967, 42.5644725 1.4178171, 42.5646143 1.417464, 42.5648744 1.4172714, 42.5649453 1.4173099, 42.5649642 1.4175988, 42.564898 1.4180932, 42.5649028 1.4184527, 42.5649453 1.418549, 42.5650257 1.4185683, 42.5651061 1.4185105, 42.5652196 1.418106, 42.5653567 1.4172457, 42.5656451 1.4159424, 42.5657161 1.4153132, 42.5660423 1.4148188, 42.5663733 1.4149087, 42.5669485 1.4147035, 42.5670571 1.4149832, 42.5671378 1.4155916, 42.5673986 1.4164451, 42.5673518 1.4176981, 42.5674387 1.4181612, 42.5674788 1.4188149, 42.5674253 1.4202223, 42.5671779 1.4215116, 42.5675657 1.4222743, 42.567198 1.4234637, 42.5668502 1.4248438, 42.5668034 1.4254431, 42.5665996 1.4256616, 42.5663789 1.4256616, 42.5662986 1.4257615, 42.5662385 1.4260521, 42.5662585 1.4270327, 42.5663254 1.4276864, 42.5666263 1.4292844, 42.5649079 1.4304155, 42.5636137 1.4294247))]
gremlin>

What REPL did you use? Gremlin Console? Python?

Best wishes,     Marc

Join {janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.