Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is standalone-full.xml supported by wildfly-jar-maven? #403

Open
deamn opened this issue Aug 16, 2024 · 7 comments
Open

Is standalone-full.xml supported by wildfly-jar-maven? #403

deamn opened this issue Aug 16, 2024 · 7 comments

Comments

@deamn
Copy link

deamn commented Aug 16, 2024

Is standalone-full.xml supported by wildfly-jar-maven? I don't see any parameter to specify standalone-full.xml. My provisioning file contains standalone-full.xml

...
<config model="standalone" name="standalone-full.xml">
...

and I have this error when I built the bootable jar:

[ERROR] Exception in thread "main" org.jboss.as.cli.CommandLineException: java.util.concurrent.ExecutionException: org.jboss.as.cli.CommandLineException: Cannot start embedded server
[ERROR]         at org.jboss.as.cli.impl.CommandContextImpl.execute(CommandContextImpl.java:927)
[ERROR]         at org.jboss.as.cli.impl.CommandContextImpl.handleLegacyCommand(CommandContextImpl.java:1928)
[ERROR]         at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:864)
[ERROR]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[ERROR]         at org.wildfly.plugin.tools.cli.CLIWrapper.handle(CLIWrapper.java:135)
[ERROR]         at org.wildfly.plugins.bootablejar.maven.cli.CLIForkedExecutor.main(CLIForkedExecutor.java:50)
[ERROR] Caused by: java.util.concurrent.ExecutionException: org.jboss.as.cli.CommandLineException: Cannot start embedded server
[ERROR]         at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
[ERROR]         at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
[ERROR]         at org.jboss.as.cli.impl.CommandExecutor.execute(CommandExecutor.java:715)
[ERROR]         at org.jboss.as.cli.impl.CommandExecutor.execute(CommandExecutor.java:696)
[ERROR]         at org.jboss.as.cli.impl.CommandContextImpl.lambda$handleLegacyCommand$4(CommandContextImpl.java:1929)
[ERROR]         at org.jboss.as.cli.impl.CommandContextImpl.execute(CommandContextImpl.java:914)
[ERROR]         ... 6 more
...
[ERROR] Caused by: java.lang.Exception: WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details. - Server configuration file in use: standalone.xml
[ERROR]         at [email protected]//org.jboss.as.server.ServerService.boot(ServerService.java:427)
[ERROR]         at [email protected]//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:362)
[ERROR]         ... 1 more
[ERROR] Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0082: Failed to create backup copies of configuration file C:\Users\deamn\eclipse-workspace\proj-jee\proj-ear\target\bootable-jar-build-artifacts\wildfly\standalone\configuration\standalone.xml
[ERROR]         at [email protected]//org.jboss.as.controller.persistence.ConfigurationFile.successfulBoot(ConfigurationFile.java:556)
[ERROR]         at [email protected]//org.jboss.as.controller.persistence.BackupXmlConfigurationPersister.successfulBoot(BackupXmlConfigurationPersister.java:78)
[ERROR]         at [email protected]//org.jboss.as.controller.AbstractControllerService.finishBoot(AbstractControllerService.java:487)
[ERROR]         at [email protected]//org.jboss.as.server.ServerService.finishBoot(ServerService.java:438)
[ERROR]         at [email protected]//org.jboss.as.server.ServerService.boot(ServerService.java:398)
[ERROR]         ... 2 more
[ERROR] Caused by: java.nio.file.NoSuchFileException: C:\Users\deamn\eclipse-workspace\proj-jee\proj-ear\target\bootable-jar-build-artifacts\wildfly\standalone\configuration\standalone.xml
@jfdenise
Copy link
Collaborator

jfdenise commented Aug 26, 2024

@deamn , in your config declaration, add:

<props>
        <prop name="--server-config" value="standalone.xml"/>
</props>

Doing so, even if it contains the standalone-full.xml content, the file name will be standalone.xml. Let me kknow if that fixes your problem.
Thank-you.

@deamn
Copy link
Author

deamn commented Aug 26, 2024

@jfdenise I searched but I haven't found where I could define ? In wildfly-jar-maven-plugin?

@jfdenise
Copy link
Collaborator

In the provisioning.xml

<config model="standalone" name="standalone-full.xml">
<props>
        <prop name="--server-config" value="standalone.xml"/>
</props>
</config>

@deamn
Copy link
Author

deamn commented Aug 30, 2024

@jfdenise but the provisioning.xml is generated by wildfly-glow during mvn package, I couldn't update this file manually?

@jfdenise
Copy link
Collaborator

@deamn , How did you ask Glow to generate a config named "standalone-full.xml" ? Glow generates a config named standalone.xml by default.

@deamn
Copy link
Author

deamn commented Sep 2, 2024

with wildfly-maven-plugin:

<plugin>
	<groupId>org.wildfly.plugins</groupId>
	<artifactId>wildfly-maven-plugin</artifactId>
	<version>5.0.0.Final</version>
	<configuration>
		<overwrite-provisioned-server>true</overwrite-provisioned-server>
		<provisioning-file>${project.build.directory}/glow-scan/provisioning.xml</provisioning-file>
		<layersConfigurationFileName>standalone-full.xml</layersConfigurationFileName>
		<discover-provisioning-info>
			<version>${version.wf}</version>
			<verbose>false</verbose>
			<add-ons>
				<add-on>wildfly-cli</add-on>
				<add-on>remote-activemq</add-on>
			</add-ons>
		</discover-provisioning-info>
		<packaging-scripts>
			<execution>
				<properties-files>
					<file>../cli-test.properties</file>
				</properties-files>
				<resolve-expressions>true</resolve-expressions>
				<scripts>
					<script>../configure-wf.cli</script>
				</scripts>
			</execution>
		</packaging-scripts>
	</configuration>
	<executions>
		<execution>
			<id>test-provisioning</id>
			<goals>
				<goal>package</goal>
			</goals>
			<phase>test-compile</phase>
		</execution>
	</executions>
</plugin>
<plugin>
	<artifactId>maven-surefire-plugin</artifactId>
	<configuration>
		<systemPropertyVariables>
			<jboss.home>${project.build.directory}/../../proj-jee-ear/target/server</jboss.home>
			<jboss.server.config.file.name>standalone-full.xml</jboss.server.config.file.name>
		</systemPropertyVariables>
	</configuration>
</plugin>

@jfdenise
Copy link
Collaborator

jfdenise commented Sep 2, 2024

Hi,
I don't follow this example. Yo uare using the wildfly-maven-plugin, not the wildfly-jar-maven-plugin. In addition you are setting <provisioning-file>${project.build.directory}/glow-scan/provisioning.xml</provisioning-file> although the galleon content is discovered.
I would need more detail on what the issue is. Thank-you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants