eclipse-ee4j / cargotracker

The project demonstrates how you can develop applications with Jakarta EE using widely adopted architectural best practices like Domain-Driven Design (DDD).
https://eclipse-ee4j.github.io/cargotracker/
MIT License
344 stars 142 forks source link

Application not launched #104

Closed chainhead closed 4 years ago

chainhead commented 4 years ago

Here is the output of mvn package cargo:run. Nothing comes up at http://localhost:8080/cargo-tracker. What is missing?

[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< org.eclipse.ee4j:cargo-tracker >-------------------
[INFO] Building Eclipse Cargo Tracker 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[WARNING] The artifact fish.payara.arquillian:arquillian-payara-server-4-remote:jar:1.1 has been relocated to fish.payara.arquillian:arquillian-payara-server-remote:jar:1.1
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cargo-tracker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cargo-tracker ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cargo-tracker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cargo-tracker ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ cargo-tracker ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:3.2.3:war (default-war) @ cargo-tracker ---
[INFO] Packaging webapp
[INFO] Assembling webapp [cargo-tracker] in [/Users/nsubrahm/aws-code/cargotracker/target/cargo-tracker]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/nsubrahm/aws-code/cargotracker/src/main/webapp]
[INFO] Webapp assembled in [342 msecs]
[INFO] Building war: /Users/nsubrahm/aws-code/cargotracker/target/cargo-tracker.war
[INFO] 
[INFO] --- cargo-maven2-plugin:1.7.7:run (default-cli) @ cargo-tracker ---
[INFO] [en2.ContainerRunMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-glassfish:jar:1.7.7 for container glassfish4x
thadumi commented 4 years ago

Hi @chainhead , sorry for the delay. There are no errors inside the log you attached, thus I cannot help you with that information. If something is not working you should find an error reported under [INFO] --- cargo-maven2-plugin:1.7.7:run (default-cli) @ cargo-tracker --- .

chainhead commented 4 years ago

Well, no more logs are generated after generating the .war. So, I am not sure if the application is launched or waiting for something...

m-reza-rahman commented 4 years ago

I suggest scheduling a screen sharing session. That often is quicker in getting to the bottom of things. I am not having any issues either. This could be an environment or platform specific thing.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

chainhead commented 4 years ago

@m-reza-rahman @thadumi I can, maybe, share a screen-recording. ;)

In the meantime, I can see the command completes and here is the error.

[ERROR] Starting container [org.codehaus.cargo.container.glassfish.GlassFish4xInstalledLocalContainer@73a6cc79] failed
org.codehaus.cargo.container.ContainerException: Failed to create a GlassFish 4.x standalone configuration
    at org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration.configure (AbstractLocalConfiguration.java:289)
    at org.codehaus.cargo.container.spi.AbstractLocalContainer.start (AbstractLocalContainer.java:198)
    at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction (ContainerStartMojo.java:84)
    at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute (ContainerRunMojo.java:96)
    at org.codehaus.cargo.maven2.AbstractCargoMojo.execute (AbstractCargoMojo.java:471)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.codehaus.cargo.util.CargoException: GlassFish admin command with args (--interactive=false --user admin --passwordfile /Users/user/cargotracker/target/cargo/configurations/glassfish4x/password.properties create-domain --adminport 4848 --instanceport 8080 --domainproperties jms.port=7676:orb.listener.port=3700:orb.ssl.port=3820:http.ssl.port=8181:orb.mutualauth.port=3920:domain.jmxPort=8686:java.debugger.port=9009:osgi.shell.telnet.port=6666 --domaindir /Users/user/cargotracker/target/cargo/configurations/glassfish4x cargo-domain) failed: asadmin exited 1
    at org.codehaus.cargo.container.glassfish.internal.GlassFish3xAsAdmin.invokeAsAdmin (GlassFish3xAsAdmin.java:98)
    at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalContainer.invokeAsAdmin (AbstractGlassFishInstalledLocalContainer.java:96)
    at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalContainer.invokeAsAdmin (AbstractGlassFishInstalledLocalContainer.java:82)
    at org.codehaus.cargo.container.glassfish.GlassFish3xStandaloneLocalConfiguration.configureUsingAsAdmin (GlassFish3xStandaloneLocalConfiguration.java:69)
    at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishStandaloneLocalConfiguration.doConfigure (AbstractGlassFishStandaloneLocalConfiguration.java:128)
    at org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration.configure (AbstractLocalConfiguration.java:284)
    at org.codehaus.cargo.container.spi.AbstractLocalContainer.start (AbstractLocalContainer.java:198)
    at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction (ContainerStartMojo.java:84)
    at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute (ContainerRunMojo.java:96)
    at org.codehaus.cargo.maven2.AbstractCargoMojo.execute (AbstractCargoMojo.java:471)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] Press Ctrl-C to stop the container...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.022 s
[INFO] Finished at: 2020-09-09T08:16:52+05:30
[INFO] ------------------------------------------------------------------------

This is on MacOS Catalina.

chainhead commented 4 years ago

This SO question Maven with Cargo and Installed Glassfish refers to removal of password. Didn't help.

This SO question The JavaEE 8 Tutorial, deploy failed on hello1 project refers to changing the parent POM. But, in my pom.xml, I don't see glassfish.home at all!

There are some other articles that refer to starting the Glassfish server first. Wouldn't the mvn command do that? If not, how do I launch the Glassfish server?

m-reza-rahman commented 4 years ago

In this case, the Payara/GlassFish logs will be a bit more useful than the Maven output.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

thadumi commented 4 years ago

@m-reza-rahman's right.

You should find the log in ./cargotracker/target/cargo/configurations/glassfish4x/cargo-domain/logs/server.log

chainhead commented 4 years ago

cargotracker/target/cargo/configurations/glassfish4x has password.properties only - no other files or folders.

thadumi commented 4 years ago

This is odd. Could you check if the download of Payara was completed correctly?

The download is inside cargotracker/target/cargo/installs/payara-4.1.2.181/payara41/glassfish, then inside bin you should find asadmin. Please, for checking that Payara is running without problems try ./asadmin start-domain --verbose and then deploy manually the war.

m-reza-rahman commented 4 years ago

I would reset things by deleting the target directory. My guess is that the Payara download was interrupted somehow. It is a sizable download and does not happen quickly, especially if the connection speed is slower.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

chainhead commented 4 years ago

The download is inside cargotracker/target/cargo/installs/payara-4.1.2.181/payara41/glassfish, then inside bin you should find asadmin. Please, for checking that Payara is running without problems try ./asadmin start-domain --verbose and then deploy manually the war.

Firstly, not a single file in the target/cargo/installs/payara-4.1.2.181/payara41/glassfish/bin had execute permissions. I set the permissions with a chmod +x. Then, when I did run ./asadmin start-domain --verbose, I get this error

Exception in thread "main" java.lang.NullPointerException
    at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
    at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
    at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
    at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
    at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
    at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:216)
    at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:254)
    at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
    at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:370)
    at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:305)
    at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)
chainhead commented 4 years ago

I would reset things by deleting the target directory. My guess is that the Payara download was interrupted somehow. It is a sizable download and does not happen quickly, especially if the connection speed is slower.

After rm -rf target, I did a mvn package cargo:run and this is the result.

[ERROR] Starting container [org.codehaus.cargo.container.glassfish.GlassFish4xInstalledLocalContainer@52ed42d6] failed
org.codehaus.cargo.container.ContainerException: Failed to create a GlassFish 4.x standalone configuration
    at org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration.configure (AbstractLocalConfiguration.java:289)
    at org.codehaus.cargo.container.spi.AbstractLocalContainer.start (AbstractLocalContainer.java:198)
    at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction (ContainerStartMojo.java:84)
    at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute (ContainerRunMojo.java:96)
    at org.codehaus.cargo.maven2.AbstractCargoMojo.execute (AbstractCargoMojo.java:471)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.codehaus.cargo.util.CargoException: GlassFish admin command with args (--interactive=false --user admin --passwordfile /Users/nsubrahm/code/aws-code/cargotracker/target/cargo/configurations/glassfish4x/password.properties create-domain --adminport 4848 --instanceport 8080 --domainproperties jms.port=7676:orb.listener.port=3700:orb.ssl.port=3820:http.ssl.port=8181:orb.mutualauth.port=3920:domain.jmxPort=8686:java.debugger.port=9009:osgi.shell.telnet.port=6666 --domaindir /Users/nsubrahm/code/aws-code/cargotracker/target/cargo/configurations/glassfish4x cargo-domain) failed: asadmin exited 1
    at org.codehaus.cargo.container.glassfish.internal.GlassFish3xAsAdmin.invokeAsAdmin (GlassFish3xAsAdmin.java:98)
    at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalContainer.invokeAsAdmin (AbstractGlassFishInstalledLocalContainer.java:96)
    at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalContainer.invokeAsAdmin (AbstractGlassFishInstalledLocalContainer.java:82)
    at org.codehaus.cargo.container.glassfish.GlassFish3xStandaloneLocalConfiguration.configureUsingAsAdmin (GlassFish3xStandaloneLocalConfiguration.java:69)
    at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishStandaloneLocalConfiguration.doConfigure (AbstractGlassFishStandaloneLocalConfiguration.java:128)
    at org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration.configure (AbstractLocalConfiguration.java:284)
    at org.codehaus.cargo.container.spi.AbstractLocalContainer.start (AbstractLocalContainer.java:198)
    at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction (ContainerStartMojo.java:84)
    at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute (ContainerRunMojo.java:96)
    at org.codehaus.cargo.maven2.AbstractCargoMojo.execute (AbstractCargoMojo.java:471)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] Press Ctrl-C to stop the container...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
m-reza-rahman commented 4 years ago

I would inspect the logs now to see what is actually happening. In the meanwhile, can you please tell me what OS and Java version you are using? Let me see if this is a platform problem or something specific to your environment. This may be an issue that needs to be filed with the Payara folks in the worst case.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

chainhead commented 4 years ago

@m-reza-rahman

This is on MacOS 10.15 and Java is 12.

java version "12.0.2" 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
chainhead commented 4 years ago

I would inspect the logs now to see what is actually happening.

Sorry...where are the logs? cargotracker/target/cargo/configurations/glassfish4x has password.properties only - no other files or folders.

m-reza-rahman commented 4 years ago

I am honestly not sure I have a very clear picture of what is going on in this case. What normally happens is that the Maven Cargo plugin will download, unzip Payara and execute via asaadmin. Once that happens, you will find the logs where they usually are for a Payara configuration under cargotracker/target/cargo/configurations/glassfish4x/cargo-domain/logs. Let me first try this out on a Mac. After that, it may be best to just schedule a short screen sharing session to get to the bottom of this if this is a very environment specific issue.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

m-reza-rahman commented 4 years ago

I was able to reproduce the issue on the Mac. Next I will try to see if this is an issue specific to Payara 4. Either way, I will file a bug with Payara. In the meanwhile, I suggest deploying via an IDE instead.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

m-reza-rahman commented 4 years ago

I have started a thread on this with the Payara Forum: https://groups.google.com/g/payara-forum/c/0Vkk2VKVfJI. For now, I have removed Cargo from the instructions to avoid confusion.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

Cousjava commented 4 years ago

The reason for the failure is that you trying to run Payara on JDK 12. Payara does not support JDK12. Payara 4 which looks to be the version you are using is only supported on JDK 8, and Payara 5 is supported on JDK 8 and JDK 11.

m-reza-rahman commented 4 years ago

It is certainly a worthy experiment to try with JDK 8. I tried and it still failed for me unfortunately on the Mac and on Linux.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

chainhead commented 4 years ago

I tried and it still failed for me unfortunately on the Mac and on Linux.

Hmm....where do we go from here?

Cousjava commented 4 years ago

I tested it locally, and cargo:deploy works fine for an already running Payara domain, but cargo:start and cargo:run fail. Updating the version of cargo plugin allows it to work. I've made a PR to update the versions of the cargo plugin and update the Payara version to the Jakarta EE 8 version.

m-reza-rahman commented 4 years ago

Did you try updating just the cargo version and not the Payara version? The objective right now is to support Java EE 7 and Payara 4 users for the first stable release.

Until we sort this out properly, I would suggest simply utilizing the IDE instructions. I have removed the Cargo instructions now until we can stabilize it.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

m-reza-rahman commented 4 years ago

I think I have sorted this out reliably. I have updated the code base and cargo:run instructions in the README. Please update and try it out.

I am closing this for now to maintain hygiene. If there is still an issue, please re-open.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

chainhead commented 4 years ago

I will try this out. In the meantime, can you please elaborate this instruction?

Make sure JAVA_HOME is set for Maven and Payara to function predictably.

Does the instruction mean, a Payara installation should exist in advance? I thought cargo:run will do that automatically?

m-reza-rahman commented 4 years ago

All you need to have installed is Java SE 8 and Maven. Just please make sure to set JAVA_HOME.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

chainhead commented 4 years ago

@m-reza-rahman Finally, found time to test with Java 8; it is working now. Many thanks for your help!

chainhead commented 1 year ago

Two years later, this application won't work with Java 8. What's wrong now?

echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home
 java -version
openjdk version "1.8.0_352"
OpenJDK Runtime Environment Corretto-8.352.08.1 (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM Corretto-8.352.08.1 (build 25.352-b08, mixed mode)
mvn clean package cargo:run

cargo-tracker.log

m-reza-rahman commented 1 year ago

Have you tried launching just Payara? What happens? I suspect this is the issue that Payara 5 will not work on an Apple M2 chip. Once you verify it, we can list this as a known issue. Other that that, there may not be much we can do as it's up to the Payara folks. Do feel free to follow up here (or we can do it once you verify): https://forum.payara.fish/.

m-reza-rahman commented 1 year ago

I have now upgraded the Payara 5 version for the Cargo plugin. I hope this resolved whatever the issue was. I do not have an ability to test on the Mac. Please re-open this issue if the problem persists.