Hi Alan,

> 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.)

Taverna Workbench Core 2.5.0

I did copy json-simple-1.1.1.jar to the lib directory for the workbench and 
specified it as a dependency for the beanshell. Classloader persistence is set 
to "Shared for whole workflow".

> 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.

I do have write access to the Tomcat's webapp directory and did copy 
json-simple-1.1.1.jar to 'webapps/tavernaserver/WEB-INF/lib'

Thanks,

Alex

-----Original Message-----
From: Alan R Williams [mailto:[email protected]] 
Sent: Monday, July 21, 2014 3:58 PM
To: [email protected]
Subject: Re: [Taverna-users] Taverna 2.5 server / BeanShell / Class: JSONObject 
not found in namespace

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/

------------------------------------------------------------------------------
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