jbmusso / gremlin-javascript

JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
MIT License
214 stars 62 forks source link

Serialization error #52

Closed jlabarbera11 closed 8 years ago

jlabarbera11 commented 8 years ago

I am able to reproduce the last issue opened about the serialization error. I get the following error when trying to add a vertex:

Error: Error during serialization: (was java.lang.IllegalStateException) (through reference chain: java.util.ArrayList[0]->com.thinkaurelius.titan.graphdb.relations.RelationIdenti fier["inVertexId"]) (Error 599) at GremlinClient.handleProtocolMessage (/Users/joe/titan/titan/node_modules/gremlin/lib/GremlinClient.js:174:39) at WebSocketGremlinConnection. (/Users/joe/titan/titan/node_modules/gremlin/lib/GremlinClient.js:120:23) at emitOne (events.js:96:13) at WebSocketGremlinConnection.emit (events.js:188:7) at WebSocketGremlinConnection.handleMessage (/Users/joe/titan/titan/node_modules/gremlin/lib/WebSocketGremlinConnection.js:69:12) at WebSocketGremlinConnection._this.ws.onmessage (/Users/joe/titan/titan/node_modules/gremlin/lib/WebSocketGremlinConnection.js:46:20) at WebSocket.onMessage (/Users/joe/titan/titan/node_modules/ws/lib/WebSocket.js:418:14) at emitTwo (events.js:106:13) at WebSocket.emit (events.js:191:7)

This is what my gremlin-server.yaml looks like:

host: 0.0.0.0
port: 8182
threadPoolWorker: 1
gremlinPool: 8
scriptEvaluationTimeout: 30000
serializedResponseTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {
  graph: conf/gremlin-server/titan-cassandra-es-server.properties}
plugins:
  - aurelius.titan
scriptEngines: {
  gremlin-groovy: {
    imports: [java.lang.Math],
    staticImports: [java.lang.Math.PI],
    scripts: [scripts/empty-sample.groovy]},
  nashorn: {
      imports: [java.lang.Math],
      staticImports: [java.lang.Math.PI]}}
serializers:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { useMapperFromGraph: graph }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 }
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 }
processors:
  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
metrics: {
  consoleReporter: {enabled: true, interval: 180000},
  csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
  jmxReporter: {enabled: true},
  slf4jReporter: {enabled: true, interval: 180000},
  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
  graphiteReporter: {enabled: false, interval: 180000}}
threadPoolBoss: 1
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferHighWaterMark: 32768
writeBufferHighWaterMark: 65536
ssl: {
  enabled: false}
jlabarbera11 commented 8 years ago

Solved in https://github.com/jbmusso/gremlin-javascript/issues/15