(OFBIZ-10646)
Following discussion at https://markmail.org/message/y3izmnxd7jd6jbkf
this cleans some Groovy files in the base component, notably:
* remove ant-scripts folder and its content.
* Rename framework/base/groovyScript to framework/base/groovyScripts;
* Move GroovyInit.groovy and GroovyServiceTest.groovy respectively to
framework/base/groovyScripts and framework/common/groovyScripts
and change their paths where used.
* Removes GroovyInit.groovy from excludedConfigFiles in build.gradle
* After OFBIZ-10611 it's possible to move GroovyBaseScript.groovy from
framework/service/src/main/java/org/apache/ofbiz/service/engine
to
framework/service/src/main/groovy/org/apache/ofbiz/service/engine
* Removes FileUtilTests.groovy from basetests.xml (missed it in OFBIZ-10611)
* Fixes a typo in test-suite.xsd
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846485 13f79535-47bb-0310-9956-ffa450edef68
have any impact during tests
It's not strange, it's documented (I did it but forgot):
"this can be used only against trunk demo and is not in the tests set to avoid a dependency on Internet"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1786214 13f79535-47bb-0310-9956-ffa450edef68
* removed the code that implemented the deprecated "call-bsh" operation in Minilang
* removed the BeanShellContainer (it has been disabled a long time ago)
* removed the BeanShell service engine, no more used
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751947 13f79535-47bb-0310-9956-ffa450edef68
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)
I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix
I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to
"The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
I decided to comment out as less as possible because once the RMI loaders, the RMI dispatcher and the related test services are off there is no RMI related danger left (test services are not a danger but would fail during tests run). It's then easier for users who need RMI in their projects to have only to uncomment those and not digg everywhere. Because the naming (JNDI) server relies on the rmi loader it will also be commented out.
[CVE-2016-2170] The infamous Java serialization vulnerability
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735569 13f79535-47bb-0310-9956-ffa450edef68
*What's for?*
Finally, OOTB the port offset is interesting in 2 cases:
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
# To simultaneously run the demos without having to change much things, just one parameter (this will need to have the same commited in R13.07... to be discussed...)
Of course, It can be used for other purposes outside of the ASF context...
*How it's done?*
Basically, I just added a portoffset integer parameter to 3 ant targets (of course this JVM param can also be used in a Java call from command line): start, start-pos, start-both,
The portoffset parameter is set to zero by default in ClassLoaderContainer.java.
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.
The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests
To avoid hardcoding locations in services definitions, I also created 2 service-locations: main-http and main-soap
*To summarize:* these changes will be used to run "ant start" with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time. R13.07 could have a similar patch applied since it's not yet released...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533839 13f79535-47bb-0310-9956-ffa450edef68
*What's for?*
OOTB the port offset is interesting in at least 3 cases:
# To simultaneously run tests on the same Buildbot machine. This is related to http://mail-archives.apache.org/mod_mbox/www-builds/201209.mbox/%3C002101cd991b$0a16de50$1e449af0$@16degrees.com.au%3E
# To simultaneously run the demos without having to change much things, just one parameter
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
*How it's done?*
Basically, I just added a portoffset integer parameter to some ant targets (of course this JVM param can also be used in a Java call from command line):
* in trunk and R13.07: start, start-batch, start-debug, start-pos, start-both, run-tests and run-test
* in R12.04 and R11.04: run-tests, run-test. I did not set start targets because anyway it would miss the admin port offset, withouh much changes. So can't be used to demonstrate. We will continue to use the current paches for those.
The portoffset parameter is set to zero by default in ClassLoaderContainer.java.
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.
The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value in R13.07 and trunk.
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests
To avoid hardcoding locations in services definitions, I also had to create some service-locations: main-local-soap and main-remote-soap
*What are the constraints?*
* For demos: the offset should not be applied to trunk because <service-location name="main-remote-soap" location="http://demo-trunk.ofbiz.apache.org:8080/webtools/control/SOAPService"/> is used for tests by trunk *and all releases*. It's useless to apply to trunk anyway, offsetting port in releases is enough.
* I did not take into account the Ideal payment harcoded port values in IdealPaymentServiceTest.java. Weirdly I did not cross error during tests, though it seems there are tests using an harcoded port in url.
*What is the status?*
Locally (on Win XP) I ran many tests combinations with <<ant load-demo run-tests>>.
Applying the portoffset on a sole running test instance has no effects. I have still some fails (no errors) but those are not related to my changes, they appear also without.
But when I run a combination of any releases/trunk but with R11.04, I get a time out error with testSOAPSimpleService, that I can't explain so far.
If I run the trunk alone with the portoffset no errors occur. Same if I run a release with portoffset and only testSOAPSimpleService in trunk (w/ or w/o portoffset)
*To summarize:* these changes will be used to run Buildot tests instances simultaneously . And, for coming releases, to run demos without having to create patches. Simply running ant start with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time.
*What I will to do for now:* commit the patches and test if I cross the same issue on Buildbot. If it's the same (99% chances it will) I will revert and will continue to locally try to find the reason . I believe this issue is unrelated to the changes I implemened. And it's just because it's now possible to simultaneously run tests that it appears.
BTW I just noticed that when you run R11.04 with R12.04, R12.04 takes almost all the CPU (XP is not very, while when running any combinations w/o R11.04 the CPU load is shared.
Also there are far less tests in R11.04, which coul be the reason when I run it with another test run instance there are no issues. Because R11.04 tests finish before the other instance gets to run testSOAPSimpleService.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1525909 13f79535-47bb-0310-9956-ffa450edef68
When I reverted r1311214 for "set different ports for testing in a CI environment (e.g. Jenkins)" https://issues.apache.org/jira/browse/OFBIZ-4794 I did not notice Jacopo's also changed some ports value at r1324614
This reverts r1324614 to have things consistent. I don't backport (only R12.04 is concerned) because as long as catalina/ofbiz-component.xml is consistent (port =+ 1) things are working
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1502121 13f79535-47bb-0310-9956-ffa450edef68
1. Fixed reference to application-level entity.
2. Made the behavior of the test function different from the behavior of global code - so the distinctions are clear in the service results.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300469 13f79535-47bb-0310-9956-ffa450edef68
The engine comes from http://java.net/projects/scripting. I had to modify the code slightly because the BshScriptEngine class implemented Compilable - but the Compilable methods were not implemented. So I removed implements Compilable. I renamed the jar to signify that the code has been modified.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297478 13f79535-47bb-0310-9956-ffa450edef68
* Adds a bunch of external SOAP services, none of them work so far, not sure why, a good exercise for the future...
I have tried to backport to R9.04 the testRemoteSoap change but it does not work there:
2011-02-19 17:26:02,500 (http-0.0.0.0-8443-1) [ Call.java:2469:ERROR] Exception:
org.xml.sax.SAXException: Deserializing parameter 'map-Map': could not find deserializer for type {http://www.w3.org/2001/XMLSchema}anyType
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.ofbiz.service.engine.SOAPClientEngine.serviceInvoker(SOAPClientEngine.java:137)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1072378 13f79535-47bb-0310-9956-ffa450edef68
detail:
1. change from ProductCategory and Product entity to Testing and TestingNode entity in testSOAP service
2. insert login.username and login.password attribute document in message part of WSDL
3. change type of eepk- and eeval- element to map-Map and insert its document in WSDL
4. insert document for cus-obj element in WSDL
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893087 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
Following best practice.
Changed location="org/ofbiz/......... to location="component:// in the service location attribute.
using <service name=(.*)engine="simple"(.*)location="org/ofbiz => <service name=$1engine="simple"$2location="component://{componentName}/script/org/ofbiz
with {componentName} done by hand
Also for bsh and groovy (services_test in copmmon). There is no longer any location="org/ofbiz in OFBiz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@755977 13f79535-47bb-0310-9956-ffa450edef68
I put also some svn:ignore for shark build and lib diretories and assetmaint/build
I did some by hand lately, too much to remember. They were files with old header but without copyright. A 1st attempt I suppose, will have to check this after this commit.
I add some problems to commit this patch in one piece because it's so huge (specially with Eclipse I had to turn to Tortoise) !
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@499486 13f79535-47bb-0310-9956-ffa450edef68