OrientDB client, Visual studio 2012, NUnit and allow java to run

85 views
Skip to first unread message

Harm Salomons

unread,
Feb 4, 2015, 9:37:44 AM2/4/15
to orient-...@googlegroups.com
I did not find any Q&A about this issue, so I post a question.
I have downloaded from GitHub the latest Orient.Client and I try to run the NUnit (v2.6.4) tests. All java related tests fail with the message 

"Cannot create the command executor of class class com.orientechnologies.orient.core.command.script.OCommandExecutorScript for the command request: javascript.db.command('select from V');
com.orientechnologies.orient.core.exception.OSecurityException: Language 'javascript' is not allowed to be executed"

How can I allow Java to run in the NUnit tests in Visual studio 2012?

GoorMoon

unread,
Feb 4, 2015, 9:54:16 AM2/4/15
to orient-...@googlegroups.com
Can you explain more ?
From where you download (URL)
What do you try to do ?

Harm Salomons

unread,
Feb 4, 2015, 2:45:40 PM2/4/15
to orient-...@googlegroups.com
I downloaded the OrientDBClient from Github and with it come a number of NUnit tests (all in C#). Some of those test work correctly, but the ones calling Java functions, like the test with the name 'ShouldExecuteSimpleJavascriptQuery' gives the result shown below.
Because the test came with the client, I suspect that there is some configuration item in my PC that stops Java from running.
I have seen that browsers have options to allow Java script and I am looking for the same in NUnit or in Visual Studio 2012, but where is that option?

Op woensdag 4 februari 2015 15:37:44 UTC+1 schreef Harm Salomons:

GoorMoon

unread,
Feb 5, 2015, 1:24:06 AM2/5/15
to orient-...@googlegroups.com
Are you downloaded from https://github.com/orientechnologies/OrientDB-NET.binary

Do you check with 2.0 version of oriendb ?

Harm Salomons

unread,
Feb 5, 2015, 3:31:24 AM2/5/15
to orient-...@googlegroups.com
Thank you for your answer,

I am running OrientDB Server v2.0.1 locally. From the Orient.Client I have a download from about a week ago. The AssemblyInfo.cs in Orient.Client\Properties does not really help for the version, but it's date is 30 January 2015. 
My guess is that this issue has nothing to do with either OrientDB or Orient.Client, it is just some setting in the Java environment.
For Java I have  in \Program Files\Java the subdirectories jre1.8.0_31 and jre7.
I have less experience in Java than I would like to have...

Harm Salomons

unread,
Feb 5, 2015, 3:33:27 AM2/5/15
to orient-...@googlegroups.com
yes, I downloaded the client from the location you mentioned.

Op donderdag 5 februari 2015 09:31:24 UTC+1 schreef Harm Salomons:

Harm Salomons

unread,
Feb 5, 2015, 3:40:31 AM2/5/15
to orient-...@googlegroups.com
And: I just realized that I am running NUnit via the Resharper menu in Visual Studio, that also may have an effect


Op woensdag 4 februari 2015 15:37:44 UTC+1 schreef Harm Salomons:
I did not find any Q&A about this issue, so I post a question.

GoorMoon

unread,
Feb 5, 2015, 3:48:46 AM2/5/15
to orient-...@googlegroups.com
Can you post configuration file ?

Harm Salomons

unread,
Feb 5, 2015, 5:20:20 AM2/5/15
to orient-...@googlegroups.com
There were two nunit.framework.xml files in the tree, I am using Reshareper 8.2, but I do not know where it keeps it configuration.
Is one of these files the configuration file that you want to see?


Op woensdag 4 februari 2015 15:37:44 UTC+1 schreef Harm Salomons:
I did not find any Q&A about this issue, so I post a question.
orientdb-server-config.xml
nunit.framework.xml
nunit.framework.xml

GoorMoon

unread,
Feb 5, 2015, 9:07:25 AM2/5/15
to orient-...@googlegroups.com
Try to change section in orientdb-server-config.xml

from:
<handler class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter">
<parameters>
<parameter name="enabled" value="true"/>
<parameter name="allowedLanguages" value="SQL"/>
</parameters>
</handler>

to:
<handler class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter">
<parameters>
<parameter name="enabled" value="false"/>
</parameters>
</handler>

Harm Salomons

unread,
Feb 5, 2015, 10:48:09 AM2/5/15
to orient-...@googlegroups.com
green check marks along the NUnit tests for Java, great help, thank you


Op woensdag 4 februari 2015 15:37:44 UTC+1 schreef Harm Salomons:
I did not find any Q&A about this issue, so I post a question.
Reply all
Reply to author
Forward
0 new messages