3

I have the same problem as in this two questions:

I've detected which line of code causes this issue.

org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui proxyControlGui =
                    new org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui();

This string is used in:

package org.apache.jmeter;

public class JMeter implements JMeterPlugin {

ProxyControlGUI

package org.apache.jmeter.protocol.http.proxy.gui;
public class ProxyControlGui extends LogicControllerGui implements JMeterGUIComponent, ActionListener, ItemListener, KeyListener, UnsharedComponent

If I comment this string - build is successful.
Compiler does not complain during developing in IDE.

I need to know:

  • what's the reason of such behavior?
  • where to see log with details(I'm new with ant)?
  • how rewrite code to avoid javac error?

Log from running ant in CL:

    Buildfile: D:\src\apache-jmeter-custom\build.xml
compile-core:
    [javac] Compiling 1 source file to D:\src\apache-jmeter-custom\build\core
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] D:\src\apache-jmeter-custom\src\core\org\apache\jmeter\JMeter.java:360: error: package org.apache.jmeter.protocol.http.proxy.gui does not exist
    [javac]                 org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui proxyControlGui =
    [javac]                                                          ^
    [javac] D:\src\apache-jmeter-custom\src\core\org\apache\jmeter\JMeter.java:361: error: package org.apache.jmeter.protocol.http.proxy.gui does not exist
    [javac]                         new org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui();
    [javac]                                                                      ^
    [javac] 2 errors
    [javac] 1 warning

Ant log from IDEA:

Compiling 1 source file to D:\src\apache-jmeter-custom\build\core
: [options] bootstrap class path not set in conjunction with -source 1.6
D:\src\apache-jmeter-custom\src\core\org\apache\jmeter\JMeter.java (360:58)error: package org.apache.jmeter.protocol.http.proxy.gui does not exist
D:\src\apache-jmeter-custom\src\core\org\apache\jmeter\JMeter.java (361:70)error: package org.apache.jmeter.protocol.http.proxy.gui does not exist
2 errors
1 warning

Thanks in advance.

Community
  • 1
  • 1
Dzmitry Kashlach
  • 404
  • 1
  • 5
  • 16
  • did you check your ivy.xml of the component to see whether the corresponding jar has been included or not? – aksappy Feb 14 '13 at 11:51
  • just for the record: what ide are you using and are you using ant from command line or directly from within the ide? – acostache Feb 14 '13 at 11:57
  • Intellij IDEA 11.0; separate ant 1.8.4(I've assigned it for using in IDEA). I've tried to run build both from CL and IDEA. Logs are provided in main question. – Dzmitry Kashlach Feb 14 '13 at 12:07

1 Answers1

1

Ant is a build tool which looks up the dependencies which we specify in the ivy.xml and uses a script to compile the sources after loading the dependencies into the classpath. If there is a compiler failure during your ant script and IDE is not showing an error, the probable reason is that the jar required for building the class is available in the IDE build path and not in the Ant IVY.xml.

aksappy
  • 3,400
  • 3
  • 23
  • 49
  • I don't have ivy.xml. How can it be used? I'm customizing JMeter for my needs and using public sources, so, I'm sure that all necessary dependencies are downloaded, because I'm able to build JMeter from original sources. – Dzmitry Kashlach Feb 14 '13 at 12:12
  • oops, i am sorry. I overlooked once i saw Ant – aksappy Feb 14 '13 at 12:22
  • I do not know exactly, this build.xml worked before my changes in code. I suppose, I've broken something, but where should I look for? – Dzmitry Kashlach Feb 14 '13 at 12:36