7 Replies Latest reply: Oct 20, 2012 10:32 AM by 876181 RSS

    Re: JDEVELOPER Copy Project

    876181
      Hi,

      I have a project in JDeveloper I would like to copy. I would like to have two of the same projects. One will stay the same, the other will be modified. For example, I have a project in JDeveloper named "1A", and I copy the project "1A", and rename it to "1A-1". How do I do this? What configuration files do I need to change so there will be no conflict in deployment in Weblogic server?


      How do I fix this?

      I am using JDeveloper 11.2.1.

      thank you
        • 1. Re: JDEVELOPER Copy Project
          Shay Shmeltzer-Oracle
          Just copy/paste the directory the project is in (including the jpr file) into a new directory.
          Another option - check it into version management and then check it out into a new directory.
          • 2. Re: JDEVELOPER Copy Project
            876181
            When I do the tasks you mentioned, and try to deploy both projects in Weblogic server, I receive an error trying to deploy the original project and the copied project. Weblogic Server seems to think I am trying to deploy the same project twice. What other settings do I need to change?

            I received the following errors while attempting to deploy the original and the copied project

            <Oct 14, 2012 8:34:15 AM MDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1350225253032' for task '1'. Error is: 'weblogic.application.ModuleException: Context path '/erm1-Model-context-root' is already in use by the module: erm1-Model-context-root application: erm1whatif'
            weblogic.application.ModuleException: Context path '/erm1-Model-context-root' is already in use by the module: erm1-Model-context-root application: erm1whatif
                 at weblogic.servlet.internal.WebAppModule.initAndValidateContextPath(WebAppModule.java:1210)
                 at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:970)
                 at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:382)
                 at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:433)
                 at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
                 Truncated. see log file for complete stacktrace
            >
            <Oct 14, 2012 8:34:15 AM MDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'erm1'.>
            <Oct 14, 2012 8:34:15 AM MDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'erm1'.>
            <Oct 14, 2012 8:34:15 AM MDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
            weblogic.application.ModuleException: Context path '/erm1-Model-context-root' is already in use by the module: erm1-Model-context-root application: erm1whatif
                 at weblogic.servlet.internal.WebAppModule.initAndValidateContextPath(WebAppModule.java:1210)
                 at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:970)
                 at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:382)
                 at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:433)
                 at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
                 Truncated. see log file for complete stacktrace
            >
            [08:34:15 AM] Deployment cancelled.
            [08:34:15 AM] ---- Deployment incomplete ----.
            [08:34:15 AM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
            #### Cannot run application erm1 due to error deploying to IntegratedWebLogicServer.
            [Application erm1 stopped and undeployed from Server Instance IntegratedWebLogicServer]


            thank you

            Edited by: John on Oct 14, 2012 7:36 AM
            • 3. Re: JDEVELOPER Copy Project
              Shay Shmeltzer-Oracle
              If you want both projects to be deployed to the same server at the same time - you'll need to change the context root name for the app.
              Project properties->Java EE app
              • 4. Re: JDEVELOPER Copy Project
                Timo Hahn
                Well, to make the two apps different from the point of view of the WLS, you have to change theJ2EE context root and the J2EE web application name. You find both in the view controllers project properties under the node 'Java EE Application'.
                I strongly suggest to changes the output file of the deployment descriptors (war and ear files) too, as you otherwise overwrite them on the server.

                Timo
                • 5. Re: JDEVELOPER Copy Project
                  876181
                  How do I rename the output files (WAR and EAR)?
                  • 6. Re: JDEVELOPER Copy Project
                    Shay Shmeltzer-Oracle
                    You edit the deployment profile - under project properties->deployment
                    • 7. Re: Re: JDEVELOPER Copy Project
                      876181
                      thank you