The webdsl run command passes the –test arg to the webdsl compiler, and during java compilation, I get this error when using JSONObject’s:

 .../.servletapp/src-generated/webdsl/generated/domain/Publication.java:5130: unreported exception org.json.JSONException; must be caught or declared to be thrown
 obj2.put("month", this.getMonth());

(where obj2 is a JSONObject)

When using webdsl build (which doesn’t pass the –test arg), this error is not thrown and the app builds succesfully.
Probably because of a caching bug, calling run after build will work:

webdsl cleanall build -> no errors

webdsl cleanall run -> compile error

webdsl cleanall build run -> no error

Submitted by Elmer van Chastelet on 17 June 2011 at 14:49

On 14 March 2012 at 12:34 Elmer van Chastelet tagged caching

On 3 October 2012 at 13:03 Christoffer Gersen commented:

This is caused by json-20080701.jar in /src/org/webdsl/dsl/project/template-java-servlet/lib-test/. The source of the put method throws the JSONException. When the lib-test jars are not included, then the definition of JSONObject comes from /java-runtime/src/org/json/JSONObject.java where the put method does not throw the exception. The json-20080701.jar is a dependency of selenium, so removing it may cause problems.


On 23 April 2013 at 15:29 Danny Groenewegen commented:

fixed in r5681


On 23 April 2013 at 15:29 Danny Groenewegen closed this issue.

Log in to post comments