On 21-Jul-14 18:57, Kotliarov, Alex (NIH/NLM/NCBI) [C] wrote:
> Hello,

Hello

> I am trying to execute a workflow run via REST API on Taverna server 2.5
> running under Tomcat7.
>
> Some of the BeanShell scripts use JSONObject class from
> json-simple-1.1.1.jar and I get “Class: JSONObject not found in
> namespace” error:
>
> “Processor 'make_payload' - Port 'json_text': Line 4: Sourced file:
> inline evaluation of: ``import java.io.StringWriter; import
> org.json.simple.JSONObject;  JSONObject obj  . . . '' : Typed variable
> declaration : Class: JSONObject not found in namespace”
>
> A script looks like this:
>
> import java.io.StringWriter;
>
> import org.json.simple.JSONObject;
>
> JSONObject obj = new JSONObject();
>
> obj.put("submission_id", submission_id);
>
> StringWriter out = new StringWriter();
>
> obj.writeJSONString(out);
>
> json_text = out.toString();
>
> In workbench everything works fine.

Did you add json-simple-1.1.1.jar to the user lib directory for the 
workbench and specify it as a dependency of the beanshell? In the core 
workbench I get the same error as you get in the server. Which variant 
of the workbench are you running? (It says at the top.)

> I have tried to put json-simple JAR into tomcat library directories.

Donal Fellows who writes the server will reply tomorrow. From your 
comment about the tomcat library directories, I assume you have write 
access to the server webapp directory.

> Thank you for your help,
>
> Alex Kotliarov

Alan



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/

Reply via email to