OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 592 forks source link

installUtility failed to install autofeature using server xml #9505

Open alvinso opened 5 years ago

alvinso commented 5 years ago

The resolver failed to resolve the autofeature when one of the enabling features is installed.

Error scenario:

  1. installUtility install cdi-1.2 onto wlp kernel 19.0.0.10
  2. installUtility install server.xml where server.xml contains feature cdi-1.2 and jsf-2.2 to the installation from (1)
  3. Expect auto feature com.ibm.websphere.appserver.cdi1.2-jsf2.2 is installed but it is not found.

Working scenario:

  1. installUtility install server.xml where server.xml contains feature cdi-1.2 and jsf-2.2 onto wlp kernel 19.0.0.10
  2. The auto feature com.ibm.websphere.appserver.cdi1.2-jsf2.2 is installed as expected.
Azquelt commented 5 years ago

This looks like the issue I was just looking at with @wtlucy. We think that the when running installUtility install server.xml with cdi-1.2 already installed, the install code doesn't pass cdi-1.2 to the resolveAsSet method.

resolveAsSet must be passed all the features listed in the server.xml, including ones that are already installed.

Could you check whether this is the case @alvinso ?

alvinso commented 5 years ago

@Azquelt Thanks for the info. We will look into it.

TayyabDev commented 5 years ago

Hi, I can confirm that this is the issue. We currently remove cdi-1.2 from the list of assets to resolve since it's already installed image

jhanders34 commented 5 years ago

@wtlucy suggested that this regression may have been caused by PR #8838.

alvinso commented 5 years ago

regression

marikaj123 commented 5 years ago

The above PR has reverted the issue that caused regression in 190011. We will be using this issue to add the complete sound fix.

jhanders34 commented 5 years ago

To be clear PR #8838 caused a regression in 19.0.0.10. Likely the revert (PR #9526) will not be in 19.0.0.11 unless something changes today. PR #9526 will need to be reverted and PR #9537 which is the real fix will need to be merged in.

marikaj123 commented 4 years ago

Scenario: When users install features using installUtility with server.xml, the auto features will not be installed when one of the features is already installed from the server.xml. The application requires the missing auto features will be affected.

Work around: Users can use installUtility to install features with the feature names that are listed in the server.xml to work around the issue.

marikaj123 commented 4 years ago

@TayyabDev and @alvinso - What status for the fix?

kgibm commented 4 years ago

@alvinso @TayyabDev Hi Guys, I finally got around to re-trying this since I first found it and I tested on 19.0.0.12, but the same issue still exists. For a reproduction, see https://github.com/kgibm/dt7_error

TayyabDev commented 4 years ago

The javaee8 docker image comes with cdi-2.0 already, so the resolver resolves the cdi-2.0-jsf-2.3 autofeature instead of cdi-1.2-jsf-2.2. This seems to be causing issues with the day trader application. The fix is working since installUtility works with javaee7 and I found the cdi-1.2jsf-2.2 autofeature in the build.

@wtlucy Can you investigate this problem? the application does not seem to work with the newer version of the autofeature