Hi Hartmut,

I just pushed a fix for the NPE on 2.2.x branch. The fix will be released
with next 2.2.4

Thanks

Luigi


2016-06-30 9:29 GMT+02:00 Luigi Dell'Aquila <[email protected]>:

> Hi Hartmut
>
> I see a backslash before a } in your request
>
>   ret= DB.execute { 'MATCH {class: Industry, as: Industries\} <-- {} <-- {
> as: Subcategories }  RETURN Industries, Subcategories' }
>
> Could that be the problem?
>
> About the NPE, I'm checking it now
>
> Thanks
>
> Luigi
>
>
> 2016-06-29 17:20 GMT+02:00 hartmut bischoff <[email protected]>:
>
>> Hi,
>> I am trying to implement the match-query-syntax either in the java-api
>> (through jruby) or via REST.
>>
>> This works in Studio:
>>
>>> MATCH {class: Industry, as: Industries} <-- {} <-- { as: Subcategories }
>>> RETURN Industries, Subcategories
>>>
>>
>>
>>
>>     "result": [
>>
>>         {
>>
>>             "@type": "d",
>>
>>             "@version": 0,
>>
>>             "Industries": "#21:3",
>>
>>             "Subcategories": "#28:46",
>>
>>             "@fieldTypes": "Industries=x,Subcategories=x"
>>
>>         },
>>
>>         {
>>
>>             "@type": "d",
>>
>>             "@version": 0,
>>
>>             "Industries": "#23:1",
>>
>>             "Subcategories": "#26:2",
>>
>>             "@fieldTypes": "Industries=x,Subcategories=x"
>>
>>         },  (...)
>>
>>
>> However "explain" gives a  java.lang.NullPointerException.#
>>
>> Now my problem.
>>
>> When submitting the query via REST(batch) it is parsed via json
>> and ends up with a Timeout-Error (im my case
>>
>> #
>>>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:427:in
>>>> `rescue in transmit
>>>
>>>     #
>>>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:350:in
>>>> `transmit'
>>>
>>>      #
>>>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in
>>>> `execute'
>>>
>>>      #
>>>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in
>>>> `execute'
>>>
>>>      #
>>>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/resource.rb:67:in
>>>> `post'
>>>
>>>      # /home/topo/activeorient/lib/rest_operations.rb:63:in `execute'
>>>
>>>      # /home/topo/activeorient/lib/model_class.rb:353:in `query_database'
>>>
>>>      # /home/topo/activeorient/lib/model_class.rb:316:in `match'
>>>
>>>      # ./spec/usecase/contracts_spec.rb:87:in `block (3 levels) in <top
>>>> (required)>'
>>>
>>>      # ------------------
>>>
>>>      # --- Caused by: ---
>>>
>>>      # Net::ReadTimeout:
>>>
>>>      #   Net::ReadTimeout
>>>
>>>      #
>>>> /home/topo/.rvm/gems/ruby-2.3.1/gems/rest-client-1.8.0/lib/restclient/request.rb:270:in
>>>> `net_http_do_requestt
>>>
>>>
>> when transmitting via the java api using the command method,
>> jruby-head :012 >   ret= DB.execute { 'MATCH {class: Industry, as:
>> Industries\} <-- {} <-- { as: Subcategories }  RETURN Industries,
>> Subcategories' }
>> Java::ComOrientechnologiesOrientEnterpriseChannelBinary::OResponseProcessingException:
>> Exception during response processing
>> from
>> com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:447)
>> from
>> com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:382)
>> from
>> com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:264)
>> from
>> com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(com/orientechnologies/orient/client/binary/OChannelBinaryAsynchClient.java:152)
>> from
>> com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(com/orientechnologies/orient/client/remote/OStorageRemote.java:2117)
>> from
>> com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(com/orientechnologies/orient/client/remote/OStorageRemote.java:2112)
>> from
>> com.orientechnologies.orient.client.remote.OStorageRemote$19.execute(com/orientechnologies/orient/client/remote/OStorageRemote.java:1154)
>> from
>> com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(com/orientechnologies/orient/client/remote/OStorageRemote.java:168)
>> from
>> com.orientechnologies.orient.client.remote.OStorageRemote.command(com/orientechnologies/orient/client/remote/OStorageRemote.java:1130)
>> from
>> com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(com/orientechnologies/orient/core/command/OCommandRequestTextAbstract.java:69)
>> from java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
>> from
>> org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:423)
>> from
>> org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:290)
>> from
>> RUBY.run_command(/home/topo/orientdb-jruby/lib/orientdb/database.rb:6)
>> from RUBY.block in execute(/home/topo/activeorient/lib/java-api.rb:306)
>>
>> As there is a SerializedException-Error,  I suspect, this is simply a
>> matter of escaping some characters.
>> How is this done?
>>
>> Thanks
>>
>> hartmut
>>
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to