[JBoss JIRA] (JGRP-1820) XML schema broken for AUTH
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1820?page=com.atlassian.jira.plugin.... ]
Bela Ban resolved JGRP-1820.
----------------------------
Resolution: Done
> XML schema broken for AUTH
> --------------------------
>
> Key: JGRP-1820
> URL: https://issues.jboss.org/browse/JGRP-1820
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.4.1
> Reporter: Dennis Reed
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 3.5
>
>
> The XML schema does not pass validation for AUTH.
> AUTH merges in properties for the pluggable auth_class, which are not currently included in the schema.
> For example the fixed_members_value when using FixedMembershipToken is not included in the schema and fails validation:
> <AUTH auth_class="org.jgroups.auth.FixedMembershipToken"
> fixed_members_value="localhost/7900">
> </AUTH>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (JGRP-1828) Allow protocols to define inline XML config
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1828?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-1828:
--------------------------------
OK, schema generation is done, too. We use {{@XmlInclude}} and {{@XmlElement}} to generate the schema. See {{FORK}} and {{RELAY2}} for examples.
> Allow protocols to define inline XML config
> -------------------------------------------
>
> Key: JGRP-1828
> URL: https://issues.jboss.org/browse/JGRP-1828
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.5
>
>
> Some protocols (e.g. RELAY2 or FORK) need additional configuration, which is usually defined in a separate XML file, e.g.
> {code:xml}
> <FORK config="/home/bela/fork-stacks.xml"/>
> {code}
> File {{fork-stacks.xml}} is:
> {code:xml}
> <fork-stacks xmlns="fork-stacks">
> <fork-stack id="counter">
> <config>
> <COUNTER bypass_bundling="true"/>
> <COMPRESS/>
> </config>
> </fork-stack>
> <fork-stack id="locking">
> <config>
> <CENTRAL_LOCK num_backups="2"/>
> </config>
> </fork-stack>
> </fork-stacks>
> {code}
> It would be nice to be able to optionally define such additional configuration inline, e.g.
> {code:xml}
> <FORK>
> <fork-stacks xmlns="fork-stacks">
> <fork-stack id="counter">
> <config>
> <COUNTER bypass_bundling="true"/>
> <COMPRESS/>
> </config>
> </fork-stack>
> <fork-stack id="locking">
> <config>
> <CENTRAL_LOCK num_backups="2"/>
> </config>
> </fork-stack>
> </fork-stacks>
> </FORK>
> {code}
> As the schema for config files is *generated*, we would have to able to tell the generator ({{XMLSchemaGenerator}}) to include a schema fragment defined by any protocol.
> A schema fragment could be defined via an annotation, e.g. {{@IncludeSchema(schema="fork-stacks.xsd"}}.
> Investigate whether this is feasible.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (JGRP-1828) Allow protocols to define inline XML config
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1828?page=com.atlassian.jira.plugin.... ]
Bela Ban resolved JGRP-1828.
----------------------------
Resolution: Done
> Allow protocols to define inline XML config
> -------------------------------------------
>
> Key: JGRP-1828
> URL: https://issues.jboss.org/browse/JGRP-1828
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.5
>
>
> Some protocols (e.g. RELAY2 or FORK) need additional configuration, which is usually defined in a separate XML file, e.g.
> {code:xml}
> <FORK config="/home/bela/fork-stacks.xml"/>
> {code}
> File {{fork-stacks.xml}} is:
> {code:xml}
> <fork-stacks xmlns="fork-stacks">
> <fork-stack id="counter">
> <config>
> <COUNTER bypass_bundling="true"/>
> <COMPRESS/>
> </config>
> </fork-stack>
> <fork-stack id="locking">
> <config>
> <CENTRAL_LOCK num_backups="2"/>
> </config>
> </fork-stack>
> </fork-stacks>
> {code}
> It would be nice to be able to optionally define such additional configuration inline, e.g.
> {code:xml}
> <FORK>
> <fork-stacks xmlns="fork-stacks">
> <fork-stack id="counter">
> <config>
> <COUNTER bypass_bundling="true"/>
> <COMPRESS/>
> </config>
> </fork-stack>
> <fork-stack id="locking">
> <config>
> <CENTRAL_LOCK num_backups="2"/>
> </config>
> </fork-stack>
> </fork-stacks>
> </FORK>
> {code}
> As the schema for config files is *generated*, we would have to able to tell the generator ({{XMLSchemaGenerator}}) to include a schema fragment defined by any protocol.
> A schema fragment could be defined via an annotation, e.g. {{@IncludeSchema(schema="fork-stacks.xsd"}}.
> Investigate whether this is feasible.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (WFLY-3293) Excessive ERROR logging on JBAS014559: Invocation cannot proceed as component is shutting dow
by Thomas Frühbeck (JIRA)
Thomas Frühbeck created WFLY-3293:
-------------------------------------
Summary: Excessive ERROR logging on JBAS014559: Invocation cannot proceed as component is shutting dow
Key: WFLY-3293
URL: https://issues.jboss.org/browse/WFLY-3293
Project: WildFly
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: EJB
Affects Versions: 8.0.0.Final
Reporter: Thomas Frühbeck
Assignee: David Lloyd
Priority: Minor
on server shutdown excessive ERROR logs are produced related to EJB invocations on beans in state shutdown.
2014-04-26 09:38:43,059 ERROR [org.jboss.as.ejb3.invocation] (ServerService Thread Pool -- 377) JBAS014134: EJB Invocation failed on component SMSQueueConsumer for method public void at.telekom.sms.esms.service.
common.queue.SMSQueueConsumer.stopping(): org.jboss.as.ejb3.component.EJBComponentUnavailableException: JBAS014559: Invocation cannot proceed as component is shutting down
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:59) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
IMHO this is definitely no error and is very alarming for production environments, INFO w/o stacktrace, in level DEBUG full stacktrace would suffice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (WFLY-3261) Security constraint does not protect URL
by Dino Tsoumakis (JIRA)
[ https://issues.jboss.org/browse/WFLY-3261?page=com.atlassian.jira.plugin.... ]
Dino Tsoumakis commented on WFLY-3261:
--------------------------------------
I recognized that if no 'hashEncoding' is set, the default is 'base64'. After explicitly setting it to 'HEX' the security constraint works as expected on Wildfly 8 and also on 8.1.0.RC1. No problem here.
> Security constraint does not protect URL
> ----------------------------------------
>
> Key: WFLY-3261
> URL: https://issues.jboss.org/browse/WFLY-3261
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Web (Undertow)
> Affects Versions: 8.1.0.CR1
> Reporter: Simon Martinelli
> Assignee: Stuart Douglas
>
> Security constraint works as expected on JBoss EAP 6.2.2 and JBoss AS 7.1.1.Final but no on Wildfly
> *web.xml*
> {code:xml}
> <security-constraint>
> <display-name>Spaces</display-name>
> <web-resource-collection>
> <web-resource-name>spaces</web-resource-name>
> <url-pattern>/spaces/*</url-pattern>
> </web-resource-collection>
> <auth-constraint>
> <role-name>user</role-name>
> </auth-constraint>
> </security-constraint>
> {code}
> *jboss-web.xml*
> {code:xml}
> <jboss-web>
> <context-root>/jtaf</context-root>
> <security-domain>jtaf</security-domain>
> </jboss-web>
> {code}
> *standalone.xml*
> {code:xml}
> <security-domain name="jtaf" cache-type="default">
> <authentication>
> <login-module code="Database" flag="required">
> <module-option name="dsJndiName" value="java:jboss/datasources/MysqlDS"/>
> <module-option name="principalsQuery" value="select secret from securityuser where email = ?"/>
> <module-option name="rolesQuery" value="select name, 'Roles' from securitygroup where email = ?"/>
> <module-option name="password-stacking" value="useFirstPass"/>
> <module-option name="hashAlgorithm" value="MD5"/>
> <module-option name="hashEncoding" value="base64"/>
> </login-module>
> </authentication>
> </security-domain>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (JBASMP-68) execute-commands does not work for module command
by Alfio Gloria (JIRA)
Alfio Gloria created JBASMP-68:
----------------------------------
Summary: execute-commands does not work for module command
Key: JBASMP-68
URL: https://issues.jboss.org/browse/JBASMP-68
Project: JBoss AS Maven Plugins
Issue Type: Bug
Affects Versions: 7.6.Final
Reporter: Alfio Gloria
Assignee: James Perkins
I'm trying to remove a jboss module by means of maven.
<configuration>
<jbossHome>${project.build.directory}/server/jboss72</jbossHome>
<execute-commands>
<commands>
<command>module remove --slot=main --name=system.layers.base.org.jboss.weld.core</command>
</commands>
</execute-commands>
</configuration>
execute-commands fails whit the following stack trace:
Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.IllegalArgumentException: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:180)
at org.jboss.as.plugin.cli.Commands.execute(Commands.java:134)
at org.jboss.as.plugin.cli.ExecuteCommands.execute(ExecuteCommands.java:71)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 20 more
Caused by: org.jboss.as.cli.CommandLineException: JBOSS_HOME environment variable is not set.
at org.jboss.as.cli.handlers.module.ASModuleHandler.getModulesDir(ASModuleHandler.java:362)
at org.jboss.as.cli.handlers.module.ASModuleHandler.removeModule(ASModuleHandler.java:326)
at org.jboss.as.cli.handlers.module.ASModuleHandler.doHandle(ASModuleHandler.java:214)
at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:86)
at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:581)
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:176)
... 23 more
(tested with the last snapshot too)
The problem comes from jboss-as-cli that needs the JBOSS_HOME to be set in order to add or remove modules. This is not a requirement for other commands such as deploy.
There are some points of confusion:
1) JBOSS_HOME is set in .bashrc but IDEs do not read .bashrc, thereby it can work in some cases but not in others;
2) usually there are more than one installation or jboss-as-maven-plugin can download the server;
3) jbossHome config parameter is not take into account;
4) what if I want to make operations on more the one server at the same time?
At the moment I solved by patching jboss-as-cli using a system property instead of environment variable. I don't know how to solve without touching jboss-as-cli.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (JBASMP-68) execute-commands does not work for module command
by Alfio Gloria (JIRA)
[ https://issues.jboss.org/browse/JBASMP-68?page=com.atlassian.jira.plugin.... ]
Alfio Gloria updated JBASMP-68:
-------------------------------
Description:
I'm trying to remove a jboss module by means of maven.
<configuration>
<jbossHome>${project.build.directory}/server/jboss72</jbossHome>
<execute-commands>
<commands>
<command>module remove --slot=main --name=system.layers.base.org.jboss.weld.core</command>
</commands>
</execute-commands>
</configuration>
execute-commands fails with the following stack trace:
Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.IllegalArgumentException: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:180)
at org.jboss.as.plugin.cli.Commands.execute(Commands.java:134)
at org.jboss.as.plugin.cli.ExecuteCommands.execute(ExecuteCommands.java:71)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 20 more
Caused by: org.jboss.as.cli.CommandLineException: JBOSS_HOME environment variable is not set.
at org.jboss.as.cli.handlers.module.ASModuleHandler.getModulesDir(ASModuleHandler.java:362)
at org.jboss.as.cli.handlers.module.ASModuleHandler.removeModule(ASModuleHandler.java:326)
at org.jboss.as.cli.handlers.module.ASModuleHandler.doHandle(ASModuleHandler.java:214)
at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:86)
at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:581)
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:176)
... 23 more
(tested with the last snapshot too)
The problem comes from jboss-as-cli that needs the JBOSS_HOME to be set in order to add or remove modules. This is not a requirement for other commands such as deploy.
There are some points of confusion:
1) JBOSS_HOME is set in .bashrc but IDEs do not read .bashrc, thereby it can work in some cases but not in others;
2) usually there are more than one installation or jboss-as-maven-plugin can download the server;
3) jbossHome config parameter is not take into account;
4) what if I want to make operations on more the one server at the same time?
At the moment I solved by patching jboss-as-cli using a system property instead of environment variable. I don't know how to solve without touching jboss-as-cli.
was:
I'm trying to remove a jboss module by means of maven.
<configuration>
<jbossHome>${project.build.directory}/server/jboss72</jbossHome>
<execute-commands>
<commands>
<command>module remove --slot=main --name=system.layers.base.org.jboss.weld.core</command>
</commands>
</execute-commands>
</configuration>
execute-commands fails whit the following stack trace:
Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.IllegalArgumentException: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:180)
at org.jboss.as.plugin.cli.Commands.execute(Commands.java:134)
at org.jboss.as.plugin.cli.ExecuteCommands.execute(ExecuteCommands.java:71)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 20 more
Caused by: org.jboss.as.cli.CommandLineException: JBOSS_HOME environment variable is not set.
at org.jboss.as.cli.handlers.module.ASModuleHandler.getModulesDir(ASModuleHandler.java:362)
at org.jboss.as.cli.handlers.module.ASModuleHandler.removeModule(ASModuleHandler.java:326)
at org.jboss.as.cli.handlers.module.ASModuleHandler.doHandle(ASModuleHandler.java:214)
at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:86)
at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:581)
at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:176)
... 23 more
(tested with the last snapshot too)
The problem comes from jboss-as-cli that needs the JBOSS_HOME to be set in order to add or remove modules. This is not a requirement for other commands such as deploy.
There are some points of confusion:
1) JBOSS_HOME is set in .bashrc but IDEs do not read .bashrc, thereby it can work in some cases but not in others;
2) usually there are more than one installation or jboss-as-maven-plugin can download the server;
3) jbossHome config parameter is not take into account;
4) what if I want to make operations on more the one server at the same time?
At the moment I solved by patching jboss-as-cli using a system property instead of environment variable. I don't know how to solve without touching jboss-as-cli.
> execute-commands does not work for module command
> -------------------------------------------------
>
> Key: JBASMP-68
> URL: https://issues.jboss.org/browse/JBASMP-68
> Project: JBoss AS Maven Plugins
> Issue Type: Bug
> Affects Versions: 7.6.Final
> Reporter: Alfio Gloria
> Assignee: James Perkins
>
> I'm trying to remove a jboss module by means of maven.
> <configuration>
> <jbossHome>${project.build.directory}/server/jboss72</jbossHome>
> <execute-commands>
> <commands>
> <command>module remove --slot=main --name=system.layers.base.org.jboss.weld.core</command>
> </commands>
> </execute-commands>
> </configuration>
> execute-commands fails with the following stack trace:
> Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set. -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands (install-patched-weld) on project tools: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution install-patched-weld of goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:execute-commands failed: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 19 more
> Caused by: java.lang.IllegalArgumentException: Command execution failed for command 'module remove --slot=main --name=system.layers.base.org.jboss.weld.core'. JBOSS_HOME environment variable is not set.
> at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:180)
> at org.jboss.as.plugin.cli.Commands.execute(Commands.java:134)
> at org.jboss.as.plugin.cli.ExecuteCommands.execute(ExecuteCommands.java:71)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
> ... 20 more
> Caused by: org.jboss.as.cli.CommandLineException: JBOSS_HOME environment variable is not set.
> at org.jboss.as.cli.handlers.module.ASModuleHandler.getModulesDir(ASModuleHandler.java:362)
> at org.jboss.as.cli.handlers.module.ASModuleHandler.removeModule(ASModuleHandler.java:326)
> at org.jboss.as.cli.handlers.module.ASModuleHandler.doHandle(ASModuleHandler.java:214)
> at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:86)
> at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:581)
> at org.jboss.as.plugin.cli.Commands.executeCommands(Commands.java:176)
> ... 23 more
> (tested with the last snapshot too)
> The problem comes from jboss-as-cli that needs the JBOSS_HOME to be set in order to add or remove modules. This is not a requirement for other commands such as deploy.
> There are some points of confusion:
> 1) JBOSS_HOME is set in .bashrc but IDEs do not read .bashrc, thereby it can work in some cases but not in others;
> 2) usually there are more than one installation or jboss-as-maven-plugin can download the server;
> 3) jbossHome config parameter is not take into account;
> 4) what if I want to make operations on more the one server at the same time?
> At the moment I solved by patching jboss-as-cli using a system property instead of environment variable. I don't know how to solve without touching jboss-as-cli.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years