10 Replies Latest reply: Apr 8, 2013 3:18 AM by Steven Davelaar-Oracle RSS

    Upgrating from 10g to 11g release 2

    adekkers
      Hi,
      We have application built in 10.1.3.2 with JHeadstart 10.1.3.1.26.
      We would like to upgrade our application to JDeveloper 11g Release2 en JHeadstart R2.
      As I understood I have to upgrade my application first to 11.1.1.x and afterwords to release 2.
      Is it correct?
      Regards,
      Anna
        • 1. Re: Upgrating from 10g to 11g release 2
          Steven Davelaar-Oracle
          Anna,

          No, you should be able to directly upgrade to 11.1.2.
          The upgrade is not straightforward as you will be using the new ADF Faces Rich Client and ADF Task Fows, but using JHeadstart it is at least much eaieer and faster than with handbuilt apps :-)
          The overall idea is that you generate your app ina new ViewController project, and then re-apply any customizations that you have in the 10.1.3 app.

          Here is the list of migration steps from the 11.1.1.x release notes, which yoiu should be able to apply to 11.1.2 as well:

          Migrating a JHeadstart 10.1.3 Application to 11.1.1

          Here are the steps to migrate your JHeadstart 10.1.3 JSF/ADF Faces to JHeadstart 11 with ADF 11 Task Flows and ADF Faces Rich Components:

          - Make a backup of your entire project before you start with the migration.

          - Install JHeadstart, and perform additional steps to make JDeveloper compatible with JHeadstart, depending on the JDeveloper version (see Compatibility).

          - Open your project in JDeveloper 11.1.1. You will be asked to upgrade your workspace (.jws) and project (.jpr) files to 11.1.1. Click Yes to do so. The ADF Business Components will be migrated to 11.1.1 as well.
          Go to the Project properties of the Model project, and click the Libraries tab. The JHeadstart Runtime 10.1.3 library appears in red. Remove this library, and add the JHeadstart Runtime 11.1.1 library. Make sure your Model project compiles again without errors.

          - Create a new ViewController11 project in the same application workspace. Easiest way to do this is right-mouse-click on the workspace, then choose "New Project ...". Choose "Web project" in the New Gallery dialog that appears. In the New Web project wizard that appears you must choose between Servlet and JSP versions. Choose Servlet version 2.5. On the Page flow technology tab, choose ADF Page Flow. Click Finish (no need to select any libraries on the last tab of the New Web Project wizard)

          - Go to the file system, make a new directory "properties" under the root directory of your new ViewController11 project, and copy all the application definition files that you want to migrate to this directory.

          - Right-mouse-click on ViewController11 project and choose "Project Properties". Expand "Project Source Paths" node, and click on the Resources sub node. Add the properties directory you just created as resource.

          - Right-mouse-click on ViewController11 project and choose "Enable JHeadstart on this Project". Click through the wizard pages and click Finish. For each 10.1.3 application structure file, you will get a dialog that asks you to upgrade the 10.1.3 application structure file to version 11.1.1. Click Yes each time this dialog appears. When you have clicked Finish again, a new JHeadstartApplicationDefinition.xml file has been added to the project. This file contains a list of all migrated application structure files. You can right-mouse-click on this file and choose "Edit JHeadstart Application Definition". In release 11, you can now maintain all application structure files (which have been renamed to service definition files) in the same Application Definition Editor window.

          - Remove the "old" 10.1.3 ViewController project(s) from your workspace.

          - In the Application Definition Editor, click on each service and specify a name for the Menu Model file, for example "/WEB-INF/hrservice_menu.xml"

          - Check whether you have a detail group with layout style "tree" or "tree-form" while the parent group does not have a "tree" or "tree-form" layout. If you have such a group, you need to change the layout style of these detail groups to "reusableTree" and add a group region that references another top-level group that will generate the form part of the tree-form layout. See the JHeadstart Developer's Guide, chapter 5, section "Creating Tree Layouts" for more information.

          - Run the JHeadstart Application Generator.

          - Run and test your application.

          - Examine all the 10.1.3 custom velocity templates you used during generation. Check the functionality they provided and determine whether the functionality is still required in your R11 application. If so, check whether the functionality can now be implemented through declarative settings in the JHeadstart Application Definition editor. If not, create custom velocity templates based on the R11 standard templates that provide the same functioanlity as your 10.1.3 custom templates.

          - In case your 10.1.3 application was not 100% generatable, examine the post-generation changes you made in 10.1.3. Check the functionality they provided and determine whether the functionality is still required in your R11 application. If so, check whether the functionality can now be implemented through declarative settings in the JHeadstart Application Definition editor. If not, create custom velocity templates based on the R11 standard templates to provide the same functioanlity as your 10.1.3 post-generaton changes. If you do not mind to keep your application 100% generatable, you can apply the same functionality as post-generation steps
          replacing your ViewController

          Steven Davelaar,
          JHeadstart Team.
          • 2. Re: Upgrating from 10g to 11g release 2
            adekkers
            Steven,
            Thank you very much for your reply.
            I try to follow your notes.

            1. First during the migration stap I've got the error:
            "the connection specified for business components has not been defined. DemeterDS"
            I made that connection.

            2."Go to the Project properties of the Model project, and click the Libraries tab. The JHeadstart Runtime 10.1.3 library appears in red. Remove this library, and add the JHeadstart Runtime 11.1.1 library. Make sure your Model project compiles again without errors."
            I've got BC4J HTML library also in red. If I try to add a new loibrary I do not see BC4J HTML.
            I try to compile the Model project. I've got a lot of:
            Error(17,8): com.nbd.demeter.model.service.client.InkoopfacturenServiceClient is not abstract and does not override abstract method getNestedJhsModelService() in oracle.jheadstart.model.adfbc.v2.JhsApplicationModule

            Also I see JHeadstart project in my project navigator. Should I remove that project?
            Thanks in advance,
            Anna
            • 3. Re: Upgrating from 10g to 11g release 2
              Steven Davelaar-Oracle
              Anna,

              Can you zip up and send the model project to idevcoe_nl@oracle.com?

              Steven Davelaar,
              JHeadstart team.
              • 4. Re: Upgrating from 10g to 11g release 2
                adekkers
                Hi Steven,
                Thank you very much for your reply.

                After several code modifications + I put standard getNestedJhsModelService() method into every Client class of my application module, I've managed to compile the Model.

                1. I created a new project ViewController11. (In the wizard I did not get possibility to choose between Servlet and JSP versions).
                2. I've copied application definition files into properties.
                3. Enabled JHeadstart. Structure files are converted.
                4. The old CiewController-project I deleted.

                Now I'm struggling with generation of my application. I always get the errors:

                JAG-00177 [ SisoOnderhoudService ] Cannot find data control SisoOnderhoudServiceDataControl. Please click the refresh icon on the Data Controls palette and try again.
                Validation failed

                As I understood it has to be something wrong with data control. I tried to change SisoOnderhoudServiceDataControl into SisoOnderhoudService in application definition. Unfortunately no results.

                If I try to create a new JHeadstart Service Definition I do not see any available DataControls in my workingspace.

                Any ideas?
                Thanks in advance,
                Anna

                Edited by: adekkers on 4-apr-2013 17:59
                • 5. Re: Upgrating from 10g to 11g release 2
                  Steven Davelaar-Oracle
                  Anna, Can you send the while project, so I can try to reproduce your errors?

                  Steven Davelaar,
                  Jheadstart Team.
                  • 6. Re: Upgrating from 10g to 11g release 2
                    Steven Davelaar-Oracle
                    Anna,

                    I don't know what happened, but your model project is a bit messed up.

                    - In project properties, Java source path the only entry should be ...\Model\src

                    - The data controls don't show up because the project expects the Model.jpx here:

                    Model\src\com\nbd\demeter\model\Model.jpx

                    But it is located in

                    Model\src\Model.jpx

                    You need to move the Model.jpx outside JDeveloper to Model\src\com\nbd\demeter\model dir, and then restart JDev, it will ask you to upgrade the ADF business components again, click yes.

                    - if you the click the refresh icon in Dta Control palette, all dc's should show up and will also be visible in Jheadstart wizard.

                    - The ViewController11 project should have a dependency on your model project.

                    Hope this helps.

                    Steven Davelaar,
                    JHeadstart Team.
                    • 7. Re: Upgrating from 10g to 11g release 2
                      adekkers
                      Steven, hi,
                      I tried it both:
                      1. change the Java source path, restart JDevloper.
                      does not work
                      back to original state
                      2. move Model.jpx to Model\src\com\nbd\demeter\model\Model.jpx
                      also does not work
                      If I click refresh-button on Data Controls I get the following error:

                      Apr 5, 2013 2:57:16 PM oracle.adfdtinternal.model.ide.jdev.JDevDataControlManager notifyAfterPopulatingDataControls
                      INFO: Number of data controls:0
                      Apr 5, 2013 2:57:16 PM oracle.adfdtinternal.model.ide.providers.BC4JDataControlProvider publishDataControls
                      INFO: Project src/ not available for: com/nbd/demeter/model/Model.jpx
                      Apr 5, 2013 2:57:16 PM oracle.adfdtinternal.model.ide.jdev.JDevDataControlManager notifyAfterPopulatingDataControls
                      INFO: Number of data controls:0

                      In both cases it does not ask me to upgrade ADF business components again.
                      Thanks,
                      Anna
                      • 8. Re: Upgrating from 10g to 11g release 2
                        Steven Davelaar-Oracle
                        You need to do both steps, source path and move model.jpx, then restart JDev and double check you can see the Model.jpx now in the correct package.
                        Then click refresh.

                        I made these changes to the zip you sent me and it works for me.

                        Steven Davelaar,
                        JHeadstart Team.
                        • 9. Re: Upgrating from 10g to 11g release 2
                          adekkers
                          Probably I do something wrong.
                          I deleted every source path what we had exempt (about 11 paths)
                          D:\svn\project\demeter\trunk\jdev\Model\src
                          Than I moved Model.jpx to D:\svn\project\demeter\trunk\jdev\Model\src\com\nbd\demeter\model
                          Restarted Jdeveloper.
                          Nothing.
                          If I click on refresh on Data Control I get:
                          Apr 5, 2013 6:21:36 PM oracle.adfdtinternal.model.ide.jdev.JDevDataControlManager notifyAfterPopulatingDataControls
                          INFO: Number of data controls:0
                          Sorry for being a blonde.
                          What I'm doing wrong?
                          Thanks,
                          Anna
                          • 10. Re: Upgrating from 10g to 11g release 2
                            Steven Davelaar-Oracle
                            Anna,

                            I sent you the modified project where the data controls are visible again.

                            Steven Davelaar,
                            JHeadstart Team.