11 Replies Latest reply on Apr 29, 2008 11:56 AM by yfisk

    I have created a Flex App with out a Server now I need one

    jlopes151 Level 1
      So I'm new to Flex and didn't think the project needed a server at first (poor planning on my part) now I'll need one. I have alot built and would like to just conevert the app if I can. The project has been sourced in to Subversion, I would like not to have to rebuild the repository.

      Thanks for the help
        • 1. Re: I have created a Flex App with out a Server now I need one
          davidmedifit Level 1
          When you say "needed a server", can you explain further? Do you mean to host the Flex app, or for data exchange?

          Cheers,

          David
          • 2. Re: I have created a Flex App with out a Server now I need one
            jlopes151 Level 1
            host the Flex app.

            I'm on a team of developers and before I spread the news I thought I would ask.

            What I have done is create a new Flex project with the J2EE box checked. Moved all the source from the src folder to the flex_src.

            I'm having trouble with my environment were I'm getting a Null Pointer Error when ever I build a web app. I'm running Eclipse 3.3.

            Doesn't matter if its a Dyna Web or Flex web I get the same message when I try to deploy.

            I can't say when this started as the Project was started by another New to Flex debeloper.

            • 3. Re: I have created a Flex App with out a Server now I need one
              davidmedifit Level 1
              OK, so I think what you're saying is that you have developed locally, which is good, and are using java objects as your back end solution - I'll just state that Java is the *only* method of data transfer that I haven't used (I use ColdFusion, XML, WEb Services mostly), so at some stage I may not be able to help you.

              Still, lets see how far we get. So, you can deploy your SWF file to any web server, and browse to it with your browser. The output in the /bin directory will include the SWF (usually the name of the project) and a html wrapper file.

              Is the Flex app actually rendering (i.e., your containers) before you get the error? (I'm trying to determine if the problem is the data transfer or the flex app proper)??

              David
              • 4. Re: I have created a Flex App with out a Server now I need one
                jlopes151 Level 1
                At the moment the project a Flex Web Application with out a J2EE server here is a sample dir structure

                Directory of C:\Development\workspace\FlexWebApplicationNoJ2EE

                .actionScriptProperties
                .flexProperties
                .project
                .settings
                bin-debug
                html-template
                libs
                src

                What I want is the following: Note the classpath, WebContent folders

                Directory of C:\Development\workspace\FlexWebApplicationWithJ2EE

                .actionScriptProperties
                .classpath
                .flexProperties
                .project
                .settings
                bin-debug
                flex_libs
                flex_src
                html-template
                src
                WebContent

                • 5. Re: I have created a Flex App with out a Server now I need one
                  jlopes151 Level 1
                  At the moment the project a Flex Web Application with out a J2EE server here is a sample dir structure

                  Directory of C:\Development\workspace\FlexWebApplicationNoJ2EE

                  .actionScriptProperties
                  .flexProperties
                  .project
                  .settings
                  bin-debug
                  html-template
                  libs
                  src

                  What I want is the following: Note the classpath, WebContent folders

                  Directory of C:\Development\workspace\FlexWebApplicationWithJ2EE

                  .actionScriptProperties
                  .classpath
                  .flexProperties
                  .project
                  .settings
                  bin-debug
                  flex_libs
                  flex_src
                  html-template
                  src
                  WebContent

                  • 6. Re: I have created a Flex App with out a Server now I need one
                    davidmedifit Level 1
                    OK, so I'm not 100% sure I'm going to answer your specific question correctly, so let me ask some more:

                    1) Can you confirm, that you are developing locally, and you can get the application to work locally with no problem?
                    2) Did you create the WebContent folder? Is the app reading data / content from this folder? I guess my question is, are they integral to the function of the app at run time, or just during compilation?

                    Also, we're talking Flex 2 or 3 here? If its the latter, are you compiling ON the server?

                    Cheers,

                    Davo
                    • 7. Re: I have created a Flex App with out a Server now I need one
                      slaingod Level 1
                      You can always just recreate your project as an AIR project without a server most likely :P

                      Otherwise, as far as running on a server, you can pretty much throw the SWF's and any assets anywhere, and they should work. Specifically, if you copy the contents of the bin-release folder or whatever to the root of an apache server domain, everything should work fine. There are things that won't work locally that will work from a web server due to security issues. At most when going from local to server dev, I have had to add trustContent to some loader swf's or add an SecurityDomain.allowDomain for another server.

                      Point is it shouldnt be a huge effort.
                      • 8. I have created a Flex App with out a Server now I need one
                        jlopes151 Level 1
                        I have been building the application localy and reached a point were I need to create PDF files. I must create the PDF files on a server so. Gota switch the Flex web app to one that now has access to a J2EE server so I can in my case run JasperReports or an iText servlet to gen the PDF..

                        In Flex builder I can create a web application with out access to a J2EE server. No Web-Content folder will be created. I have rebuilt the Application under a Flex App Project that now has the Web-Content folder. I now have a problem running on a JBoss server. I get a null pointer error during deployment. I can how ever run on the Preview server until I try another server.
                        • 9. Re: I have created a Flex App with out a Server now I need one
                          riesvantwisk Level 1
                          hey,

                          may be you should post the message. The null pointer exception comes from somewhere, it would help to know where it actually comes from..


                          Ries
                          • 10. Re: I have created a Flex App with out a Server now I need one
                            jlopes151 Level 1
                            I click the run button from the Main Menu, then I see the dialog about the Null Pointer. I don't know if the Flex builder has a log file?
                            • 11. Re: I have created a Flex App with out a Server now I need one
                              yfisk
                              I have the same null pointer exception problem when trying to deploy to JBoss 4.2, with fb3 production release. I had everything working before in the final beta version of flexbuilder3.