GithubHelp home page GithubHelp logo

Comments (13)

andre-doherty avatar andre-doherty commented on August 11, 2024 1

hello @cherylking, @scottkurz,

I have been able to test the version 3.9-SNAPSHOT this morning.
The defect is gone.

Thanks a lot for your action !
Regards,
André

from ci.maven.

cherylking avatar cherylking commented on August 11, 2024

@andre-doherty Can you include the console messages for the initial startup? I want to compare the features it installs on initial startup vs the restart. The console messages you included show the restart tries to install the same list of features as the server.xml. So I am not sure what you meant by:

It seems the plugin looses track of the actual server configuration at this point.

from ci.maven.

cherylking avatar cherylking commented on August 11, 2024

I would like you to remove the features from the pom.xml. Just leave the acceptLicense in the pom.xml. The features should be in the server.xml and will get installed by the plugin. I believe the server is getting created by default with a server.xml that includes the javaee-7.0 feature (since you are using the wlp-javaee7 runtime) and it is trying to install that in addition to what you have in the pom.xml, and that is not compatible with all the javaee6 features.

Where is your server.xml located? Do you need to add the location to the plugin configuration in the pom.xml? If it is not in src/main/liberty/config it will not use it.

from ci.maven.

andre-doherty avatar andre-doherty commented on August 11, 2024

@andre-doherty Can you include the console messages for the initial startup? I want to compare the features it installs on initial startup vs the restart. The console messages you included show the restart tries to install the same list of features as the server.xml. So I am not sure what you meant by:

It seems the plugin looses track of the actual server configuration at this point.

Hello @cherylking,

Please find the following :
The feature installed matches the features listed in the server.xml (located in the default directory submodule-ws/src/main/liberty/config/server.xml.

[INFO] [AUDIT ] CWWKT0016I: Application Web disponible, (default_host) : http://localhost:9080/samplepim/
[INFO] [AUDIT ] CWWKZ0001I: Application samplepim3-ws démarrée en 2,871 secondes.
[INFO] [AUDIT ] CWWKF0012I: Le serveur a installé les fonctions suivantes : [beanValidation-1.0, cdi-1.0, ejbLite-3.1, jaxb-2.2, jaxrs-1.1, jaxws-2.2, jdbc-4.2, jndi-1.0, jpa-2.0, json-1.0, jsp-2.2, localConnector-1.0, servlet-3.0, ssl-1.0, transportSecurity-1.0].
[INFO] [AUDIT ] CWWKF0011I: Le serveur defaultServer est prêt pour une planète plus intelligente. Il a démarré en 4,419 secondes.
[INFO] CWWKM2015I: Le numéro correspondant est 1 à la ligne [19/09/23 19:26:48:451 CEST] 00000024 com.ibm.ws.kernel.feature.internal.FeatureManager A CWWKF0011I: Le serveur defaultServer est prêt pour une planète plus intelligente. Il a démarré en 4,419 secondes..
[INFO] ************************************************************************
[INFO] * Liberty is running in dev mode.
[INFO] * Automatic generation of features: [ Off ]
[INFO] * h - see the help menu for available actions, type 'h' and press Enter.
[INFO] * q - stop the server and quit dev mode, press Ctrl-C or type 'q' and press Enter.
[INFO] *
[INFO] * Liberty server port information:
[INFO] * Liberty server HTTP port: [ 9080 ]
[INFO] * Liberty server HTTPS port: [ 9443 ]
[INFO] * Liberty debug port: [ 7777 ]
[INFO] ************************************************************************
Note: /Users/a983152/Workspace/git/pf-java/samples/sample.samplepim3-parent/samplepim3-service/src/main/java/fr/bnpp/pf/samplepim3/dao/CrudServiceImpl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[INFO] samplepim3-service source compilation was successful.
Note: /Users/a983152/Workspace/git/pf-java/samples/sample.samplepim3-parent/samplepim3-service/src/test/java/fr/bnpp/pf/samplepim3/business/PersonServiceImplTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[INFO] samplepim3-service tests compilation was successful.
Note: /Users/a983152/Workspace/git/pf-java/samples/sample.samplepim3-parent/samplepim3-ws/src/main/java/fr/bnpp/pf/samplepim3/Samplepim3Init.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[INFO] samplepim3-ws source compilation was successful.

Everything is fine until i try to restart the server...
All configuration files are corrected picked on the first start.

from ci.maven.

andre-doherty avatar andre-doherty commented on August 11, 2024

I would like you to remove the features from the pom.xml. Just leave the acceptLicense in the pom.xml. The features should be in the server.xml and will get installed by the plugin. I believe the server is getting created by default with a server.xml that includes the javaee-7.0 feature (since you are using the wlp-javaee7 runtime) and it is trying to install that in addition to what you have in the pom.xml, and that is not compatible with all the javaee6 features.

Where is your server.xml located? Do you need to add the location to the plugin configuration in the pom.xml? If it is not in src/main/liberty/config it will not use it.

The server.xml is correctly found (located in the default location) : datasources, libraries are configured.

So i have tried to remove the features list in the pom, doesn't change anything.
Restart still fails.

Regards
André

from ci.maven.

andre-doherty avatar andre-doherty commented on August 11, 2024

Actually the plugin behaves just as if there was no server.xml, as if the module name specified in the command line with the pl switch was not kept.

from ci.maven.

andre-doherty avatar andre-doherty commented on August 11, 2024

hello @cherylking,

Do you need some more elements ?

Regards,
André

from ci.maven.

cherylking avatar cherylking commented on August 11, 2024

@andre-doherty Can you provide a sample project to recreate?

Until then, I have a suggestion. Instead of using the wlp-javaee7 server when you are using Java EE 6 features, can you try using the wlp-kernel runtime artifactId instead?

from ci.maven.

andre-doherty avatar andre-doherty commented on August 11, 2024

@andre-doherty Can you provide a sample project to recreate?

Hello @cherylking,
Here you are :
sample.zip

I have tried to minimize it as max as possible.
To reproduce :
from the parent pom run :
mvn clean install
mvn -am -pl module-ws io.openliberty.tools:liberty-maven-plugin:dev
Try to restart the server using the 'r'

Note : i am using the following :
mvn --version

Maven home: /opt/homebrew/Cellar/maven/3.9.3/libexec
Java version: 17.0.7, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk@17/17.0.7/libexec/openjdk.jdk/Contents/Home
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "14.0", arch: "aarch64", family: "mac"

André

from ci.maven.

cherylking avatar cherylking commented on August 11, 2024

Thanks for the sample project @andre-doherty. I will try to work on this next week. Did you try the workaround?

from ci.maven.

andre-doherty avatar andre-doherty commented on August 11, 2024

hello @cherylking,
Yes, sorry i did not give you a feedback on the suggested workaround.
It doesn't work as well, it fails also but with a different error.

[ERROR] Could not restart the server.
io.openliberty.tools.common.plugins.util.PluginExecutionException: org.apache.maven.plugin.MojoExecutionException: CWWKM2173E: Failed to install application from project project:lib:jar:0.0.1-SNAPSHOT. The project packaging type is not supported.
    at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.libertyDeploy (DevMojo.java:417)
    at io.openliberty.tools.common.plugins.util.DevUtil.restartServer (DevUtil.java:1855)
    at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.readInput (DevUtil.java:2610)
    at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.run (DevUtil.java:2577)
    at java.lang.Thread.run (Thread.java:833)
Caused by: org.apache.maven.plugin.MojoExecutionException: CWWKM2173E: Failed to install application from project project:lib:jar:0.0.1-SNAPSHOT. The project packaging type is not supported.
    at io.openliberty.tools.maven.applications.DeployMojo.installProject (DeployMojo.java:204)
    at io.openliberty.tools.maven.applications.DeployMojo.doDeploy (DeployMojo.java:103)
    at io.openliberty.tools.maven.applications.DeployMojo.execute (DeployMojo.java:61)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
    at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:362)
    at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoDeploy (StartDebugMojoSupport.java:328)
    at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoDeploy (StartDebugMojoSupport.java:311)
    at io.openliberty.tools.maven.server.DevMojo$DevMojoUtil.libertyDeploy (DevMojo.java:415)
    at io.openliberty.tools.common.plugins.util.DevUtil.restartServer (DevUtil.java:1855)
    at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.readInput (DevUtil.java:2610)
    at io.openliberty.tools.common.plugins.util.DevUtil$HotkeyReader.run (DevUtil.java:2577)
    at java.lang.Thread.run (Thread.java:833)

André

from ci.maven.

cherylking avatar cherylking commented on August 11, 2024

You can test the fix with the 3.9-SNAPSHOT. We are targeting a release by the end of this week.

from ci.maven.

scottkurz avatar scottkurz commented on August 11, 2024

FWIW, just noting that I tried and failed to recreate this with Maven v3.8.8.... but I did succeed recreating on the noted v3.9.3. Thought that was interesting to observe the version-specific behavior for this Maven API.

from ci.maven.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.