cannot find symbol

huckleberry

Bekanntes Mitglied
Hi bekomme folgendes..

bin am verzweifeln..


[javac] C:\MyProj\src\my\comm\http\NoAuthHttpClient.java:46: cannot find symbol
[javac] symbol : class GetMethod
[javac] location: class my.comm.http.NoAuthHttpClient
[javac] GetMethod getMethod = new GetMethod("http://www.site.com/www.xml");

Java:
package my.comm.http;

import java.io.IOException;

import org.apache.commons.httpclient.ConnectionPoolTimeoutException;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpConnection;
import org.apache.commons.httpclient.HttpConnectionManager;
import org.apache.commons.httpclient.cookie.CookiePolicy;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.params.HttpClientParams;
import org.apache.commons.httpclient.params.HttpConnectionManagerParams;

class NoAuthHttpClient {

	private final HttpClient _httpClient;

	public NoAuthHttpClient() {
		
		HttpClientParams params = new HttpClientParams();
	    params.setCookiePolicy(CookiePolicy.IGNORE_COOKIES);
		
		_httpClient = new HttpClient(params);			
	}
	
	public void executeRequest() {
		_logger.logDebug("Execute request using NO AUTH");
		GetMethod getMethod = new GetMethod("http://www.site.com/www.xml");
		getMethod.setDoAuthentication(false);
		
		try {
			_httpClient.executeMethod(getMethod);
			System.out.println("Statuscode: {0}", String.valueOf(getMethod.getStatusCode()) );
			System.out.println("Response: {0}", getMethod.getResponseBodyAsString());
		}
		catch (IOException e) {
			System.out.println(e.getMessage(), e);
		} finally {
			getMethod.releaseConnection();
		}
	}
}

Jemadn hinweise?

Thnx huck
 
Zuletzt bearbeitet von einem Moderator:

faetzminator

Gesperrter Benutzer
Welche Version von HTTPClient verwendest du? 3.1?
Wie kompilierst du deine Klasse? Sind die Abhängigkeiten auch sicher im Classpath?
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
W Cannot find Symbol Java Basics - Anfänger-Themen 5
A Cannot find symbol mit Konstruktoren Java Basics - Anfänger-Themen 27
A Cannot find symbol bei exceptions Java Basics - Anfänger-Themen 2
L cannot find symbol variable Kon Java Basics - Anfänger-Themen 8
F Erste Schritte error: cannot find symbol Java Basics - Anfänger-Themen 5
R return: cannot find symbol Java Basics - Anfänger-Themen 2
L Bluej Error: Cannot find Symbol Java Basics - Anfänger-Themen 13
S Cannot find symbol (symbol ist eine Variable) Java Basics - Anfänger-Themen 13
N Cannot find symbol Java Basics - Anfänger-Themen 18
P Cannot find symbol, wieso? Java Basics - Anfänger-Themen 5
M Erste Schritte cannot find symbol - Probleme mit Klassen Java Basics - Anfänger-Themen 6
J Error: cannot find symbol - variable Java Basics - Anfänger-Themen 3
F Erste Schritte parseint: cannot find symbol Java Basics - Anfänger-Themen 6
M Vererbung - Cannot Find Symbol constructor... Java Basics - Anfänger-Themen 11
D error: cannot find symbol Java Basics - Anfänger-Themen 3
B Frage zu Beispielprogramm: "error: cannot find symbol" Java Basics - Anfänger-Themen 2
BlueMountain Erste Schritte error: cannot find symbol Java Basics - Anfänger-Themen 2
L Error: Cannot find symbol Java Basics - Anfänger-Themen 1
P Cannot find Symbol Java Basics - Anfänger-Themen 3
L Cannot Find Symbol - Was soll denn das bedeuten?!? Java Basics - Anfänger-Themen 7
P StdIn.readDouble: cannot find symbol Java Basics - Anfänger-Themen 7
B Fehler "Cannot find symbol - variable number1" Java Basics - Anfänger-Themen 13
B Compiler-Fehler cannot find symbol Java Basics - Anfänger-Themen 6
K Cannot find symbol Java Basics - Anfänger-Themen 3
S cannot find symbol, symbol: constructor Java Basics - Anfänger-Themen 2
3 Compiler-Fehler Fehlerbehebung cannot find Symbol Java Basics - Anfänger-Themen 4
R Compiler-Fehler Cannot find symbol (Method printIn) Java Basics - Anfänger-Themen 3
B Polymorphie A obj = new B; "cannot find symbol app()" Java Basics - Anfänger-Themen 5
S wieso Fehlermeldung cannot find symbol hier Java Basics - Anfänger-Themen 10
T Cannot find Symbol(String) Java Basics - Anfänger-Themen 9
2 Compiler-Fehler cannot find symbol Java Basics - Anfänger-Themen 13
B Erste Schritte cannot find symbol - problem Java Basics - Anfänger-Themen 9
D Cannot find symbol variable Java Basics - Anfänger-Themen 9
A Compiler-Fehler Cannot find Symbol Java Basics - Anfänger-Themen 6
V Packages: Cannot find symbol Java Basics - Anfänger-Themen 12
J Cannot find Symbol Variable mit JPanels Java Basics - Anfänger-Themen 2
L Fehlermeldung: RealMirror.java cannot find symbol Java Basics - Anfänger-Themen 2
D Cannot Find Symbol Java Basics - Anfänger-Themen 6
M Compile Time Error - cannot find symbol (Objekt!) Java Basics - Anfänger-Themen 2
L Problem mit Vererbung (extends) cannot find symbol Java Basics - Anfänger-Themen 3
S Problem beim Kompilieren - cannot find symbol - constructor() Java Basics - Anfänger-Themen 12
N cannot find symbol URL Java Basics - Anfänger-Themen 2
S Problem mit Javaeditor: Cannot find Symbol Java Basics - Anfänger-Themen 13
P cannot find Symbol - WTF? Java Basics - Anfänger-Themen 4
StupidAttack cannot find symbol Java Basics - Anfänger-Themen 16
B Cannot find symbol-Fehler Java Basics - Anfänger-Themen 3
Luk10 Cannot find Symbol Daten Java Basics - Anfänger-Themen 10
E cannot find symbol??? Java Basics - Anfänger-Themen 8
B cannot find symbol Java Basics - Anfänger-Themen 11
N cannot find symbol Java Basics - Anfänger-Themen 11
T OOP cannot find symbol Java Basics - Anfänger-Themen 4
A cannot find symbol - symbol : method Java Basics - Anfänger-Themen 5
T cannot find symbol Java Basics - Anfänger-Themen 5
I Cannot find Symbol & NullPointerException Java Basics - Anfänger-Themen 8
A cannot find symbol. Java Basics - Anfänger-Themen 5
G cannot find symbol! Java Basics - Anfänger-Themen 22
K Ständige Fehlermeldung "Cannot find symbol" Java Basics - Anfänger-Themen 2
L cannot find symbol-method Java Basics - Anfänger-Themen 3
P Error: Cannot find Symbol Java Basics - Anfänger-Themen 4
J JOptionDialog "cannot find symbol" Java Basics - Anfänger-Themen 3
P JLayer 1.0 - cannot find symbol Java Basics - Anfänger-Themen 4
M cannot find symbol. Java Basics - Anfänger-Themen 7
T ChangeListener cannot find Symbol? Java Basics - Anfänger-Themen 2
D "identifier expected" und "cannot find symbol Java Basics - Anfänger-Themen 4
B cannot find symbol method equalsIgnoreCase? Java Basics - Anfänger-Themen 23
S Fehlermeldung cannot find symbol Java Basics - Anfänger-Themen 8
G Cannot find symbol, Suchfunktion benutzt Java Basics - Anfänger-Themen 3
A cannot find symbol :-( Java Basics - Anfänger-Themen 2
D Cannot find JUnit.framework Java Basics - Anfänger-Themen 1
G Collections.binarySearch(LinkedList): cannot find method Java Basics - Anfänger-Themen 6
R Cannot find a free socket for the debugger Java Basics - Anfänger-Themen 6
W Cannot find symbole variable Java Basics - Anfänger-Themen 4
M NullPointerException: Cannot read the array length because "this.Kinder" is null Java Basics - Anfänger-Themen 1
W Cannot resolve symbol 'HttpServlet' Java Basics - Anfänger-Themen 2
I JSON - cannot deserialize from Object value Java Basics - Anfänger-Themen 16
J Scanner cannot be resolved to a type Java Basics - Anfänger-Themen 3
N Fehler "Cannot instantiate the type" Java Basics - Anfänger-Themen 3
jakobfritzz Array- cannot invoke "" because "" is null Java Basics - Anfänger-Themen 4
Flo :3 Variablen Type dismatch: cannot convert from string to int Java Basics - Anfänger-Themen 9
C system cannot be resolved Fehler in Eclipse Java Basics - Anfänger-Themen 18
V ClientProtocolException cannot be resolved Java Basics - Anfänger-Themen 6
J The import org.bukkit cannot be resolved Java Basics - Anfänger-Themen 3
J Fehlermeldung unklar. non-static variable player0 cannot be referenced from a static context Java Basics - Anfänger-Themen 4
P non-static variable cannot be referenced from a static context Java Basics - Anfänger-Themen 6
L constructor cannot be applied... Java Basics - Anfänger-Themen 22
M Cannot make a static reference to the non-static method Java Basics - Anfänger-Themen 10
P a cannot be resolved bei einer do while Schleife Java Basics - Anfänger-Themen 1
Aprendiendo Interpreter-Fehler "non-static variable this cannot be referenced from a static context" Java Basics - Anfänger-Themen 2
M Iterator cannot refer to a non final... Java Basics - Anfänger-Themen 20
T Error: int cannot be dereferenced Java Basics - Anfänger-Themen 10
J JLabel cannot be resolved Java Basics - Anfänger-Themen 8
H Variablen error: non-static variable cannot be referenced from a static context Java Basics - Anfänger-Themen 4
UnityFriday method getPrevious in class List<ContentType> cannot be applied to given types Java Basics - Anfänger-Themen 29
B OOP next cannot be resolved or is not a field Java Basics - Anfänger-Themen 6
B OOP Cannot instantiate the type AuDList<Integer> Java Basics - Anfänger-Themen 18
U Erste Schritte cannot be referenced from a static context Java Basics - Anfänger-Themen 1
D Java Eclipse cannot be cast to java.awt.event.ItemListener Java Basics - Anfänger-Themen 3
J Fehlermeldung : cannot invoke char(at) int on the primitive type int --- Anfänger Java Basics - Anfänger-Themen 5
M Erste Schritte [Variable] cannot be resolved to a variable Java Basics - Anfänger-Themen 4
M The Selection cannot be launched... Java Basics - Anfänger-Themen 4

Ähnliche Java Themen

Neue Themen


Oben