5 Replies Latest reply on May 7, 2009 7:45 AM by 700149

    WLP103 Solution:The associated EAR is not a Portal Application Services EAR

    George Moykin-Oracle
      I've recently faced and resolved a problem related to the New WebLogic Portal 103 Application (EAR and WEB Portal projects) creation via Workshop 10.3 Portal Project Wizard.
      The Problem and the Solution are described below.
      The problem is NOT caused by Oracle WebLogic Portal 10.3 environment but by Win XP OS !
      I've tested it on Win Server 2003, Win Vista and Win XP (sp2 & sp3) - problem arises only on Win XP sp3.

      Note:*+ I'm not quite a Windows OS guy, hence I don't pretend to be 100% right.
      I've just posted this thread in case anybody has faced the same problem !

      1. Let's create New Portal EAR Project
      2. Finish is clicked, but the New Portal EAR Project Wizard Dialog doesn't close
      3. Finish is clicked again => error message appears
      4. OK closes the Error Box
      5. Let's see the created by Eclipse file: *%MyWorkspace%\MyPortalEAR\.settings\org.eclipse.wst.common.project.facet.core.xml* - which is INCOMPLETE !

      {color:#993300}<?xml version="1.0" encoding="UTF-8"?>
      <faceted-project>
      <runtime name="Oracle WebLogic Server v10.3"/>
      <installed facet="jst.ear" version="1.4"/>
      <installed facet="wls.ear" version="10.3"/>
      <installed facet="wlp.full-framework-app" version="10.3.0"/>
      </faceted-project>{color}

      6. Let's review EAR Project Facets
      Project Facet contains only 3 properties !

      7. Let's Modify Project
      Project Facet: Weblogic Portal, Weblogic Portal (Optional), Weblogic Portal Collaboration are DOUBLED (see Check Boxes) !

      8. Let's modify Project Facets configuration - from <custom> to <WebLogic Portal EAR Project Facets>
      9. Finish is clicked
      The Dialog Box cannot be closed after Finish is clicked several times, only ‘X' closes it.
      Furthermore Facet configuration is NOT changed !

      10. Let's create New Portal Web Project
      11. After the project is built some Problems arise (in MyPortalWEB\Java Resources project):
      {color:#ff0000}Error (2 items)
      - A Portal Application Services web application should be associated with a Portal Application Services EAR for proper deployment
      - The associated EAR "MyPortalEAR" is not a Portal Application Services EAR{color}

      12. Solution - close the Workshop and manually revamp (add installed facet) the org.eclipse.wst.common.project.facet.core.xml
      file located in your workspace folder +%MyWorkspace%\MyPortalEAR\.settings+:

      {color:#0000ff}<?xml version="1.0" encoding="UTF-8"?>
      <runtime name="Oracle WebLogic Server v10.3"/>
      <installed facet="wlp.propagation-app" version="10.3.0"/>
      <installed facet="wlp.admin-portal-app" version="10.3.0"/>
      <installed facet="wlp.wps-app" version="10.3.0"/>
      <installed facet="jst.ear" version="1.4"/>
      <installed facet="wls.ear" version="10.3"/>
      <installed facet="wlp.full-framework-app" version="10.3.0"/>
      <installed facet="wlp.admin-framework-app" version="10.3.0"/>
      </faceted-project>{color}

      Open the Workshop again and the problem is fixed.

      Edited by: George Moykin on 2009-1-7 11:56

      Edited by: George Moykin on 2009-1-7 12:03
        • 1. Re: WLP103 Solution:The associated EAR is not a Portal Application Services EAR
          663697
          The key here is that the wizard didn't close on the first Finish and that there's an error dialog. This means that one of the project facets failed to install correctly, which causes the wizard to stop installing facets, which is why the facet xml file is incomplete. It means that the EAR really isn't a portal services ear project, since that facet didn't successfully install and, therefore, it probably doesn't have all the right portal shared libraries and probably wouldn't work in the server correctly.

          It would be helpful to see the full error message (the error in the error dialog is probably incomplete or misleading). Can you open the Eclipse Error Log view, try it again, see if an error and stacktrace appears when you hit Finish, and include that in this thread? Use the Window -> Show View -> Other... top level menu, then select Error Log under the PDE Runtime section; or you can just look in the <workspace>/.metadata/.log file, although that can be a bit harder to read.

          Thanks,
          Greg
          • 2. Re: WLP103 Solution:The associated EAR is not a Portal Application Services EAR
            George Moykin-Oracle
            Hi Greg,
            Thanks for the reply :)

            You are right: "the project doesn't have all the right portal shared libraries and probably wouldn't work in the server correctly."
            I know that and I had to fix manually the libraries, xml files etc., which is terrible ;)

            The Eclipse exception is:

            !MESSAGE Unhandled event loop exception
            !STACK 0
            java.lang.RuntimeException: java.lang.NoSuchMethodError: getLibraryContextRootOverrides
                 at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.performFinish(ModifyFacetedProjectWizard.java:307)
                 at org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard.performFinish(NewProjectDataModelFacetWizard.java:311)
                 at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
                 at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
            ...

            On the same Machine (Win XP sp3) I have WLP 10.2 installed as well as all previous WLP versions - no such exceptions ! Only for WLP 10.3 I've received it.
            On another Machine (Win Server 2003 ) I have the same WLP 10.3 installed - no such exceptions !

            It's possible that my Win XP OS is broken or some I/O process prevents or pre-sets the Java, but I think the problem is my local OS env., rather than WLP installation (I've installed it several times in different locations).

            Thanks for the help ;)
            • 3. Re: WLP103 Solution:The associated EAR is not a Portal Application Services EAR
              663697
              I just downloaded WLP 10.3 and tried this on my Windows XP sp3 machine and it worked fine.

              This is interesting. Here's a little background. WLP's Workshop plugins rely up on the old wls-tools eclipse plugins. During WLP 10.3 development, the version of wls-tools we were using didn't have com.bea.workshop.wls.core.descriptors.IWebLogicAppDescriptor.getLibraryContextRootOverrides() method nor the corresponding LibraryContextRootOverride class. We created a patch to the wls-tools plugins to add this method, which got into the WLP 10.3 installer.

              Maybe your WLP 10.3 installation on XPsp3 didn't get the patch. Look for a &lt;beahome&gt;/tools/eclipse_pkgs/2.0/pkgs/eclipse/plugins/com.bea.workshop.wls.core_1.2.4.20080806181513.jar, which should contain a com/bea/workshop/wls/core/descriptors/LibraryContextRootOverride.class file (plus a bunch of other files). There should also be com.bea.workshop.wls.core_1.2.4.20080711173356.jar file (notice the different timestamp number at the end) there; if you only have this second file or if the first file is corrupt, then your environment somehow didn't get the required patch.

              Greg
              • 4. Re: WLP103 Solution:The associated EAR is not a Portal Application Services EAR
                663697
                I just saw this on someone's machine and was able to play around with it. For some reason, Eclipse was loading the older version of the com.bea.workshop.wls.core plugin, instead of the newer one which has the API that the WLP plugins uses.

                At least on this machine, they had both versions of the plugin jar in <beahome>/tools/eclipse_pkgs/2.0/pkgs/eclipse/plugins. We moved the older one (com.bea.workshop.wls.core_1.2.4.20080711173356.jar) out of the plugins folder, then restarted Workshop with a -clean on the command-line. In this case, on Windows, we edited the shortcut in the start menu to specify ".../workshop.exe -clean". That made it load the newer version and the EAR project could be successfully created.

                The -clean should only be needed once after modifying the plugins; it does not affect your workspace or any preferences.

                Greg
                • 5. Re: WLP103 Solution:The associated EAR is not a Portal Application Services EAR
                  700149
                  org.eclipse.wst.common.project.facet.core.xml should be:


                  <?xml version="1.0" encoding="UTF-8"?>
                  *<faceted-project>*
                       <runtime name="Oracle WebLogic Server v10.3"/>
                       <installed facet="wlp.propagation-app" version="10.3.0" />
                       <installed facet="wlp.admin-portal-app" version="10.3.0" />
                       <installed facet="wlp.wps-app" version="10.3.0" />
                       <installed facet="jst.ear" version="1.4" />
                       <installed facet="wls.ear" version="10.3" />
                       <installed facet="wlp.full-framework-app" version="10.3.0" />
                       <installed facet="wlp.admin-framework-app" version="10.3.0" />
                  </faceted-project>