• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 988
  • Last Modified:

Flex Error 1085 deploying BlazeDS app to Windows 7

I've developed a Flex application that uses URLLoader to load a URL that points to a Java servlet.  I couldn't get it to work with both the Java WAR (servlet) and my Flex BlazeDS app running on the same Tomcat installation, so I currently run 2 installations, a BlazeDS turnkey tomcat 6 instance on port 8400, and a standard tomcat 5.5 instance on 8080 that runs my servlet WAR.

The setup works perfectly on my computer (XP), outside of the IDE.  But once I deploy to the server which runs Windows 7, all of the pieces work individually, but when I pull up the login screen at http://localhost:8400/fis_smreports/fis_smreports.html and click the submit button (which calls http://localhost:8080/fis_benchmark/BenchLogin?username=123&password=XYZ )  I get the error #1058, saying my XML is mal-formed.

I know the XML is well-formed.  The problem is that it's not finding the fis_benchmark servlet on port 8080.  I'm wondering are there additional WIndows 7 security steps I have to take?  I've already opened ports 8080 and 8400 (inbound and outbound) in the firewall.  What else do I need to do?
0
jpeeples
Asked:
jpeeples
  • 6
  • 4
2 Solutions
 
ChristoferDutzCommented:
Just a question.
You say "your computer" is a XP machine and everything works great here. When you deploy on Windows 7 (not your machine) and you try to access the machine (assumably from your xp machine) then how can you use "localhost" for this? Or did you deploy it on Windows 7 and then Access the application from that machine? I could immagine that you have hard-coded the url the URLLoader accesses. If for example you hard-coded it to access "localhost:8080" and access it from another machine, then you will propably get nothing at all or an error page (which is propably not valid XML).

Make sure you have configured the host-name of your server in the URLLoader correctly.
0
 
jpeeplesAuthor Commented:
@ChristoferDutz: Thank you for responding.  I'm sorry, I wasn't clear.  When I say I'm accessing localhost on the Windows 7 machine, I am RDP'd into it, so (as far as I know) it's just like I'm sitting at the server itself.  I'm pulling up a browser window from within RDP and navigating to the localhost:8400 address.  It comes up great, but when I click the submit button it's supposed to call the servlet at localhost:8080/fis_benchmark/BenchLogin, but that's when I get Error 1085.
0
 
ChristoferDutzCommented:
Well I would suggest you Use a tool like Firebug (for Firefox) or the Developer Tools (for Chrome) to actually have a look at the HTTP Requests being sent. By this you will deffinitely see what's going wrong.
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
ChristoferDutzCommented:
By the way ... you're not using a Proxy or something like that, are you?
0
 
jpeeplesAuthor Commented:
Firebug.  Thanks, I will look into it.  No proxy is being used.  It stands to reason that I should be able to invoke a java servlet on the same tomcat installation (8400) as my BlazeDS app, rather than having to do this dual installation 8400 / 8080 shuffle I'm having to do, correct?
0
 
jpeeplesAuthor Commented:
Here is the response from the Net tab of Firebug, from both boxes:
/*WINDOWS 7 Server Machine */
TAB - HEADER:
Response Headerspretty print

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 45
Date: Wed, 02 Mar 2011 17:55:13 GMT


Request Headerspretty print

POST /fis_benchmark/BenchLogin HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive


TAB - POST:
Source
Referer: http://localhost:8400/fis_smreports/fis_smreports.swf Content-type: application/x-www-form-urlencoded Content-length: 67 password=9220b069ef43d6ef0d75e62c82ed158ed96c0e17&username=jpeeples

TAB - RESPONSE (result if xUser = getUserXmlNode(strUsername, strPassword) returns null):
<user><authorized>false</authorized></user>

*************************************************************************************************************************************
/* XP DEVELOPMENT MACHINE */
TAB - HEADER:
Response Headerspretty print

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 1903
Date: Wed, 02 Mar 2011 16:36:54 GMT


Request Headerspretty print

POST /fis_benchmark/BenchLogin HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 ( .NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive


TAB - POST:
Source
Referer: http://localhost:8400/fis_smreports//fis_smreports.swf Content-type: application/x-www-form-urlencoded Content-length: 67 username=jpeeples&password=9220b069ef43d6ef0d75e62c82ed158ed96c0e17


TAB - RESPONSE (the desired result):
<user><first_name>Jeff</first_name><last_name>Peeples</last_name><authorized>true</authorized><authority>99</authority><email>jpeeples@fedfis.com</email>
<reports>
	<report name="SOURCE MEDIA PRODUCT MANAGEMENT">
		<benchmark>true</benchmark>
			<settings>null</settings>
			<col_widths>210,50,60,60,60,60,100,150;;;300,60,60,60,60,0,60,60</col_widths>
			<col_headings>,Result,Median,Variance,Rank,Percent,Trend,Benchmark;;;,@shortdesc,@shortdesc,@shortdesc,@shortdesc,MRQ vs Prv Qtr, ,MRQ vs Prv Yr</col_headings>
		</report>
		<report name="SOURCE MEDIA PROFITABILITY MANAGEMENT">
			<benchmark>true</benchmark>
			<settings>null</settings>
			<col_widths>210,50,60,60,60,60,100,150;;;300,60,60,60,60,0,60,60</col_widths>
			<col_headings>,Result,Median,Variance,Rank,Percent,Trend,Benchmark;;;,@shortdesc,@shortdesc,@shortdesc,@shortdesc,MRQ vs Prv Qtr, ,MRQ vs Prv Yr</col_headings>
		</report>
	</reports>
</user>

Open in new window

0
 
jpeeplesAuthor Commented:
New development:  I just installed the same setup on a 64-bit XP machine, and get the same results as the Windows7 machine.  For all intensive purposes, the 32-bit XP machine setup, although it is the development machine, is identical to the 64-bit XP machine.  What am I missing?
0
 
jpeeplesAuthor Commented:
I now think that it could be related to my Java servlet not being able to communicate with MySQL on whatever box I'm on, except my development machine.  I never specified a J / MySQL connector on my machine.  Is this something I need to do on the W7 machine?  Where would I put the connector .jar?
0
 
jpeeplesAuthor Commented:
The solution was a combination of ChristoferDutz's points.  My incorrect thinking was that an application calling a servlet on the same box as itself, could use localhost to make that call.  This is true only as long as the application is accessed from the box on which it resides.  Accessing it remotely, even though the page you are accessing resides on the remote box, the servlet call must specify the remote domain being accessed.  I was able to discover this by tracing the network servlet calls until, after much trial and error, I got it to work.  It was Christofer's recommendation that I use FireBug, which I hadn't known about prior to his recommendation.  Thank you Christofer.
0
 
ChristoferDutzCommented:
Well then it seems my assumption from posting #35015845 was correct
If for example you hard-coded it to access "localhost:8080" and access it from another machine, then you will propably get nothing at all or an error page (which is propably not valid XML).
Glad you were able to figgure it out.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now