17 Replies Latest reply on Apr 22, 2006 1:17 AM by Silvertype

    Error with deploying flex on JRun

    Silvertype
      Hi guys,
      I tried to deploy an mxml file on JRun but got the following error when I tried to access it:

      500
      There is no web application configured to service your request

      Any idea why is that so?

      Thanks in advance.
        • 1. Error with deploying flex on JRun
          Silvertype Level 1
          Ok, maybe I should illustrate my problems in greater details. I have a mxml file which I want to deploy on JRun. I placed it in the root folder of JRun and when I previewed it in IE, it gives me a file not found error. I tried to run the sample flex apps in the same folder and they work! It didnt take me long enough to realise that the sample apps were in .war format. So my question is, is it a necessity to convert my mxml file into .war format? And if it is, how to come about doing tat?

          I did a search on google and found a few articles on the setup and deployment of flex. However, those articles also mentioned the use of yet another web server such as Apache and Coldfusion server to run in conjunction with JRun for deployment. So my next question is can't flex be deployed on just JRun alone? Is a 2nd web server necessary in this case?

          Thanks in advance.

          (PS: I'm using Flex 1.5 with JRun 4)
          • 2. Re: Error with deploying flex on JRun
            ntsiii Level 3
            The Flex server is a J2EE application itself. When you do the default install, it creates two flex application servers under the "default" JRUN server, "samples" and "flex". In each Flex application server, you need to have the flex server servlet files, which are under the folder "WEB-INF". Each flex application has its own WEB-INF folder structure.

            You can put your mxml files under either "flex" or "samples" and they will run. The "flex" application is empty, the "samples", obviously has samples. You cannot run an mxml file in the "default" folder (the same level as flex and samples) because there is no flex application(WEB-INF) at that level.

            If you want to create a third flex application, create the folder at the same level as flex and samples. Expand the the flex.war file, if you have one, into that folder. If you can't find a flex.war file, just copy the contents of the "flex" folder into your new folder.

            Put your mxml file in there also and yo will be able to run them.

            Tracy
            • 3. Error with deploying flex on JRun
              Silvertype Level 1
              Hi Tracy,
              I did as you said by placing the mxml files in the flex folder. However, I got a JRun Servlet error which states: 404 not Found

              Any idea what went wrong? Thanks again.
              • 4. Re: Error with deploying flex on JRun
                ntsiii Level 3
                Can you run JRUN as an application from the command line so that you can see the startup messages?

                You should see some lines like these:
                04/18 13:38:11 info Deploying web application "Flex Web Application" from: file:/C:/Program Files/Macromedia/Flex/jrun4/
                servers/default/flex/
                04/18 13:38:12 WARNING License Service: The evaluation period for Flex has expired; switching to the Developer Edition
                04/18 13:38:12 INFO License Service: Flex 1.5 Developer Edition enabled
                • 5. Re: Error with deploying flex on JRun
                  Silvertype Level 1
                  Ok, I'll try it out. Anyway, with reference to your previous message:

                  quote:

                  Originally posted by: ntsiii

                  The Flex server is a J2EE application itself. When you do the default install, it creates two flex application servers under the "default" JRUN server, "samples" and "flex". In each Flex application server, you need to have the flex server servlet files, which are under the folder "WEB-INF". Each flex application has its own WEB-INF folder structure.

                  You can put your mxml files under either "flex" or "samples" and they will run. The "flex" application is empty, the "samples", obviously has samples. You cannot run an mxml file in the "default" folder (the same level as flex and samples) because there is no flex application(WEB-INF) at that level.

                  If you want to create a third flex application, create the folder at the same level as flex and samples. Expand the the flex.war file, if you have one, into that folder. If you can't find a flex.war file, just copy the contents of the "flex" folder into your new folder.

                  Put your mxml file in there also and yo will be able to run them.

                  Tracy


                  I would assume that the Flex server that you're referring to is the integrated JRun server. However, when I did the flex installation, I was not given the option to install the integrated JRun server! Instead I had to install JRun separately. Any idea on this issue as well?
                  • 6. Re: Error with deploying flex on JRun
                    ntsiii Level 3
                    It is very strange you did not have the option to install the integrated jrun option.

                    This is version 1.5, right?

                    Full Jrun will not be a problem, just a little more work. You will just need to expand the flex.war file into a JRUNServer. change the .war extension tp .zip and use winzip. The key is the WEB-INF folder.

                    Tracy
                    • 7. Re: Error with deploying flex on JRun
                      Silvertype Level 1
                      quote:

                      Originally posted by: ntsiii
                      Can you run JRUN as an application from the command line so that you can see the startup messages?

                      You should see some lines like these:
                      04/18 13:38:11 info Deploying web application "Flex Web Application" from: file:/C:/Program Files/Macromedia/Flex/jrun4/
                      servers/default/flex/
                      04/18 13:38:12 WARNING License Service: The evaluation period for Flex has expired; switching to the Developer Edition
                      04/18 13:38:12 INFO License Service: Flex 1.5 Developer Edition enabled


                      Hi Tracy,
                      I've run JRun at the console and this is what I get:

                      C:\JRun4\bin\jrun.exe -nohup -start
                      Starting Macromedia JRun 4.0 (Build 106363), flex server
                      04/20 00:52:16 info JRun Naming Service listening on *:2909
                      04/20 00:52:16 info No JDBC data sources have been configured for this server (s
                      ee jrun-resources.xml)
                      04/20 00:52:16 info JRun Web Server listening on *:8101
                      04/20 00:52:17 info Deploying enterprise application "JRun 4.0 Internal J2EE Com
                      ponents" from: file:/C:/JRun4/lib/jrun-comp.ear
                      04/20 00:52:17 info Deploying EJB "JRunSQLInvoker" from: file:/C:/JRun4/lib/jrun
                      -comp.ear
                      04/20 00:52:17 info Deploying enterprise application "default-ear" from: file:/C
                      :/JRun4/servers/Flex/default-ear/
                      04/20 00:52:17 info Deploying web application "JRun Default Web Application" fro
                      m: file:/C:/JRun4/servers/Flex/default-ear/
                      04/20 00:52:18 info Web Services in default-ear#default-war:
                      04/20 00:52:18 info AdminService
                      04/20 00:52:18 warning default-war web application has 'reload' as true in jrun-
                      web.xml. Consider setting it false if the application is running in production e
                      nvironment.
                      04/20 00:52:18 warning default-war web application has 'compile' as true in jrun
                      -web.xml. Consider setting it false if the application is running in production
                      environment.
                      04/20 00:52:18 user JSPServlet: init
                      04/20 00:52:18 info Deploying web application "Flex Web Application" from: file:
                      /C:/JRun4/servers/Flex/flex.war
                      04/20 00:52:19 INFO License Service: Flex 1.5 Full Commercial Edition enabled
                      04/20 00:52:19 user JSPServlet: init
                      04/20 00:52:19 user AMFGatewayServlet: init
                      04/20 00:52:19 user FlexMxmlServlet: init
                      04/20 00:52:19 user FlexMxmlServlet: Macromedia Flex Build: 87315.134646
                      04/20 00:52:19 INFO Macromedia Flex Build: 87315.134646
                      04/20 00:52:20 user FlexProxyServlet: init
                      04/20 00:52:20 user FlexSwfServlet: init
                      04/20 00:52:20 user FlexInternalServlet: init
                      04/20 00:52:20 info Recovering 1 session(s)
                      04/20 00:52:20 info Deploying web application "AS Profiler Web Application" from
                      : file:/C:/JRun4/servers/Flex/profiler.war
                      04/20 00:52:20 user JSPServlet: init
                      04/20 00:52:21 info Deploying web application "Flex Samples Web Application" fro
                      m: file:/C:/JRun4/servers/Flex/samples.war
                      04/20 00:52:22 INFO License Service: Flex 1.5 Full Commercial Edition enabled
                      04/20 00:52:22 info Web Services in samples.war:
                      04/20 00:52:22 info ContactManagerWS
                      04/20 00:52:22 info AdminService
                      04/20 00:52:22 info TentsInventory
                      04/20 00:52:22 info CatalogWS
                      04/20 00:52:22 info SlowServiceSimulatorWS
                      04/20 00:52:22 info EmployeeWS
                      04/20 00:52:22 user JSPServlet: init
                      04/20 00:52:22 user AMFGatewayServlet: init
                      04/20 00:52:22 user FlexMxmlServlet: init
                      04/20 00:52:22 user FlexMxmlServlet: Macromedia Flex Build: 87315.134646
                      04/20 00:52:22 INFO Macromedia Flex Build: 87315.134646
                      04/20 00:52:23 user FlexProxyServlet: init
                      04/20 00:52:23 user FlexSwfServlet: init
                      04/20 00:52:23 user FlexInternalServlet: init
                      04/20 00:52:23 warning Deployer Service failed to deploy file:/C:/JRun4/servers/
                      Flex/WEB-INF/
                      * Unrecognized deployment: file:/C:/JRun4/servers/Flex/WEB-INF/
                      04/20 00:52:23 info Deploying enterprise application "Flash Remoting EAR" from:
                      file:/C:/JRun4/lib/flashgateway.ear
                      04/20 00:52:23 info Deploying web application "Flash Remoting" from: file:/C:/JR
                      un4/lib/flashgateway.ear
                      04/20 00:52:23 user JSPServlet: init
                      04/20 00:52:23 user FlashGatewayServlet: init
                      Server flex ready (startup time: 29 seconds)
                      04/20 00:52:43 user jrun.servlet.RedirectServlet: init
                      04/20 00:52:43 user FileServlet: init
                      04/20 00:52:43 user FlexErrorServlet: init


                      I think this might be the problem: 04/20 00:52:23 warning Deployer Service failed to deploy file:/C:/JRun4/servers/
                      Flex/WEB-INF/

                      Any suggestions?
                      • 8. Re: Error with deploying flex on JRun
                        ntsiii Level 3
                        Ar you manually expanding the flex.war file, or counting on JRUN to automatically deploy it?

                        What is the folder structure UNDER: C:/JRun4/servers/Flex/

                        • 9. Re: Error with deploying flex on JRun
                          ntsiii Level 3
                          And you said that the "samples" work ok?
                          • 10. Error with deploying flex on JRun
                            Silvertype Level 1
                            quote:

                            Originally posted by: ntsiii
                            Ar you manually expanding the flex.war file, or counting on JRUN to automatically deploy it?

                            What is the folder structure UNDER: C:/JRun4/servers/Flex/



                            I did manually expand the flex.war file. As for the folder structure, I've got SERVER-INF, default-ear and WEB-INF. The other files were profiles.war, samples.war, profiler.web.jrun.xml-backup, profiler.web.xml, samples.web.xml and samples.web.jrun.xml . Under the SERVER-INF, there are jms and temp folders and under default ear folder, I've got default-ejb, default-war and META-INF folders. Finally under WEB-INF, I've got an empty folder called ProfilerData.


                            quote:

                            Originally posted by: ntsiii
                            And you said that the "samples" work ok?


                            It did run it's sample applications successfully. But somehow, it didn't manage to deploy the .mxml file that I placed.
                            • 11. Re: Error with deploying flex on JRun
                              ntsiii Level 3
                              "under WEB-INF, I've got an empty folder called ProfilerData" THIS IS THE PROBLEM. you are missing all the Flex server code.

                              Under WEB-INF you should have:
                              WEB-INF
                              ...classes
                              ...flex
                              ...jsp
                              ...lib
                              ...sessions
                              ...web.xml

                              Re-expand the flex.war file, make sure it creates these folders.

                              Tracy
                              • 12. Re: Error with deploying flex on JRun
                                ntsiii Level 3
                                Also, did you create a new JRUN server in the Admin app named Flex? So your folder structure is:

                                jrun4\servers
                                ...default
                                ...Flex
                                ......flex
                                ......myMxml.mxml
                                .........WEB-INF
                                ............classes
                                ............flex
                                etc
                                • 13. Error with deploying flex on JRun
                                  Silvertype Level 1
                                  No, it still didn't work for me. Ok, to avoid confusion, I've created a new JRUN server called FlexTest. Under FlexTest, there are 2 default folders called default-ear and server-inf, plus another "flex" folder that I expanded from the flex.war file. The flex folder contains 2 more folders, namely: meta-inf and web-inf. This is also the location where I placed my mxml file. In the web-inf folder, there is a lib folder, a jsp folder, a sessions folder and a 2nd 'flex' folder. There is also a web.xml file. The 2nd flex folder contains all the classes and framework folders like you described earlier.

                                  I then run the server and tried to access the mxml file with the following url:
                                  http://localhost:8101/FlexTest/Flex/firstapp.mxml (given that 8101 is my http port and firstapp.mxml is my mxml file) but was greeted with this error instead:


                                  Oops! We couldn't find your document.

                                  The file that you requested could not be found on this server.


                                  So, did I miss out something?
                                  • 14. Re: Error with deploying flex on JRun
                                    ntsiii Level 3
                                    The "Flex" in the url is the wrong case, it should be "flex."

                                    Tracy
                                    • 15. Re: Error with deploying flex on JRun
                                      Silvertype Level 1
                                      quote:

                                      Originally posted by: ntsiii
                                      The "Flex" in the url is the wrong case, it should be "flex."

                                      Tracy


                                      Well, I've changed the "Flex" to the lowercase but it still makes no difference. The file is still not found. Any more suggestions?
                                      • 16. Re: Error with deploying flex on JRun
                                        ntsiii Level 3
                                        If you have set up the JRUN server correctly, then the 8101 already puts you at the FlexTest level.

                                        So the url should be: http://localhost:8101/flex/firstapp.mxml
                                        • 17. Re: Error with deploying flex on JRun
                                          Silvertype Level 1
                                          Ok, it finally works. Thanks a lot.