12 Replies Latest reply on Feb 16, 2010 12:53 PM by jermon

    Flash Builder 4, Data Services, PHP issue

    IanMan Level 1

      I have installed a fresh Galileo + Fb4 plugin + WST for eclipse on my dev server/workstation.

      I have installed a standalone Fb4 on my laptop.


      When I use the shwanky new Data services feature and create a PHP service... I can create the service fine... but there are no methods showing up for the data service/class. The class shows up in the Data/Services list -- and when I right-click -> Refresh (other options are greyed out) I get the following alert Error message:


      java.lang.IllegalArgumentException: protocol = http host = null


      I click OK and procede in my ignorance to scour the internet for a solution...


      I feel like a teenager who was given a brand new Corvette (Fb4)... only.... the key doesn't seem to fit the ignition.  I CANT WAIT to drive it!



      On a side note.... my laptop works fine? Go figure. I can right click and get all the goodies (Configure Return Type, etc.) that I'm suppose to get on that installation...


      I would like to get this working on my dev workstation. Is it something to do with Fb4 as a plugin on top of Zend PDT?


      Does anyone know where to look (maybe a config file or setting) that sets the value for this:


      java.lang.IllegalArgumentException: protocol = http host = null


      I know that I had to edit my shortcut and add:  -vm "C:\Program Files\Java\jre6\bin\javaw" to get the java vm to work correctly and launch Gallileo

        • 1. Re: Flash Builder 4, Data Services, PHP issue
          Shikha Kaushik Level 1



          Could you please share the server settings?


          From the error it appears that the Root URL entered is incorrect.


          Example: incase you are using MAMP the flex server setting should look like:

          Web Root: c:\wamp\www

          Root URL: http://localhost


          Please go to project -> properties -> Flex Server and update the setting with the correct Root URL.

          Click Apply

          Then again try to refresh the Service in Data/serivces Panel.


          Please let me know if this worked.




          • 2. Re: Flash Builder 4, Data Services, PHP issue
            IanMan Level 1

            I install Apache, MySql, PostgreSql, and PHP -- all seperately (No WAMP) on mydev server/workstation.


            I run Apache with Vhosts enabled.


            I use website.dvlp (".dvlp") for all my sites locally...


            I have my Hosts file set up with all the sites im working on .. eg:

      SandBox.dvlp     www.SandBox.dvlp


            I have a V-hosts file that includes all the proper settings to get things to work eg:

            # SandBox
            <VirtualHost *:80>
                ServerName www.SandBox.dvlp
                DocumentRoot "S:/www/DevSites/SandBox.dvlp/"
                ServerAlias SandBox.dvlp www.SandBox.dvlp


            So that all works.... been doing it for years.... I can run debug mode etc from Flex/etc., Zend Debug.. etc. etc.


            BUT, whenever I setup a Flex project -- it NEVER is able to deal with my website.dvlp idealogy..


            Server location


            Web root: S:\www\DevSites\SandBox.dvlp

            Root URL: http://www.SandBox.dvlp


            Output folder: bin-debug


            PRES Validate Configuration and you get:

            "Cannot access the web server. The server may not be running, or the web root folder or root URL may be invalid."


            Web root is totally valid... server is running.... web root is valid.... root URL is valid.... etc...


            Go over to FireFox.... type in http://www.SandBox.dvlp/bin-debug/main.htm and it servers up the file.. no problem...


            It has been this way since Flex 2 -- i have just ignored it -- everything alway s seemed to work - till now... =) with the data/services feature.

            • 3. Re: Flash Builder 4, Data Services, PHP issue
              SunilAdobe Adobe Employee

              Can you check whether FlashBuilder has write access to the folder, S:\www\DevSites\SandBox.dvlp?

              If it is unable to write a file there, it gives that warning.




              • 4. Re: Flash Builder 4, Data Services, PHP issue
                IanMan Level 1

                Im on winXp - I checked to see what the attributes are for  my entire web root and readonly was partially checked -- I un-checked this and applied the change to folder+ subfolders... but this had no effect.


                I Have it working on my laptop (standalone Gumbo) - I think I will try reinstalling? I honestly think it has somethingt to do with Gallileo + plugin vs standalone. I use eclipse for XHTML, CSS, and PHP as well as Flex/FB.... I may have to resort ot 2 installs of Eclipse running...

                • 5. Re: Flash Builder 4, Data Services, PHP issue
                  jermon Level 1

                  Did you ever figure this out? Having the same issue

                  • 6. Re: Flash Builder 4, Data Services, PHP issue
                    SunilAdobe Adobe Employee

                    I guess you were trying to re-install most of it. After that what is the error that you are getting?

                    Also, can you send the error log which is there in your FB workspace in the following path






                    • 7. Re: Flash Builder 4, Data Services, PHP issue
                      jermon Level 1



                      I've been working night and day on this app..I lost two days when I found the Interactive Design Environment (IDE) Flash Builder 4 could not work with live production servers so that set me back because there was no specific documentation detailing that just had to infer that from video tutorials and a few dozen forums on the IDE...which sucked I mean they could have just stated it somewhere sheesh...


                      Unless someone else knows something i don't on connecting Flash Builder to a remote hosted Mysql database and remote hosted server shared, virtual, dedicated, grid or otherwise non-localhost?

                      • 8. Re: Flash Builder 4, Data Services, PHP issue
                        SunilAdobe Adobe Employee



                        You can with remote PHP servers. If it is hosted, and if you do not have write access to the folders where the compiled swfs will be copied, then its better to work on localhost and then deploy it later.


                        Flash Builder stores the gateway i.e. the endpoint URL as relative to the swf, so even if you deploy your swf on the remote server, everything should work seamlessly if you followed the steps to install zend. on your hosted server.


                        We can be more helpful if you can respond with the errors that you are getting.




                        • 9. Re: Flash Builder 4, Data Services, PHP issue
                          jermon Level 1

                          Ok not showing an error just couldn't connect to a shared hosting server plan i have with godaddy.com

                          . I'm reasoning this shared plan I have for the facebook application i am creating may be the culprit. I am

                          building a facebook app, something like a custom mafia wars using flash builder 4 and PHP

                          I was told that i shouldn't use the php server to connect to the remote php classes i have created rather use

                          HTTP services? Is that your thought too?

                          • 10. Re: Flash Builder 4, Data Services, PHP issue
                            SunilAdobe Adobe Employee

                            You can use php classes in that case you will be using a efficient data exchange protocol which is AMF, implemented as part of Zend framework.

                            You can use HTTPService on the other hand, in which case the data exchange would be through something like XML or JSON


                            In either case Flash Builder has good amount of support.


                            So, if you are using a hosted service, I recommend you using a local php server and develop your files.

                            You can find more details here on how to finally put it on to your remote server http://forums.adobe.com/message/2494843#2494843


                            If you are using a HTTPService, it should work just fine.




                            • 11. Re: Flash Builder 4, Data Services, PHP issue
                              jermon Level 1

                              Thanks that is very helpful!

                              • 12. Re: Flash Builder 4, Data Services, PHP issue
                                jermon Level 1

                                I don't know where else to post  this question ...so apologies if this is not the proper spot


                                I have created several classes in Flash 4 Professional and would like to know how do I create custom classes in Flash Builder 4


                                this is one such class that i have created and wnat to use in FB 4..below


                                package classes.choppingblock.video{

                                     import flash.events.*;
                                     import flash.display.*;
                                     import classes.*;

                                     public class YouTubeLoaderPlus extends YouTubeLoader {
                                          public static var PLAYER_READY:String = "playerReady";
                                          public static var VIDEO_READY:String = "videoReady";
                                          protected var _count:Number = 0;
                                          function YouTubeLoaderPlus() {
                                               this.addEventListener(Event.ENTER_FRAME, checkPlayerReady);
                                               this.addEventListener(YouTubeLoaderPlus.PLAYER_READY, ytPlayerReady);
                                               this.addEventListener(YouTubeLoaderPlus.VIDEO_READY, ytVideoReady);
                                          private function ytPlayerReady(e:Event) {
                                               this.setSize(450, 370);
                                          private function ytVideoReady(e:Event) {
                                          private function checkPlayerReady(e:Event) {
                                               if(_count >= 50){
                                                    this.removeEventListener(Event.ENTER_FRAME, checkPlayerReady);
                                                    dispatchEvent(new Event(YouTubeLoaderPlus.PLAYER_READY));
                                          private function checkVideoReady(e:Event) {
                                                    this.removeEventListener(Event.ENTER_FRAME, checkVideoReady);
                                                    dispatchEvent(new Event(YouTubeLoaderPlus.VIDEO_READY));
                                          override public function loadVideoById (id:String, startSeconds:Number = 0):void{
                                               super.loadVideoById(id, startSeconds);
                                               this.addEventListener(Event.ENTER_FRAME, checkVideoReady);



                                Where would i develop an analogy of this code in Flash Builder 4 for custom classes?