Author: jacopoc
Date: Thu Feb 11 11:31:13 2016 New Revision: 1729810 URL: http://svn.apache.org/viewvc?rev=1729810&view=rev Log: Applied fix from trunk for revision: 1729809 === OFBIZ-6568 With the implementation of @BaseScript annotations (introduced with Groovy 2.3.0) something was broken in the CompilerConfiguration.setScriptBaseClass method and an error is thrown when our scripts are executed; the workaround is to execute at startup a script containing the @BaseScript annotation. Added: ofbiz/branches/release15.12/framework/base/config/GroovyInit.groovy - copied unchanged from r1729809, ofbiz/trunk/framework/base/config/GroovyInit.groovy Modified: ofbiz/branches/release15.12/ (props changed) ofbiz/branches/release15.12/applications/commonext/webapp/ofbizsetup/organization/changeOrgPartyId.groovy ofbiz/branches/release15.12/framework/base/src/org/ofbiz/base/util/GroovyUtil.java ofbiz/branches/release15.12/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy Propchange: ofbiz/branches/release15.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Feb 11 11:31:13 2016 @@ -9,4 +9,4 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1728398,1728411,1729005,1729078,1729609 +/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1728398,1728411,1729005,1729078,1729609,1729809 Modified: ofbiz/branches/release15.12/applications/commonext/webapp/ofbizsetup/organization/changeOrgPartyId.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/commonext/webapp/ofbizsetup/organization/changeOrgPartyId.groovy?rev=1729810&r1=1729809&r2=1729810&view=diff ============================================================================== --- ofbiz/branches/release15.12/applications/commonext/webapp/ofbizsetup/organization/changeOrgPartyId.groovy (original) +++ ofbiz/branches/release15.12/applications/commonext/webapp/ofbizsetup/organization/changeOrgPartyId.groovy Thu Feb 11 11:31:13 2016 @@ -17,8 +17,6 @@ * under the License. */ -@BaseScript(org.ofbiz.service.engine.GroovyBaseScript) -import groovy.transform.BaseScript import org.ofbiz.base.util.*; //partyAcctgPrefAndGroupList Modified: ofbiz/branches/release15.12/framework/base/src/org/ofbiz/base/util/GroovyUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/framework/base/src/org/ofbiz/base/util/GroovyUtil.java?rev=1729810&r1=1729809&r2=1729810&view=diff ============================================================================== --- ofbiz/branches/release15.12/framework/base/src/org/ofbiz/base/util/GroovyUtil.java (original) +++ ofbiz/branches/release15.12/framework/base/src/org/ofbiz/base/util/GroovyUtil.java Thu Feb 11 11:31:13 2016 @@ -57,6 +57,16 @@ public class GroovyUtil { groovyClassLoader = new GroovyClassLoader(GroovyUtil.class.getClassLoader(), conf); } groovyScriptClassLoader = groovyClassLoader; + /* + * With the implementation of @BaseScript annotations (introduced with Groovy 2.3.0) something was broken + * in the CompilerConfiguration.setScriptBaseClass method and an error is thrown when our scripts are executed; + * the workaround is to execute at startup a script containing the @BaseScript annotation. + */ + try { + GroovyUtil.runScriptAtLocation("component://base/config/GroovyInit.groovy", null, null); + } catch(Exception e) { + Debug.logWarning("The following error occurred during the initialization of Groovy: " + e.getMessage(), module); + } } /** Modified: ofbiz/branches/release15.12/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy?rev=1729810&r1=1729809&r2=1729810&view=diff ============================================================================== --- ofbiz/branches/release15.12/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy (original) +++ ofbiz/branches/release15.12/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy Thu Feb 11 11:31:13 2016 @@ -17,8 +17,6 @@ * under the License. */ -@BaseScript(org.ofbiz.service.engine.GroovyBaseScript) -import groovy.transform.BaseScript import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.*; |
Free forum by Nabble | Edit this page |