Thank you for visiting! If you liked the site, please add a bookmark, else add a critical comment! Would you like to visit Greece? Traditional Greek flag This real estate site is only available in Greek! The holy mountain

Saturday, 1 February 2014

JDeveloper 12c to 11g backwards migration

In case you could not wait to migrate your last project to the currently newer version of JDeveloper 12c, you might have been disappointed with several recurring  errors, or an entire EJB 3 application not running at all.
Familiar or not?


In this new post a solution for returning to the older version will be presented, for those who receive an error message that the workspace cannot open any more with JDeveloper 11g . The exact phrasing is: " Unable to load application file. Workspace already migrated to newer version (12.1.2.0.0)".

Migration can still be undone!

One needs to edit the .jws workspace with an editor, first commenting out the lines mentioning the 12.1.2.0.0 version like this:

<?xml version = '1.0' encoding = 'UTF-8'?>
<jws:workspace xmlns:jws="http://xmlns.oracle.com/ide/project">
   <hash n="adrs-workspace-properties">
      <value n="adrs-instance-binding" v="DefaultServer"/>
      <value n="deploy-timeout" v="0"/>
      <value n="runtime-application-name" v="ejb3inaction"/>
   </hash>
   <hash n="adrs-workspace-weblogic-properties">
      <value n="hot-class-reload" v="ide-default"/>
   </hash>
   <value n="application-package-prefix" v="actionbazaar"/>
   <url n="application-source-directory" path="src/"/>
   <value n="appTemplateId" v="#genericApplicationTemplate"/>
   <hash n="appWebServicePolicy">
      <value n="location"/>
      <value n="LOCATION_TYPE" v="policy.config.PolicyOptions.LocationType.FILE_STORE"/>
      <value n="SERVER_LOCATION" v="IntegratedWebLogicServer"/>
   </hash>
   <hash n="component-versions">
      <value n="oracle.adf.share.dt.migration.jps.JaznCredStoreMigratorHelper" v="11.1.1.1.0"/>
      <!--value n="oracle.adf.share.dt.migration.wsm.PolicyAttachmentMigratorHelper" v="12.1.2.0.0"/-->
<value n="oracle.adf.share.dt.migration.wsm.PolicyAttachmentMigratorHelper" v="11.1.2.0.0"/>     
<value n="oracle.adfdt.controller.adfc.source.migration.SavePointDataSourceForWLSMigrator" v="11.1.1.1.0"/>
      <value n="oracle.adfdtinternal.model.ide.security.extension.AdfSecurityMigrator" v="11.1.1.1.0.13"/>
      <value n="oracle.adfdtinternal.model.ide.security.wizard.AdfSecurityMigrator" v="11.1.1.1.0.13"/>
      <value n="oracle.ide.model.Project" v="11.1.1.1.0;11.1.2.0.0"/>
<!--value n="oracle.ide.model.Project" v="11.1.1.1.0;11.1.2.0.0;12.1.2.0.0"/-->     
<value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.2.0.0"/>
      <value n="oracle.jdevimpl.appresources.ApplicationSrcDirMigrator" v="11.1.2.0.0"/>
      <value n="oracle.jdevimpl.deploy.ear.OarMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.jdevimpl.deploy.mar.MarMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.jdevimpl.deploy.migrators.JeeDeploymentMigrator" v="11.1.2.0.0"/>
      <value n="oracle.jdevimpl.xml.oc4j.ds.DataSourcesMigratorHelper" v="10.1.3.5.0"/>
      <value n="oracle.jdevimpl.xml.oc4j.jps.JpsConfigMigratorHelper" v="11.1.1.1.0.1"/>
      <value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.mds.internal.dt.deploy.base.MarMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.mds.internal.dt.ide.migrator.MDSConfigMigratorHelper" v="11.1.1.0.5313"/>
   </hash>
   <list n="contentSets">
      <string v="oracle.mds.internal.dt.ide.appresources.MDSAppResourceCSProvider/MDSAppContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ADFContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationSrcContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationLevelMavenPOMContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationBuildToolContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ResourceBundlesContentSet"/>
   </list>
   <list n="listOfChildren">
      <hash><url n="URL" path="Model/Model.jpr"/></hash>
      <hash><url n="URL" path="UserInterface/UserInterface.jpr"/></hash>
   </list>
   <hash n="oracle.jdeveloper.deploy.dt.DeploymentProfiles">
      <hash n="profileDefinitions">
         <hash n="ejb3inActionV2">
            <hash n="archiveOptions">
               <value n="compressed" v="true"/>
               <value n="hasManifest" v="true"/>
            </hash>
            <value n="defaultConnection" v="standalone"/>
            <hash n="dependencies">
               <list n="dependencyList">
                  <hash>
                     <value n="adapterClass" v="oracle.jdevimpl.deploy.common.ArchiveProfileDependable"/>
                     <url n="ownerURL" path="Model/Model.jpr"/>
                     <value n="pathInEar" v=""/>
                     <value n="profileName" v="ejb3inactionModel"/>
                  </hash>
                  <hash>
                     <value n="adapterClass" v="oracle.jdevimpl.deploy.common.ArchiveProfileDependable"/>
                     <url n="ownerURL" path="UserInterface/UserInterface.jpr"/>
                     <value n="pathInEar" v=""/>
                     <value n="profileName" v="ejb3inActionV2"/>
                  </hash>
               </list>
            </hash>
            <url n="earURL" path="deploy/ejb3inActionV2.ear"/>
            <value n="enterpriseAppName" v="ejb3inActionV2"/>
            <hash n="fileGroups">
               <list n="groups">
                  <hash>
                     <list n="contributors">
                        <hash>
                           <value n="type" v="9"/>
                        </hash>
                     </list>
                     <value n="displayName" v="Application Descriptors"/>
                     <hash n="filters">
                        <list n="rules">
                           <hash>
                              <value n="pattern" v="**"/>
                              <value n="type" v="0"/>
                           </hash>
                        </list>
                     </hash>
                     <value n="internalName" v="ear-metainf"/>
                     <value n="type" v="1"/>
                  </hash>
                  <hash>
                     <value n="displayName" v="Application Libraries"/>
                     <hash n="filters">
                        <list n="rules">
                           <hash>
                              <value n="pattern" v="xml.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="xmlparserv2.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="adf-controller-rt-common.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="adf-controller-api.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="adf-controller.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="**"/>
                           </hash>
                        </list>
                     </hash>
                     <value n="internalName" v="libraries"/>
                     <list n="selectedLibraries"/>
                     <value n="targetWithinJar" v="lib"/>
                     <value n="type" v="3"/>
                  </hash>
               </list>
            </hash>
            <hash n="libraryDependencies">
               <list n="unselectedLibraries"/>
            </hash>
            <value n="profileClass" v="oracle.jdeveloper.deploy.ear.EarProfile"/>
            <value n="profileName" v="ejb3inActionV2"/>
         </hash>
      </hash>
      <list n="profileList">
         <string v="ejb3inActionV2"/>
      </list>
   </hash>
   <hash n="oracle.jdeveloper.deploy.SecurityDeploymentSettings">
      <value n="Security-Deployment-Migrate-Users-And-Groups-Key" v="true"/>
      <value n="Security-Deployment-Overwrite-Application-Policies-Key" v="true"/>
      <value n="Security-Deployment-Overwrite-Credentials-Key" v="true"/>
   </hash>
   <hash n="oracle.jdeveloper.model.PathsConfiguration">
      <hash n="ApplicationSrcContentSet">
         <list n="pattern-filters">
            <string v="+**"/>
         </list>
         <list n="url-path">
            <url path="src/"/>
         </list>
      </hash>
   </hash>
   <hash n="oracle.mds.internal.dt.ide.CustOptions">
      <list n="customizationLibraries">
         <hash/>
      </list>
   </hash>
   <hash n="Weblogic JDBC">
      <value n="Weblogic-JDBC-Auto-Sync-Key" v="false"/>
   </hash>
</jws:workspace>


Thus, by removing the references to  version 12.1.2.0.0 one can continue development with the older version and postpone the migration, if necessary. Finally, one can find  further migration details as usual here.




3 comments:

  1. that was a very helpful post!
    i had an application created using JDeveloper 12.2.1.0 and then was migrated to 12.2.1.2, so i found tags for both versions of JDeveloper 12.2.1.0 & 12.2.1.2, i had to comment both to be able to open the application with JDeveloper 12.1.3

    when i opened it, it asked to migrate the Application to JDeveloper 12.1.3 and i walked through the steps and it opened, but i havenot tried to run the application after the miigration

    Thanks Nick for the helpful post

    ReplyDelete
  2. This is the correct resolution for the problem

    ReplyDelete
  3. Tnq Nick Aiva. This is the Exact solution that I need

    ReplyDelete