Running ZAP from Intellij IDE

460 views
Skip to first unread message

Swapnil Deshpande

unread,
Aug 1, 2015, 2:28:52 PM8/1/15
to zaproxy...@googlegroups.com
Hi all,

I am trying to build and run zap as is after pulling from GItHub in Idea IntelliJ. I followed the instructions at https://github.com/zaproxy/zaproxy/wiki/HowToBuildZapWithIntellij and I am able to build ZAP successfully. However when I try to run it from the run menu I am getting an error. I have set the artifact output to the 'src' directory as follows:


and my 'run configuration' is as follows:


​
​when I build artifacts using the IDE, I get a jar file in the src directory but when I run it I get error as follows:

Defaulting ZAP install dir to /Users/swapnil/IdeaProjects/zaproxy/bin/
Warning: failed to load jar files from /Users/swapnil/IdeaProjects/zaproxy/bin/lib
Unable to initialize home directory! xml/config.xml (No such file or directory)
java.io.FileNotFoundException: xml/config.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.parosproxy.paros.model.FileCopier.copyLegacy(FileCopier.java:50)
at org.parosproxy.paros.model.FileCopier.copy(FileCopier.java:44)
at org.parosproxy.paros.Constant.initializeFilesAndDirectories(Constant.java:378)
at org.parosproxy.paros.Constant.<init>(Constant.java:289)
at org.parosproxy.paros.Constant.createInstance(Constant.java:798)
at org.parosproxy.paros.Constant.getInstance(Constant.java:790)
at org.zaproxy.zap.ZAP.main(ZAP.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

Process finished with exit code 1

I am not sure what's going wrong as the config.xml file is right there in the xml/ directory. Can anyone pplease help me with running it?

Regards,
Swapnil

thc...@gmail.com

unread,
Aug 1, 2015, 7:32:41 PM8/1/15
to zaproxy...@googlegroups.com
Hi.

That is/was caused by a bug in ZAP :/

Please update your local repo and give it another try.

Note that the artifact is not necessary to run ZAP.

Best regards.

On 01/08/15 19:28, Swapnil Deshpande wrote:
> Hi all,
>
> I am trying to build and run zap as is after pulling from GItHub in Idea
> IntelliJ. I followed the instructions at
> https://github.com/zaproxy/zaproxy/wiki/HowToBuildZapWithIntellij and I
> am able to build ZAP successfully. However when I try to run it from the
> run menu I am getting an error. I have set the artifact output to the
> 'src' directory as follows:
>
>
> and my 'run configuration' is as follows:
>
>
> ​
> --
> You received this message because you are subscribed to the Google
> Groups "OWASP ZAP Developer Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to zaproxy-devel...@googlegroups.com
> <mailto:zaproxy-devel...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Swapnil Deshpande

unread,
Aug 2, 2015, 7:48:15 AM8/2/15
to zaproxy...@googlegroups.com
Not sure what the problem is with IntelliJ. I used Eclipse and it ran out of the box with those instruction. Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-devel...@googlegroups.com.

thc...@gmail.com

unread,
Aug 2, 2015, 9:09:27 AM8/2/15
to zaproxy...@googlegroups.com
Hi.

That issue (i.e. missing config.xml) should no longer happen in IntelliJ
IDEA.
Wasn't it working after updating your local repo?

Best regards.
> <mailto:zaproxy-develop%2Bunsu...@googlegroups.com>
> <mailto:zaproxy-devel...@googlegroups.com
> <mailto:zaproxy-develop%2Bunsu...@googlegroups.com>>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "OWASP ZAP Developer Group" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to zaproxy-devel...@googlegroups.com
> <mailto:zaproxy-develop%2Bunsu...@googlegroups.com>.

thc...@gmail.com

unread,
Aug 2, 2015, 6:38:18 PM8/2/15
to zaproxy...@googlegroups.com
An issue has been raised (for the record/release notes). [1]

BTW, thanks for letting us know :)


[1] https://github.com/zaproxy/zaproxy/issues/1760

Best regards.
Reply all
Reply to author
Forward
0 new messages