• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
InvocationTargetException on new WORequest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InvocationTargetException on new WORequest


  • Subject: InvocationTargetException on new WORequest
  • From: "Eric E. van Leeuwen" <email@hidden>
  • Date: Mon, 2 Jun 2008 11:01:00 -0700

All,

I've been searching the archives (as well as the web in general) for a while now and can't find exactly what I'm looking for. I have a DirectAction defaultAction() that check's to see if a specific cookie is present and depending either performs the login() or validate() method. The login() method works without a problem. The validate() not so much. What seems to be happening is, I'm getting a InvocationTargetException on creation of a new WORequest object. The following is a code snippet:

protected WOActionResults validate(String cookie) {
String protocol;
String host;
String port;
String appId;
String appAdminPassword;
String func;
String ip;
String path_v;

boolean successfulLogin = false;
String responseString = null;
Integer loggedInPersonID = null;

if (((Application )WOApplication.application()).audioProjectDBServerType().equals("DEV")){
...
}else if (((Application )WOApplication .application()).audioProjectDBServerType().equals("LIVE")){
...
}else{
...
}

if (ip == null)
ip = "";

String URL= protocol + host + path_v + cookie
+ "&appId=" + appId + "&appAdminPassword=" + appAdminPassword + "&ip=" + ip
+ func;
NSLog.out.appendln("URL: " + URL);

NSLog.out.appendln("Creating WOHTTPConnection Object:\nnew WOHTTPConnection(" + host + ", " + new Integer(port).intValue() + ")");
WOHTTPConnection connection = new WOHTTPConnection(host, new Integer(port).intValue());
WORequest outgoingRequest;
try {
outgoingRequest = new WORequest("GET", URL, "HTTP/1.1", null, null, null);
} catch (Exception e) {
NSLog.out.appendln(e.getMessage());
NSLog.out.appendln(e.getCause());
NSLog.out.appendln(e.getStackTrace().toString());
return null;
}

connection.setReceiveTimeout(5000);

NSLog.out.appendln("sending request to connection object: \nsendRequest(" + outgoingRequest.toString() + ")");
boolean connectionSucceeded = connection.sendRequest(outgoingRequest);
NSLog.out.appendln("Reading response for previous request sent\n");
WOResponse response = connection.readResponse();

if (response != null) {
...
}
else
System.out.println ("Can not access site");

if (successfulLogin) {
if (((Session)session()).setCurrentEmployee(loggedInPersonID)){
...
} else {
NSLog.out.appendln("Reason: " + responseString);
return login();
}
} else {
NSLog.out.appendln("Reason:\n" + responseString);
return login();
}
}


Notice in the try statement is the new WORequest() method. This is where my InvocationTargetException is being generated. I know this because I get a Log message of "Creating WOHTTPConnection Object:\nnew WOHTTPConnection(" + host + ", " + new Integer(port).intValue() + ")", which is the last message out to the Log before the creation of the new WORequest, but nothing else. I also know the WOHTTPConnection generation is working because I've tried the log message before and after the new WOHTTPConnection statement. My biggest problem is, it works fine on my development machine. It's when I try and deploy on a development server that things go wrong. Anyone have any insight they can shed on this?

Environment Specs:
	Development machine:
		MacPro booted via firewire to a MacBookPro
		OS X 10.5.3 (9D34)
		Eclipse SDK (3.3.2 build id: M20080221-1800)
		WOLips plugin (3.3.5047)
		Java (1.5.0_13 build 1.5.0_13-119)
		WebObjects (5.4)

	Development Deployment Server:
		1.8Ghz PowerPC G5
		OS X 10.4.11 (8S169)
		Java (1.5.0_13 build 1.5.0_13-121)
		WebObjects (5.3.3)

Thanks in advance,

Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: InvocationTargetException on new WORequest
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Relationship across model boundaries failing
  • Next by Date: Re: InvocationTargetException on new WORequest
  • Previous by thread: model.validateKey intercepted on null?
  • Next by thread: Re: InvocationTargetException on new WORequest
  • Index(es):
    • Date
    • Thread