7 Replies Latest reply on Jun 16, 2012 3:40 AM by Sameer.Darbha

    Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS

    Sameer.Darbha
      Hi

      JDeveloper 11.1.1.6, BPM 11.1.1.6, WLS 10.3.6, Model : BC4J

      I have created a BPM Application in JDeveloper, with a process and an ADF ViewController Project for the UI, and a Model project
      The application is deployed to the WLS and is working when I test in the BPM Workspace.

      But the ADF UI is based on custom data from the database and is a bit heavy UI with a lot of data and functionality.
      I am trying to create the whole UI in seperate taskflows and use them as regions in the auto generated pages created by the BPM plugin in JDev.

      I can deploy the whole application and test it in BPM Workspace, but it is taking a lot of time for the build and deployment process.

      So I tried to create a standalone page in the ADF ViewController project and use the ADF taskflows in the page to test it in JDev Integrated WLS.
      So in this way I can concentrate on testing only the ADF UI related code and not worry about the BPM Process for testing the UI. (Assuming the process is working fine).

      Please note that I do not want to test the BPM Process (at this stage), but I want to test only the ADF UI from Integrated WLS.

      When I try to run the standalone page in WLS, it is giving me the error below.

      Has anyone tried to run the ADF UI pages in a BPM Application using JDeveloper ?
      Is there any other way to test only the UI pages instead of deploying whole BPM project to WLS ?
      Is there any setting etc, we can change and make it run the page in JDeveloper ?

      Thanks for any help
      Regards
      Sameer

      Error in JDeveloper IWLS
      -----------------------------------
      [10:13:59 AM] Deploying Application...
      <Jun 13, 2012 10:13:59 AM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1339596839457' for task '0'. Error is: 'weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: oracle.soa.workflow.wc, exact-match: false].'
      weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: oracle.soa.workflow.wc, exact-match: false].
           at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
           at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
           at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
           Truncated. see log file for complete stacktrace
      >
      <Jun 13, 2012 10:14:00 AM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'XXXComboApplication'.>
      <Jun 13, 2012 10:14:00 AM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
      weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: oracle.soa.workflow.wc, exact-match: false].
           at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
           at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
           at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
           at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
           Truncated. see log file for complete stacktrace
      >
      #### Cannot run application XXXComboApplication due to error deploying to IntegratedWebLogicServer.
      [10:14:00 AM] #### Deployment incomplete. ####
      [10:14:00 AM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
      [Application XXXComboApplication stopped and undeployed from Server Instance IntegratedWebLogicServer]
      -----------------------------------
        • 1. Re: Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS
          Patrick Harriss
          Try setting a system environment variable oracle.home and set it to MIDDLEWARE_HOME\jdeveloper where MIDDLEWARE_HOME would be the full path to your middleware home installation. So something like

          oracle.home=C:\oracle\Middleware\jdeveloper

          Restart JDeveloper after creating the environment variable and try again see if that helps.
          • 2. Re: Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS
            Sameer.Darbha
            Thanks for the quick response.

            I have set the environment variable and restarted the JDeveloper.
            But it is still giving the same error.

            Do we have to set it in some project properties in JDeveloper or anything like that ?
            • 3. Re: Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS
              Ravi Jegga
              Hi Sameer
              1. I know exactly what your requirement is and what you are trying to do. I will go with some assumptions on what you have and based on that I will say, unfortunately NO, what you are trying will NOT work. But there are other ways to test your stuff.

              2. You have a bpm app, say with one bpm process and one TaskForms Web Project (that has taskDetails pages that use your JSFF fragments using af:region tag). Remember you generate this TaskForms project by selecting a .TASK file etc. You have lots of backend db stuff and hopefully you created Entities, EJBs and DataControls. Then you create bindings in JSFF etc. All is deployed on a full fleded SOA Domain and you are good. BUT yes, it is very time consuming and painful to test. I agree.

              3. Now, you want to test only UI Part without any process/tasks. For this you try to deploy on Integrated WLS Domain of JDeveloper and this fails. Yes, it will Fail and this will not work. Because default wls domain is simple domain with just core j2ee and some adf modules deployed. BUT your TaskForms has some bpm/soa modules also. In JDeveloper, select your TaskForms project -> Right Click -> Project Properties -> Libraries and Classpath -> On right side you see bunch of BPM modules for ex: BPM Module. If you view it, you will see the modules (JARs defined in this ex: bpm-services.jar). NOW your integrated domain do NOT have these modules deployed, and hence you get exactly the error that totally makes sense.

              4. Go to your jdeveloper integration domain/config folder and open config.xml file. Open config.xml file from your full fledged standalone soa domain also. Search for "oracle.soa.workflow.wc" in both these files. You will find this in soa domain but NOT in default jdeveloper domain. This is the issue.

              5. Now you cannot make your integrated domain to work for SOA/BPM apps. This needs lot of effort to add all modules and corrupt your domain also. I would not recommend this.

              Now, is there any other way you can test your fragment pages that has heavy backend stuff. Yes. Within your JDev app, create a new Web Project with only ADF modules. Remeber when we create a ADP application, it creates 2 Model and ViewController projects. So all you want is create a new ViewController project that has all web, jsff, javax, adl modules added. In this you create DataControls for your EJBs and create or Copy the Fragments that you already have. Then create simple jsxp pages like hell01.jsxp, hello2.jspx etc and include your fragments using af:region etc. You can deploy your application by excluding TaskForms on to JDeveloper domain. Like from EAR level, create a new deployment profile. Add all the projects (EJBs) including new viewcontroller project EXCEPT for Process and TaskForms. I am confident this will work. Then you test your JSPx files directly running them:
              http://localhost:7101/myViewWeb/faces/hello1.jspx (assuming jspx file is under WebContent folder)
              http://localhost:7101/myViewWeb/faces/hello2.jspx

              If any of the fragments needs some input data to be set, you can always create a PageFlowController class and have life cycle methods like prepareModel etc to set the test data inputs. set this pageflowcontroller to the pagedef. So everytime you run jspx, it will call this pageflow controller. Or simply have few input fields on your jsff screen that stores the data and link to any managed bean. In this way, you will test and certify your jsff screen, bindings, ejb code, backend db stuff etc etc. Once this works, it will work if you put this jsff in taskDetails.jspx file also with maybe some minor tweaks.

              If you really want to test your UI and all backend stuff without much focus on Process/Tasks and NOT using soa domain, then this is the only way to go. I would not recommend updating JDev domain with soa/bpm stuff. Its just my 2 cents opinion.

              Thanks
              Ravi Jegga
              • 4. Re: Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS
                Sameer.Darbha
                Thank you very much Ravi
                Appreciate your detailed explanation.

                I will try this and let you know.

                Thanks and Regards
                Sameer
                • 5. Re: Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS
                  Sameer.Darbha
                  Hi Ravi

                  My understanding of what you are suggesting is to create a separate ADF ViewController project and copy all the taskflows and jspx, jsff files into it and test it.
                  After making any changes (assuming I fixed some issues), I have to copy these back to the original ADF ViewController project and deploy.
                  Did I understand you correctly ?
                  I think it is a lot of rework and manual merging of files. But it looks like the only option.

                  I am a bit not clear on what you said in the below statement.
                  You can deploy your application by excluding TaskForms on to JDeveloper domain. Like from EAR level, create a new deployment profile. Add all the projects (EJBs) including new viewcontroller project EXCEPT for Process and TaskForms.*

                  1. Should I create the new ADF ViewController project in the same BPM Application or in a separate ADF application?
                  2. I tried to create a new EAR deployment profile in the BPM Application, but cant find out how to exclude only Pocess and TaskForms.
                  I can see only projects and deployment profiles in the EAR Application Assembly. I have to select the ViewController project and it comes with the TaskForms.
                  Can you please elaborate it.
                  By doing the above I am not clear how we can run in JDeveloper.

                  Also, the reason why I am desperate to run this UI in JDeveloper is that in future, more developers will be starting to work on the same application, especially ADF ViewController project,
                  so since they cannot test locally, everybody will try to deploy it to the server and keep overwriting other developers changes.
                  I am just wondering how other companies/teams are managing to handle this development scenarios.
                  Can you share some ideas if you dont mind.

                  Out of curiosity, I just want to share what I tried today.
                  I created a ADF Library JAR deployment profile in the original ADF ViewController project. Added this jar file as library to a new ADF ViewController project (same BPM application).
                  So I got the Taskflows from the jar, used them in regions in jspx pages.
                  When I tried to run, I understood that, basically I am running into the same issue of "lack of BPM libraries in the Default Domain of Integrated WLS".

                  Thanks again for your help
                  Regards
                  Sameer
                  • 6. Re: Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS
                    Sudipto Desmukh
                    I have worked in BPM Projects in the recent past and as Ravi said there is no way to run it simply.
                    1. Should I create the new ADF ViewController project in the same BPM Application or in a separate ADF application?
                    Same application should be fine.
                    2. I tried to create a new EAR deployment profile in the BPM Application, but cant find out how to exclude only Pocess and TaskForms.
                    We too did what he suggested. Create an EAR File having only the ViewController WAR (which I assume will have dependency on a Model - EJB or ADF BC Project). So when you have not made any change to the BPM Process project (the process or the composite and the like) , you can just deploy the EAR to the server and test your changes.

                    Basically the SOA process is deployed as a separate SAR file and while deploying it you can chose to deploy the ViewController EAR with it , if there are changes to both.
                    What we suggest is to just deploy the EAR.

                    I understand its a huge pain in the ... cos you can't have breakpoints and it slows down development hugely.
                    everybody will try to deploy it to the server and keep overwriting other developers changes.
                    I am just wondering how other companies/teams are managing to handle this development scenarios.
                    Can you share some ideas if you dont mind.
                    We had a couple of development servers for this purpose. On another note google to see on Versioning an ADF Application.

                    Another suggestion to save time which I used to do was to make Emp-Dept & Oracle XE based POCs in a separate pure ADF project in a separate applciation which I could run.
                    So once the RnD was over simply replicate it in the BPM ADF App . Also test multiple changes together and have a lot of SOPs for debugging.
                    1 person found this helpful
                    • 7. Re: Not able to Run ADF jspx Pages in BPM Application using JDev Integrated WLS
                      Sameer.Darbha
                      Hi Ravi, Sudipto

                      Thank you very much for the solution.
                      I am able to deploy and test the ADF code in the Integrated WLS as you suggested.

                      Regards
                      Sameer