Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Flex Error 1085 deploying BlazeDS app to Windows 7

Posted on 2011-03-01
10
Medium Priority
?
985 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 20

Assisted Solution

by:ChristoferDutz
ChristoferDutz earned 375 total points
ID: 35015845
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
ID: 35018097
@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 375 total points
ID: 35018168
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 20

Expert Comment

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

Author Comment

by:jpeeples
ID: 35018386
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
 

Author Comment

by:jpeeples
ID: 35020057
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
ID: 35021412
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
ID: 35023104
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
ID: 35024890
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
ID: 35024903
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Suggested Courses

618 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