Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various build.xml bugs #10

Open
peteroruba opened this issue Sep 4, 2015 · 2 comments
Open

Various build.xml bugs #10

peteroruba opened this issue Sep 4, 2015 · 2 comments

Comments

@peteroruba
Copy link

Hello,

I am using Ubuntu 14.04 LTS and trying to make the build targets from build.xml work.
"ant compile" and "ant deploy" worked fine, but before being able to proceed with the subsequent targets I had to manually create two directories:

build/tests
build /WEB-INF/classes

ZAP is configured to port 8090, running in daemon mode. Bodgeit Store is deployed to Tomcat7's webapps directory and verified to work.

peter@xubuntuvm:~/git/bodgeit$ ant test
Buildfile: /home/peter/git/bodgeit/build.xml

test:
[junit] WARNING: multiple versions of ant detected in path for junit
[junit] jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] and jar:file:/home/peter/git/bodgeit/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] Running com.thebodgeitstore.selenium.tests.FunctionalTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit] Test com.thebodgeitstore.selenium.tests.FunctionalTest FAILED

BUILD SUCCESSFUL
Total time: 0 seconds

peter@xubuntuvm:~/git/bodgeit$ ant zap-proxy-tests
Buildfile: /home/peter/git/bodgeit/build.xml

zap-proxy-tests:
[junit] WARNING: multiple versions of ant detected in path for junit
[junit] jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] and jar:file:/home/peter/git/bodgeit/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] Running com.thebodgeitstore.selenium.tests.FunctionalZAP
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit] Test com.thebodgeitstore.selenium.tests.FunctionalZAP FAILED

BUILD SUCCESSFUL
Total time: 0 seconds

peter@xubuntuvm:~/git/bodgeit$ ant zap-test
Buildfile: /home/peter/git/bodgeit/build.xml

zap-test:

zap-proxy-tests:
[junit] WARNING: multiple versions of ant detected in path for junit
[junit] jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] and jar:file:/home/peter/git/bodgeit/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] Running com.thebodgeitstore.selenium.tests.FunctionalZAP
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit] Test com.thebodgeitstore.selenium.tests.FunctionalZAP FAILED

zap-spider:
[java] Open URL: http://zap/xml/spider/action/scan/?url=http%3A%2F%2Flocalhost%3A8080%2Fbodgeit%2F&
[java] [Fatal Error] :1:1: Content ist nicht zulässig in Prolog.
[java] org.zaproxy.clientapi.core.ClientApiException: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApi(Unknown Source)
[java] at org.zaproxy.clientapi.gen.Spider.scan(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApi.spiderAndPoll(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.executeTask(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.main(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:851)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:235)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[java] Caused by: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApiDom(Unknown Source)
[java] ... 47 more
[java] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
[java] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
[java] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
[java] ... 48 more
[java] usage: spider url={url} [zapaddr={ip}] [zapport={port}]
[java]
[java] Examples:
[java] 1. Type 'java -jar zap-api.jar activeScanUrl url=http://myurl.com/'
[java] Execute and active scan on http://myurl.com/ using zap listening on localhost:8090
[java] 2. Type 'java -jar zap-api.jar activeScanUrl url=http://myurl.com/' zapaddr=192.168.1.1 zapport=7080'
[java] Execute and active scan on http://myurl.com/ using zap listening on 192.168.1.1:7080
[java]
[java] Java Result: 1

zap-ascan:
[java] Open URL: http://zap/xml/ascan/action/scan/?inScopeOnly=false&recurse=true&url=http%3A%2F%2Flocalhost%3A8080%2Fbodgeit%2F&
[java] [Fatal Error] :1:1: Content ist nicht zulässig in Prolog.
[java] org.zaproxy.clientapi.core.ClientApiException: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApi(Unknown Source)
[java] at org.zaproxy.clientapi.gen.Ascan.scan(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApi.activeScanAndPoll(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.executeTask(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.main(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:851)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:235)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[java] Caused by: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApiDom(Unknown Source)
[java] ... 46 more
[java] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
[java] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
[java] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
[java] ... 47 more
[java] usage: activeScanSubtree url={url} [zapaddr={ip}] [zapport={port}]
[java]
[java] Examples:
[java] 1. Type 'java -jar zap-api.jar activeScanUrl url=http://myurl.com/'
[java] Execute and active scan on http://myurl.com/ using zap listening on localhost:8090
[java] 2. Type 'java -jar zap-api.jar activeScanUrl url=http://myurl.com/' zapaddr=192.168.1.1 zapport=7080'
[java] Execute and active scan on http://myurl.com/ using zap listening on 192.168.1.1:7080
[java]
[java] Java Result: 1

zap-saveSession:
[java] Open URL: http://zap/xml/core/action/saveSession/?overwrite=true&name=%2Fhome%2Fpeter%2Fgit%2Fbodgeit%2Fbodgeit-2015-09-04-10-07-24&
[java] [Fatal Error] :1:1: Content ist nicht zulässig in Prolog.
[java] org.zaproxy.clientapi.core.ClientApiException: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApi(Unknown Source)
[java] at org.zaproxy.clientapi.gen.Core.saveSession(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.executeTask(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.main(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:851)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:235)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[java] Caused by: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApiDom(Unknown Source)
[java] ... 44 more
[java] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
[java] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
[java] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
[java] ... 45 more
[java] usage: saveSession sessionName={PATH} [zapaddr={ip}] [zapport={port}]
[java]
[java] Examples:
[java] 1. Type 'java -jar zap-api.jar saveSession sessionName="Users/me/My Documents/mysession/mysessionfile"'
[java] Save zap session using zap listening on localhost:8090
[java] 2. Type 'java -jar zap-api.jar saveSession sessionName="Users/me/My Documents/mysession/mysessionfile" zapaddr=192.168.1.1 zapport=7080'
[java] Save zap session using zap listening on 192.168.1.1:7080
[java] Note: for paths containing spaces ensure path is enclosed in quotes
[java]
[java]
[java] Java Result: 1

zap-checkAlerts:
[java] Open URL: http://zap/xml/core/view/alerts/?count=-1&start=-1&baseurl=&

zap-stop:
[java] Open URL: http://zap/xml/core/action/shutdown/?
[java] [Fatal Error] :1:1: Content ist nicht zulässig in Prolog.
[java] org.zaproxy.clientapi.core.ClientApiException: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApi(Unknown Source)
[java] at org.zaproxy.clientapi.gen.Core.shutdown(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.executeTask(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.(Unknown Source)
[java] at org.zaproxy.clientapi.core.ClientApiMain.main(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:606)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:851)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:235)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[java] Caused by: org.zaproxy.clientapi.core.ClientApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at org.zaproxy.clientapi.core.ClientApi.callApiDom(Unknown Source)
[java] ... 44 more
[java] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
[java] at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
[java] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
[java] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
[java] ... 45 more
[java] usage: stop [zapaddr={ip}] [zapport={port}]
[java]
[java] Examples:
[java] 1. Type 'java -jar zap-api.jar stop'
[java] Stop zap listening on default settings (localhost:8090)
[java] 2. Type 'java -jar zap-api.jar stop zapaddr=192.168.1.1 apikey=1234'
[java] Stop zap listening on 192.168.1.1:8090
[java] 3. Type 'java -jar zap-api.jar stop zapport=7080 apikey=1234'
[java] Stop zap listening on localhost:7080
[java] 4. Type 'java -jar zap-api.jar stop zapaddr=192.168.1.1 zapport=7080 apikey=1234'
[java] Stop zap listening on 192.168.1.1:7080
[java]
[java]
[java] Java Result: 1

BUILD SUCCESSFUL
Total time: 27 seconds

Please excuse the German error messages, they should be straight forward though.

I am submitting this issue with the intention to streamline build.xml to work as much out of the box as possible, especially for people who are new to ZAP (like me) making their first steps with it.

Thanks,
Peter

@mcheetham
Copy link

Hi Peter
Did you figure out how to fix these issues? I am having the exact same problems.
Thanks
Mark

@peteroruba
Copy link
Author

Hi Mark,
I'm sorry, I haven't looked into it since then.
Cheers,
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants