Solved

Flex Error 1085 deploying BlazeDS app to Windows 7

Posted on 2011-03-01
10
968 Views
Last Modified: 2012-06-21
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
Comment
Question by:jpeeples
  • 6
  • 4
10 Comments
 
LVL 20

Assisted Solution

by:ChristoferDutz
ChristoferDutz earned 125 total points
Comment Utility
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
 

Author Comment

by:jpeeples
Comment Utility
@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
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 125 total points
Comment Utility
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
 
LVL 20

Expert Comment

by:ChristoferDutz
Comment Utility
By the way ... you're not using a Proxy or something like that, are you?
0
 

Author Comment

by:jpeeples
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:jpeeples
Comment Utility
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
 

Author Comment

by:jpeeples
Comment Utility
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
 

Author Comment

by:jpeeples
Comment Utility
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
 

Author Closing Comment

by:jpeeples
Comment Utility
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
 
LVL 20

Expert Comment

by:ChristoferDutz
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now